ChandraBhushan25
Posts: 3
Joined: Tue Oct 26, 2021 11:54 am

Dual Axis Charts are overlapping

Hi,

I am trying to plot two metrics with different units on dual-axis but plotted charts seem to overlap with each other.

The first plotted metric is getting hidden under the second plot and I can't see both of them.

Attaching jsfiddle link here, can you please help me to resolve this?

Thanks in Advance.

https://jsfiddle.net/ChandraBhushan25/0mc8xwq1/18/
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Dual Axis Charts are overlapping

Hello ChandraBhushan25,

Welcome to our forum and thanks for contacting us with your question!

Could you tell me how would you like the chart to look like? At this moment there is nothing really wrong with the way the chart is drawn. Sure, I can tell that one series is not visible because colors are solid and they simply overlap with each other. I think adding opacity here could help or maybe you should think about different way of showing relation between that data.

Any additional details about expected results would be greatly appreciated here.

Best regards!
Mateusz Bernacik
Highcharts Developer
ChandraBhushan25
Posts: 3
Joined: Tue Oct 26, 2021 11:54 am

Re: Dual Axis Charts are overlapping

Thanks for looking into it.

Attaching a screenshot here to show how I am expecting the chart to plot without overlapping.

In the attached chart right Y-Axis has a percentage factor of 40 that's why it's able to plot percentage 10 at the bottom but in my case both
left and right Y-Axis plot top border are coming at same line hence the overlap.

Dual_Axis_Working_chart.png
Dual_Axis_Working_chart.png (20.72 KiB) Viewed 355 times
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Dual Axis Charts are overlapping

ChandraBhushan25,

I have slightly changed percentage axis settings adding these two options:

Code: Select all

{
			"min": 0,
			"max": 100,
			...
}
Since it is percentage axis these options should make sure that it scales properly with the second axis. At the same time it fixed overlaping issue.
Demo: https://jsfiddle.net/BlackLabel/5n49uek2/

Let me know if that was what you were looking for!
Best regards!
Mateusz Bernacik
Highcharts Developer
ChandraBhushan25
Posts: 3
Joined: Tue Oct 26, 2021 11:54 am

Re: Dual Axis Charts are overlapping

Thanks mateusz for the help, it works as expected now.
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Dual Axis Charts are overlapping

You're welcome! In case of any further questions, feel free to contact us again.
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Usage”