3

Possible Duplicate:
Highstock/Highchart cannot set Individual Point color

Currently use the addPoint function to update the highcharts graph, certain points need to be highlighted/different color... I can't find a method to do this in the api reference, is it possible?

//exampleA - Series arrayId
//exampleB - Point value 
//exampleC when not null would has extra tooltip info, these points need to be a different color.

addPoint: function(exampleA, exampleB, exampleC) 
{
    mcjs.chart.series[exampleA].addPoint({ y: exampleB, exampleC });
}
Community
  • 1
  • 1
Adrian
  • 353
  • 2
  • 7
  • 20

2 Answers2

5

Yes, it is possible.

You have the change the fillColor attribute inside the Marker inside the Data Attribute.

The color attribute inside data did not worked for me.

If you want the a green dot, you can look at this example I made.

Felipe Fonseca
  • 1,129
  • 9
  • 18
2

Yes - color is an option in the options object you are passing to addPoint. Here's the API refernence for addPoint, and here's the description of the options available to you.

Your code should end up looking more or less like this, if you say wanted a green point -

mcjs.chart.series[exampleA].addPoint({ fillColor: "#659355", y: exampleB, exampleC });

Right now though the object you're passing doesn't quite look valid - you need to match a key to each value; exampleC has no key.

Bubbles
  • 3,795
  • 1
  • 24
  • 25