dansan
Posts: 23
Joined: Mon Nov 28, 2022 2:23 pm

Add spacing left/right of navigator?

Hello,

By default the navigator is about as wide as the chart, but I find it hard to use the handles on a phone because they are too close to the edges of the screen.
I don't want to add spacing to the whole chart, so I was wondering if there was a way to add for example 10px spacing to the navigator on both sides?
jakub.j
Posts: 1091
Joined: Tue Jan 24, 2023 11:14 am

Re: Add spacing left/right of navigator?

Thanks for contacting us with your question!

You can manipulate navigator position and width using navigator.xAxis.left and navigator.xAxis.width. I set the width to 90% and left to 5% so that it has a padding of 5% on each side, see demo:

Demo: https://jsfiddle.net/BlackLabel/wq150L4s/

Feel free to ask any further questions!
Best regards
Jakub
dansan
Posts: 23
Joined: Mon Nov 28, 2022 2:23 pm

Re: Add spacing left/right of navigator?

Thanks, you guys are awesome! :)
jakub.j
Posts: 1091
Joined: Tue Jan 24, 2023 11:14 am

Re: Add spacing left/right of navigator?

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

Regards
Jakub

Return to “Highcharts Stock”