d3.js - Added X-Axis Labels to C3 Bar Chart -


i trying add x-axis labels bar chart in c3. getting javascript errors. possible? i've tried many combinations , cannot find examples of working.

var _vertchart = c3.generate({     bindto: '#chart',     data: {         x: 'x',             columns: [                 [['x','7am','8am','9am','10am','11am','12pm','1pm','2pm','3pm','4pm','5pm','6pm','7pm','8pm','9pm','10pm'],],                  ['my numbers',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],                 ['johns numbers',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]             ],             type: 'bar'         },         bar: {             width: {                 ratio: 0.8 // makes bar width 50% of length between ticks             }             // or             //width: 100 // makes bar width 100px         },         axis: {x: {type: 'category', show: true}},         labels: true,         tooltip: {             show: true         },         color: {             pattern: ["#5f3a81","#56aec7", "#f09348", "#a196a9"]         },         grid: {             x: {                 show: true             },             y: {                 show: false,                 lines: []             }         } }); 

just realized had bad data in columns


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -