javascript - Highcharts creating simple horizontal bar chart -
i trying make simple highcharts bar chart, different example, need categories on x axis , values on y axis, bar each category, without them being stacked. talking having example categories bananas, apples, oranges, , each of categories number of items, 100 bananas, 50, apples, , on, without further categorization on people, in example shown. trying , going through there documentation see how set options kind of setup, not getting anywhere, wondering if knows how set up.
$(function () { $('#container').highcharts({ chart: { type: 'bar' }, title: { text: 'stacked bar chart' }, xaxis: { categories: ['apples', 'oranges', 'pears', 'grapes', 'bananas'] }, yaxis: { min: 0, title: { text: 'total fruit consumption' } }, legend: { reversed: true }, plotoptions: { series: { stacking: null } }, series: [{ name: 'john', data: [5, 3, 4, 7, 2] }, { name: 'jane', data: [2, 2, 3, 2, 1] }, { name: 'joe', data: [3, 4, 4, 2, 5] }] });
});
Comments
Post a Comment