javascript - Highcharts - Display only specific series in specific category? -


i'm trying figure out if possible using highchart's various options display specific series columns in specific categories. i'm trying split data in groups, not groups have data series, , large number of categories , series, reserving ton of space every series in every category, , have not render specific columns in specific categories, if possible.

also i'd know if i'm doing incorrectly, conceptually speaking, , should approach different angle. realize make single-series chart categories cleverly named, i'm trying group these things visually together, not mention reports being generated proprietary generator, hard "know" kind of data coming back, in terms of how human want see it.

you can see example here:

ref: http://jsfiddle.net/gmpa7f7h/

$(function () {     $('#container').highcharts({         chart: {             type: 'column'         },         title: {             text: 'stacked bar chart'         },         xaxis: {             categories: ['west','east','north','south']         },         yaxis: {             min: 0,             title: {                 text: 'total fruit consumption'             }         },         legend: {             reversed: true         },         plotoptions: {             series: {              }         },         series: [{             name: 'oneill',             data: [3,0,0,0]         }, {             name: 'jackson',             data: [5, 0, 0, 0]         }, {             name: 'tealc',             data: [0, 9, 0, 0]         }, {             name: 'carter',             data: [0, 9, 0, 0]         }, {             name: 'mckay',             data: [0, 0, 11, 0]         }, {             name: 'hammond',             data: [0, 0, 2, 0]          }, {             name: 'mitchell',             data: [0, 0, 0, 5]         }, {             name: 'bratak',             data: [0, 0, 0, 2]         }]     }); }); 

one way use (abuse) stack series option documentation example started with:

    series: [{         name: 'oneill',         data: [3,0,0,0],         stack: 'left'     }, {         name: 'jackson',         data: [5, 0, 0, 0]     }, {         name: 'tealc',         data: [0, 9, 0, 0],         stack: 'left'     }, {         name: 'carter',         data: [0, 9, 0, 0]     }, {         name: 'mckay',         data: [0, 0, 11, 0],         stack: 'left'     }, {         name: 'hammond',         data: [0, 0, 2, 0]      }, {         name: 'mitchell',         data: [0, 0, 0, 5],         stack: 'left'     }, {         name: 'bratak',         data: [0, 0, 0, 2]     }] 

it's not terribly elegant , makes assumptions shape of data, however. more information you're after in end, there might better, more generalizable solution.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -