troycarz
Posts: 17
Joined: Fri May 28, 2021 12:03 pm

Match a compare percent y axis [left] to the price y axis [right]

Hi this is my first post, sorry If I haven't followed any procedures and I'm pretty novice at HC so please bear with me, i'll try my best to outline my problem.

Problem:
I want to be able to have a compare percent left y axis and price right y axis.

Workaround:
I've managed to get it to add 2 candlestick series, 1 for price and 1 for percent compare and assigned the each to their own y Axis, to achieve this result.
https://ibb.co/VwTPW9T
Tried my best to replicate the code, but it's not overlapping here in the jsfiddle example for some reason.. https://jsfiddle.net/5zrhc80a/11/

While this works perfectly fine on my codebase, the real problem starts when I start adding other series like bb's
https://ibb.co/rwhcZwL

As you can see, the scaling starts messing up. I am not sure if my workaround is the right way to approach this problem. I've also tried adding the data to bb series instead of using linkedTo but then the params stop working.. i've noticed this happening to other series as well, the params only work when linkedTo is used for some reason.

I hope this helps, please let me know if i can provide any other info

Thanks
Troy
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: Match a compare percent y axis [left] to the price y axis [right]

Hi,
Thanks for contacting us with your question!

At this example with multiple series is using plotOptions.series.compare, I think this can help you match the data value with the percentages.
https://api.highcharts.com/highstock/pl ... es.compare

Live demo
https://jsfiddle.net/BlackLabel/6k7sLg84/

Let me know how are you doing with this.
Best regards.
Sebastian Hajdus
Highcharts Developer
troycarz
Posts: 17
Joined: Fri May 28, 2021 12:03 pm

Re: Match a compare percent y axis [left] to the price y axis [right]

Hi sebastian.b,
Thank you for replying,

Please check this jsfiddle, when you zoom in you can notice how the 2 candlesticks are not overlapping when they should be.
https://jsfiddle.net/xqc1udL3/1/


This starts happening when I add different indicators like bollinger bands or MAs


here is an example with nothing enabled, as you can see the overlapping works just fine in this.
https://jsfiddle.net/du8jaLr3/6/
Attachments
Capture.PNG
Capture.PNG (64.54 KiB) Viewed 1034 times
troycarz
Posts: 17
Joined: Fri May 28, 2021 12:03 pm

Re: Match a compare percent y axis [left] to the price y axis [right]

Issue has been resolved!
Thank you for the help sebastian.h!

For anyone else looking for this in the future, please refer to this:
https://github.com/highcharts/highcharts/issues/15821
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: Match a compare percent y axis [left] to the price y axis [right]

Hi,
That's great to hear that you find a solution.

In case of any further questions, feel free to contact us again.
Regards.
Sebastian Hajdus
Highcharts Developer

Return to “Highcharts Stock”