nilesh.nagdeve
Posts: 30
Joined: Wed Jun 29, 2022 2:16 pm

Reduce space between x-axis labels and bar in converted base64 string for high chart

Hi Team,

I am trying to reduce the space between the x-axis labels and bar as mentioned in screen shot.
I have tried to adjust the xAxis top (eg.110) value and y (eg.-90) but still labels are not getting adjusted to bar, there is huge gap is displaying in between those.
In attachment, I added UI screenshot and downloaded base64 image screen shot

UI Screenshot
UI Image.png
UI Image.png (12.1 KiB) Viewed 674 times
Generated Base64 image from UI
Base64 Image.png
Base64 Image.png (17.39 KiB) Viewed 674 times
Demo :
https://jsfiddle.net/nilesh_nagdeve007/cs6mL245/134/


Note : I am using angular framework , to generate base64 image from SVG, so commented code in jsfiddle link
kamil.m
Posts: 892
Joined: Thu May 19, 2022 1:33 pm

Re: Reduce space between x-axis labels and bar in converted base64 string for high chart

Hi there,

You just need to move your whole xAxis by using xAxis.offset property. Set it to -100 and it should be working just fine!

DEMO: https://jsfiddle.net/BlackLabel/d2z7k0qm/

Do not hesitate to contact us with any further questions,
Have a good day!
Kamil Musiałowski
Highcharts Developer

Return to “Highcharts Usage”