问题
Title of this questions says everything. I only found out how to change the color of connectors. If I delete the color:
option, they´re all grey. I tried to put in the field with stored colors in hex, with no result, stayed black.
回答1:
In dataLabels.formatter
you have access to this.point.color
. So simple set useHTML: true
for dataLabels, and create spans with specified colors.
回答2:
the formatter function gives you a callback object, which has a color property that can be set with the color of your choice
formatter: (format) ->
format.color = @point.color
来源:https://stackoverflow.com/questions/14872718/highcharts-color-of-label-according-to-the-color-of-pie-slice