Barry Ralphs
Barry Ralphs

Reputation: 295

Highcharts, mixed stacked & non-stacked columns

I'm sure I'm missing something simple, but how can I have a mix of stacked & non-stacked columns?

Here's what I've tired so far:

series: [{
    stacking: false,
    data: [10]
}, {
    stacking: 'normal',
    data: [5, 5]
}, {
    stacking: false,
    data: [3]
}]

https://jsfiddle.net/m67wh8va/1/

I'd like "Oranges + Tangerine" to be stacked & the others without stacks.

Upvotes: 0

Views: 104

Answers (1)

Wojciech Chmiel
Wojciech Chmiel

Reputation: 7372

You can achieve it using null points.

Code:

  plotOptions: {
    bar: {
      stacking: 'normal'
    }
  },
  series: [{
    data: [null, 1, null, null]
  }, {
    data: [null, 5, null, null]
  }, {
    data: [2, 5, 4, 7]
  }]

Demo:

Upvotes: 1

Related Questions