rowan.bradley
Posts: 33
Joined: Tue Oct 16, 2018 5:01 pm

Controlling point symbol

If I am plotting a line graph, with just straight line segments between each point, can I control the symbol used for each point (e.g. to have a circle for some points and a square for others)? How do I do this? What do I need to put in my JSON data? My use case is that I am displaying data about a series of events against a date axis, The events come in two types. I would like all of the events to be on one line, but events of type 1 to be marked with a circle, and events of type 2 to be marked with a square.

Thanks - Rowan
rafalS
Posts: 2665
Joined: Thu Jun 14, 2018 11:40 am

Re: Controlling point symbol

Hello again, Rowan!

Take a look at this demo: https://jsfiddle.net/BlackLabel/8y7bv4rd/
It shows how to get some JSON data and how to control every point's color and symbol.

API Reference:
markers: https://api.highcharts.com/highstock/series.line.marker
data: https://api.highcharts.com/highstock/series.line.data

Best regards!
Rafal Sebestjanski,
Highcharts Team Lead
rowan.bradley
Posts: 33
Joined: Tue Oct 16, 2018 5:01 pm

Re: Controlling point symbol

Rafal,

Thanks for your helpful reply. I think I've nearly understood enough to get my graph working now!

Thanks - Rowan
rowan.bradley
Posts: 33
Joined: Tue Oct 16, 2018 5:01 pm

Re: Controlling point symbol

Yes, the symbols are now displaying correctly, and I can control the size of them too. Just the job.

Thanks for your help - Rowan
rafalS
Posts: 2665
Joined: Thu Jun 14, 2018 11:40 am

Re: Controlling point symbol

You're welcome, Rowan.
Rafal Sebestjanski,
Highcharts Team Lead

Return to “Highcharts Stock”