0
votes

I am developing a pie chart using Highcharts. Everything was fine and customized, until I started implementing the Drilldown feature.

This additional JavaScript file is changing the color to #0D2339 of the labels. My background is almost similar to this color.

I tried changing using

dataLabels: {
   enabled: true,
   color: 'white'
}

But this did not help.

3
Is your Highcharts core file up to date, or an old version?Halvor Holsten Strand
Yes, Just checked. Is latest. The custom dataLabel color is being displayed for the drilldown pie.Karthik VU

3 Answers

1
votes

The following expression will override the color style of dataLabels while using drilldown.js

Highcharts.getOptions().drilldown.activeDataLabelStyle.color = 'white';

Note : Make sure the above expression is executed after the external libraries are loaded.

0
votes

Use color code in Hexadecimal format like '#FFFFFF' like

dataLabels: {
    enabled: true,
    color: '#FFFFFF'
}

you can check demo here : http://jsfiddle.net/a2zm449L/

0
votes

dataLabels works only if we do not use drill down, if we use drill down in our chart then drilldown js overrides dataLabels configuration. Solution is you can use below configuration

drilldown: {
          activeAxisLabelStyle: {
            textDecoration: 'none',
            fontStyle: 'regular',
            color:'#ffffff'
          },
    }