The DataLabels object itself has a setColor method which can be used to set a custom color instead of using the default. I tested it using the code from Basic Column Example from the Showcase Application.
The color "#2f7ed8" came from the list of default colors that Highcharts uses. Since I was applying it to the first series, I was able to set the color of the DataLabels to use the first color from the list. (Here)[http://api.highcharts.com/highcharts#colors] are the default colors that I am referring to.
If you are using custom colors for your columns, you should be able to use it similarly by setting the color of the DataLabels to the same color you are using for the columns.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I would like to know how to make the dataLabel color the same as the its bar, I only found a way to set a color that will be applied for both.
I also tried to adding some logic in the DataLabelsFormatter but it doesn't work.
first attempt:
second attempt:
none of them worked...
here's an example in JS of what I'm trying to accomplish: http://jsfiddle.net/Pujrw/
Last edit: Gustavo Matias 2013-08-15
The DataLabels object itself has a setColor method which can be used to set a custom color instead of using the default. I tested it using the code from Basic Column Example from the Showcase Application.
The color "#2f7ed8" came from the list of default colors that Highcharts uses. Since I was applying it to the first series, I was able to set the color of the DataLabels to use the first color from the list. (Here)[http://api.highcharts.com/highcharts#colors] are the default colors that I am referring to.
If you are using custom colors for your columns, you should be able to use it similarly by setting the color of the DataLabels to the same color you are using for the columns.