globallogic
Posts: 34
Joined: Wed Jan 10, 2018 6:19 am

How to align columns with respect to the xAxis labels.

Hello,

I would like to know, How I can align column with respect to the xAxis label.
snap.PNG
snap.PNG (7.34 KiB) Viewed 3708 times
Also, You can find a sample example below.
https://jsfiddle.net/yogesh_paisode/wxsu743r/
rafalS
Posts: 2665
Joined: Thu Jun 14, 2018 11:40 am

Re: How to align columns with respect to the xAxis labels.

Hi, globallogic!

Thanks for contacting us. The answer to your question is simple but it can be done in many ways depending on your chart.

The fastest and simplest solution is to set pointPlacement property to "on":

https://jsfiddle.net/BlackLabel/u04gkf65/
But for some reasons, it is not working with big datetime points.

We can define our tickPosition manually like this: https://jsfiddle.net/BlackLabel/9gd8vcb5/
But the number of ticks will be equal to the number of points.

You can try these approaches and if you have any doubts or additional questions then feel free to ask.

API Reference: https://api.highcharts.com/highcharts/p ... tPlacement
https://api.highcharts.com/highcharts/x ... Positioner
https://api.highcharts.com/class-refere ... art#update

Kind regards,
Rafał
Rafal Sebestjanski,
Highcharts Team Lead
globallogic
Posts: 34
Joined: Wed Jan 10, 2018 6:19 am

Re: How to align columns with respect to the xAxis labels.

I tried using tickPosition, but still, columns are not landing properly.
snap.PNG
snap.PNG (10.63 KiB) Viewed 3699 times
rafalS
Posts: 2665
Joined: Thu Jun 14, 2018 11:40 am

Re: How to align columns with respect to the xAxis labels.

Hi again, globallogic!

Do you have any specific question? If you would like me to help you, you would have to show me some of your approaches (I mean your code I could work on), then I could solve your issues.

I told you that it can be done in many ways depending on your chart, your data and what exactly you want to achieve. But you need to give me more information. It would be the best if you put your code onto jsFiddle.

Rafał
Rafal Sebestjanski,
Highcharts Team Lead
globallogic
Posts: 34
Joined: Wed Jan 10, 2018 6:19 am

Re: How to align columns with respect to the xAxis labels.

Hii,
The issue is solved using tickPosition.
Thank you for your support.
rafalS
Posts: 2665
Joined: Thu Jun 14, 2018 11:40 am

Re: How to align columns with respect to the xAxis labels.

You're welcome ;)
Rafal Sebestjanski,
Highcharts Team Lead

Return to “Highcharts Usage”