DhanashriSakh
Posts: 42
Joined: Mon Jun 13, 2022 11:40 am

How To ailgn 0 yaxis value in same row in Dual axis

https://ibb.co/LgLVtxL

As per the image i am using dual axis but 0 is not in same line , i need the both 0 value in yAxis should be in same row.

http://jsfiddle.net/ep91dxhm/2/

I tried adding with linkedTo property in yaxis but showing all same values on both side as per the 1st Yaxis values.
Please help me to adjust same row for 0 value without changing the axis another values.

Thank You.
kamil.m
Posts: 892
Joined: Thu May 19, 2022 1:33 pm

Re: How To ailgn 0 yaxis value in same row in Dual axis

Hello there,

Thank you for contacting us!

It would be easier to tell you what's not working if you would reproduce the code that is used in the screenshot, but I guess that you might be looking for the xAxis.alignTicks property.

API Reference: https://api.highcharts.com/highcharts/yAxis.alignTicks

Let me know if that has solved the issue,
Best regards!
Kamil Musiałowski
Highcharts Developer
DhanashriSakh
Posts: 42
Joined: Mon Jun 13, 2022 11:40 am

Re: How To ailgn 0 yaxis value in same row in Dual axis

Thank you For Replying Kamil,

https://ibb.co/LgLVtxL

I want to align 0 value in same row(Line) in dual Yaxis without changing all other values as image shows.

As per image Zero value is not in same line i want it in same row(Line).
kamil.m
Posts: 892
Joined: Thu May 19, 2022 1:33 pm

Re: How To ailgn 0 yaxis value in same row in Dual axis

You're welcome!

Please reproduce your chart in an online editor (like JSFiddle), so that I can prepare a solution directly for your use case.

Regards!
Kamil Musiałowski
Highcharts Developer
DhanashriSakh
Posts: 42
Joined: Mon Jun 13, 2022 11:40 am

Re: How To ailgn 0 yaxis value in same row in Dual axis

http://jsfiddle.net/4w5j96vf/2/

In this Js fiddle 0 is not in same line, but both axis having different values but Zero value should be in same Line.
DhanashriSakh
Posts: 42
Joined: Mon Jun 13, 2022 11:40 am

Re: How To ailgn 0 yaxis value in same row in Dual axis

Hello Kamil Do you have any solution for above the jsFiddle senario.
kamil.m
Posts: 892
Joined: Thu May 19, 2022 1:33 pm

Re: How To ailgn 0 yaxis value in same row in Dual axis

In this case, I'd suggest setting the min and max values on both axes to the same value.

DEMO: http://jsfiddle.net/BlackLabel/wa76fdq5/

Let me know if that's what you were looking for,
Best regards!
Kamil Musiałowski
Highcharts Developer
DhanashriSakh
Posts: 42
Joined: Mon Jun 13, 2022 11:40 am

Re: How To ailgn 0 yaxis value in same row in Dual axis

Hello Kamil,

Sorry for late reply , But i was trying to solve the problem with your solution but it is not working , I need to maintain the zero'th tick position while at the same time having different axis extremens. I just need 0th tick to be at same pixel height as equivalent to primary axis, other parameters of the secondary axis like tick interval and min max should remain the same.

So please help me if you get any solution for this.

http://jsfiddle.net/4w5j96vf/2/
kamil.m
Posts: 892
Joined: Thu May 19, 2022 1:33 pm

Re: How To ailgn 0 yaxis value in same row in Dual axis

Hello there,

Thank you for the reply.

If you don't want to set the axes min/max, then it won't be that easy to achieve it with our API. But it is possible! Please take a look at the topic with the exact same question that you have. You will find some solutions there: viewtopic.php?t=41531

Best regards!
Kamil Musiałowski
Highcharts Developer

Return to “Highcharts Stock”