Last active
June 24, 2018 17:31
-
-
Save pfeodrippe/c2f2bea9d97938d67adf72ac1f5d2b45 to your computer and use it in GitHub Desktop.
fla charts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var chart = c3.generate({ | |
| data: { | |
| x: 'x', | |
| columns: [ | |
| ['x', '0-4', '5-9', '10-14', '15-24', '25-49', '50+'], | |
| ['homens', 343, 300, 314, 555, 610, 295], | |
| ['mulheres', 318, 305, 315, 560, 591, 344] | |
| ], | |
| type: 'bar' | |
| }, | |
| axis: { | |
| rotated: true, | |
| x: { | |
| type: 'category' // this needed to load string x value | |
| } | |
| } | |
| , | |
| size: { | |
| height: 320, | |
| width: 320 | |
| }, | |
| bar: { | |
| width: { | |
| ratio: 0.5 // this makes bar width 50% of length between ticks | |
| } | |
| // or | |
| //width: 100 // this makes bar width 100px | |
| } | |
| }); | |
| chart.axis.max({ | |
| y: 900, | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var chart = c3.generate({ | |
| data: { | |
| x: 'x', | |
| columns: [ | |
| ['x', '0-4', '5-9', '10-14', '15-24', '25-49', '50+'], | |
| ['homens', 315, 301, 321, 564, 766, 411], | |
| ['mulheres', 301, 321, 323, 483, 809, 450] | |
| ], | |
| type: 'bar' | |
| }, | |
| axis: { | |
| rotated: true, | |
| x: { | |
| type: 'category' // this needed to load string x value | |
| } | |
| } | |
| , | |
| size: { | |
| height: 320, | |
| width: 320 | |
| }, | |
| bar: { | |
| width: { | |
| ratio: 0.5 // this makes bar width 50% of length between ticks | |
| } | |
| // or | |
| //width: 100 // this makes bar width 100px | |
| } | |
| }); | |
| chart.axis.max({ | |
| y: 900, | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment