2

I'm trying to do a chart with stacked columns but for each column having different entries. I will explain myself better.

I would like to use the demo of Highcharts:

http://www.highcharts.com/demo/column-stacked

But:

In the demo, the series are always the same: John, Jane and Joe. What I need, is to have different series for each column (xAxis category). I tried the plugin "https://raw.github.com/blacklabel/grouped_categories. This is fine to have multiple series grouped, but the grouped series are split into multiple columns: I need just one stacked column for each multiple series.

For example:

I want to group the population living in the west coast: I need a stacked column with the data from CA, WA and so on, And the column should clearly show every state, one on the top of the other. Then, in another column I want to group the population of the east coast, grouping in one column FL, NY and so on.

Can someone please help me? Many thanks Vignus

user2401403
  • 21
  • 1
  • 2
  • I found a way, putting an array into the name, like this: series: [{ name: ['NJ', 'WA', 'KY', 'NC'], data: [42, 23, 15, 49] }, My main problem now is that the tooltip shows all the series names: return ''+ this.x +'
    '+ this.series.name +': '+ this.y +'
    '+ 'Total: '+ this.point.stackTotal; Is there a way to show just the current name (for example only NJ or WA) instead of all the series (NY, WA,KY, NC)?
    – user2401403 May 20 '13 at 13:37
  • So all works properly ? – Sebastian Bochan May 20 '13 at 13:38
  • Tooltip is not working properly, because is not going through the array, but "jumping" from the first position of the first array, then the second position of second array and so on. I tried the following: this.series.name[this.series.index-1] +': '+ this.y +'
    '+ but is not helping a lot...
    – user2401403 May 21 '13 at 11:48
  • Essentially, in series, the data of a stack column is picked up from all the first values of the arrays linked to the names picked up using the values of the first array. I should be able to link the first values of each name-array with the first value of each data-array. But for the data-array the JS reads the first position of all arrays (and than the second position and so on), but for the name-array it reads all the values in the same array. – user2401403 May 21 '13 at 12:47
  • Did you find any solution to this?I also need a bit same funcitonality for one of my projects.I have 5 fixed categories and each category can have different subcategories.I want to plot this as a grouped column, where there are 5 columns for 5 categories and then further i can divide each column into parts , where each part denote a subcategory. Is there a way to get this done with highchartsAPI.? – Sunil Sharma Dec 04 '14 at 12:31

0 Answers0