Reputation: 169
In my stacked bar highchart you will see that I have set my last series to the color grey. Is there any way to set the text color to black where the series background color is grey?
plotOptions: {
series: {
stacking: 'percent',
},
bar: {
stacking: 'percent',
dataLabels: {
enabled: true,
format: '{y}%',
style: {
color: '#ffffff' //This is where i set the color to white
}
}
}
}
http://jsfiddle.net/jimbob25/V446C/
Upvotes: 2
Views: 1813
Reputation: 45079
You can set color for each series separately, see: http://jsfiddle.net/V446C/5/
series: [{
name: 'Poor',
color: '#E9E9E9',
data: [12, 23, 13, 18, 7, 19, 9],
dataLabels: {
style: {
color: '#000000'
}
}
}, {
name: 'Satisfactory',
color: '#629AC0',
data: [42, 45, 35, 57, 29, 61, 26]
}, {
name: 'Excellent',
color: '#006FBC',
data: [46, 32, 52, 25, 64, 20, 65]
}]
Upvotes: 4