NicoMfromL
Posts: 4
Joined: Fri Aug 13, 2021 8:35 am

Width (xRange)

Hello,

Thanks for reading this message and for your help.
I am unable to increase the width of the bands of the graph xrange so that they touch each other :

Image

But I have resizable charts (one spline and one xrange)... Someone can help me please ?
Best regards, Nicolas
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Width (xRange)

Hello NicoMfromL,

Thanks for contacting us with your question.

I'm not sure if I understood your question correctly. Would be great if you could explain what do you mean by 'width of the bands of the graph xrange'. If you want to make xrange points thicker, you could use pointWidth API option.
Demo: https://jsfiddle.net/BlackLabel/27u498jz/
API reference: https://api.highcharts.com/highcharts/s ... pointWidth

If that was not the case, then please try to elaborate a bit more and preferably include some images.

Best regards!
Mateusz Bernacik
Highcharts Developer
NicoMfromL
Posts: 4
Joined: Fri Aug 13, 2021 8:35 am

Re: Width (xRange)

Hello mateusz.b,

Thank you for your answer, sorry my question is not clear.
It was exactly what i was looking for.
I was using 'lineWidth'...

But considering the fact that the heigth of the xRange part is resizable, the xRange lines overlap if it is narrow, and they don't touch each other anymore if the height is too big. Is it possible to enter a proportionnal width and not just a number ?

Image

Best regards,
Nicolas
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Width (xRange)

Hi NicoMfromL,

There is actually a better way to achieve such result than pointWidth option in this case. Because you want not only to adjust the point thicnkess, but also make sure that the points are touching, you should probably use pointPadding and groupPadding and set both values to 0.
Demo: https://jsfiddle.net/BlackLabel/jrc7z3v6/
API reference: https://api.highcharts.com/highcharts/s ... intPadding,
https://api.highcharts.com/highcharts/s ... oupPadding

FYI, you cannot combine pointPadding with pointWidth, these options work exclusively.

Let me know if this solution is satisfactory for you.
Best regards!
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Stock”