Dreg Artor
Dreg Artor

Reputation: 33

Hightcharts - multiple data in one single pie charts

Whats the best way to achieving the below pie chart using Highcharts library. This pie chart has multiple data in one single pie chart.

Upvotes: 0

Views: 82

Answers (1)

ppotaczek
ppotaczek

Reputation: 39069

You can use pattern-fill module to distinguish some points on the chart:

var data = [{
  y: 2.5,
  color: '#004512'
}, {
  y: 9.5,
  color: '#453813',
  dataGroup: 1
}, ...];

data.forEach(function(el) {
  if (el.dataGroup) {
    el.color = {
      pattern: {...}
    }
  }
});

Live demo: http://jsfiddle.net/BlackLabel/6m4e8x0y/4772/

Docs: https://www.highcharts.com/blog/tutorials/pattern-fills/

Upvotes: 1

Related Questions