christian_its
Posts: 5
Joined: Thu Jan 11, 2018 11:32 am

Labels x from Zero hourly Steps

Hello together,

is it possible to show the labels from a defined point (time)? Example 09:16:00 not 09:00:00?

My second question is, how i can label a time as 0 and then show the labels as -3, -2, -1, 0, 1, 2, 4 .... in hourly steps?
I have an image attached.

thanks,
Christian
Attachments
highcharts.jpg
highcharts.jpg (72.33 KiB) Viewed 143 times
jakub.s
Posts: 1229
Joined: Fri Dec 16, 2022 11:45 am

Re: Labels x from Zero hourly Steps

Hi,

Thanks for the question.

Take a look at this demo: https://jsfiddle.net/BlackLabel/cuq85yen/

It should give you an overview of how you can solve your problem.

With:
- xAxis.tickPositioner or xAxis.tickInterval
- xAxis.min
- xAxis.labels.formatter
you will be able to achieve this result easily.

API: https://api.highcharts.com/highcharts/xAxis

Let me know if that helps.

Best regards,
Jakub
Jakub
Highcharts Developer
christian_its
Posts: 5
Joined: Thu Jan 11, 2018 11:32 am

Re: Labels x from Zero hourly Steps

It works. Thanks a lot.
jakub.s
Posts: 1229
Joined: Fri Dec 16, 2022 11:45 am

Re: Labels x from Zero hourly Steps

I'm glad it helped.

Do not hesitate to let me know if you have any more questions.

Best regards,
Jakub
Jakub
Highcharts Developer

Return to “Highcharts Usage”