jahnvi25
Posts: 194
Joined: Thu Oct 04, 2012 12:16 pm

cross style chart

Wed Jun 22, 2022 6:33 pm

i have requirement where i need to show chart which looks like attached image. (sample_cross)
i tried using type as 'coloredLine ' since i have red and green segment color and tried dot as dashStyle but what i got is shown in sample_dot..

is there a way to achieve whats in image sample_cross

i compared the values and they are matching..

Thanks
Attachments
sample_dot.png
this is what i am getting
sample_dot.png (33.18 KiB) Viewed 31 times
sample_cross.png
need my chart to look like this
sample_cross.png (32.95 KiB) Viewed 31 times

User avatar
michal.f
Posts: 536
Joined: Thu Aug 12, 2021 12:04 pm

Re: cross style chart

Thu Jun 23, 2022 4:57 pm

Hello,

Can you specify what exactly you mean?

Looking at this chart below, I would use the combination of these two charts (columnrange and markers-only) as two series for this. And for the second, he set up custom markers.

https://www.highcharts.com/demo/stock/columnrange
https://www.highcharts.com/demo/stock/markers-only

Best regards!
Michał Filipiec
Highcharts Developer

jahnvi25
Posts: 194
Joined: Thu Oct 04, 2012 12:16 pm

Re: cross style chart

Thu Jun 23, 2022 7:34 pm

sorry.. for confusion.. its common candlestick chart.. which is the base.. i am talking about red/green cross series on chart.. and yes marker would work.. but how can i change the color ? do i need separate series for red/green ?

User avatar
michal.f
Posts: 536
Joined: Thu Aug 12, 2021 12:04 pm

Re: cross style chart

Fri Jun 24, 2022 9:38 am

Hi,

You can set colors for a specific points.

Demo: https://jsfiddle.net/BlackLabel/dc4s8zek/
API: https://api.highcharts.com/highcharts/s ... data.color

Best regards!
Michał Filipiec
Highcharts Developer

jahnvi25
Posts: 194
Joined: Thu Oct 04, 2012 12:16 pm

Re: cross style chart

Fri Jun 24, 2022 5:43 pm

Thanks a lot for reply.. thats exactly i wanted..

Return to “Highcharts Stock”