'How to set custom color on stacked bar chart

I want to below type of stacked column chart. Is it possible to draft this kind of chart?

Thanks in advance. enter image description here



Solution 1:[1]

You can enable colorByPoint option for the last series:

  series: [..., {
    ...,
    colorByPoint: true
  }]

Live demo: https://jsfiddle.net/BlackLabel/fdwbLzan/

API Reference: https://api.highcharts.com/highcharts/series.column.colorByPoint


or define an individual color for each point:

  series: [..., {
    ...,
    data: [{
      y: 3,
      color: 'black'
    }, {
      y: 4,
      color: 'purple'
    }, {
      y: 4,
      color: 'green'
    }, {
      y: 2,
      color: 'orange'
    }, {
      y: 5,
      color: 'blue'
    }]
  }]

Live demo: https://jsfiddle.net/BlackLabel/r87mv6n3/

API Reference: https://api.highcharts.com/highcharts/series.column.data.color

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ppotaczek