i hava dataset this:
companyname customareacode salesmonth01 salesmonth02 salesmonth03 company1 aa1a 20 30 40 company1 aa1b 23 32 43 company2 aa1a 23 42 45 company2 aa1b 87 65 98 i using javascript ant charkick. want make chart have sales on y axis, , there salesmonth on x axis, grouped customareacode. final chart should 1 in example (sorry painting skills): 
my code create chart:
new chartkick.columnchart(chartname, chartdataitem, { "library": { "backgroundcolor": "#ffffff", "haxis": { "title" : xtitle }, "vaxis": { "title" : ytitle, "viewwindow": { "min": chartmin3, "max": chartmax3 } } }, "discrete": true, "colors": ["#82aef5", "#484c57", "#9987f6", "#ffe57b", "#ffcf7b", "#ffb07b"]}); data json have @ moment (don't know put area code):
[ { "name":"company1", "data": { "2015-01":20, "2015-02":30, "2015-03":40 } }, { "name":"company2", "data": { "2015-01":23, "2015-02":32, "2015-03":43 } }, { "name":"company1", "data": { "2015-01":23, "2015-02":42, "2015-03":45 } }, { "name":"company2", "data": { "2015-01":87, "2015-02":65, "2015-03":98 } } ]
Comments
Post a Comment