Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Highchart data series filled with different colors

I need to figure out how to color the same data series points with different colors in Highcharts. For example, let's say I have a data series for several days and I would like to have a line graph. In this line specific days should be distinguish (maybe colored by some color).

like image 385
whiteErru Avatar asked Jul 10 '12 15:07

whiteErru


2 Answers

In your data, you can specify the color of the specific points:

data: [{
    name: 'Point 1',
    color: '#00FF00',
    y: 0
}, {
    name: 'Point 2',
    color: '#FF00FF',
    y: 5
}]

For line charts, use "fill color", as explained in the answer below.

For an example in jsFiddle, see http://jsfiddle.net/xqWp5/1/

like image 156
The Jakester Avatar answered Oct 06 '22 00:10

The Jakester


Try using the fillColor property:

{
    name: 'xyz',
    x: 123,
    y: 456,
    fillColor: '#00FF00'
}
like image 33
Ruchit Rami Avatar answered Oct 06 '22 02:10

Ruchit Rami