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

Labels x from Zero hourly Steps

Wed Jan 25, 2023 4:46 pm

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 33 times

jakub.s
Posts: 99
Joined: Fri Dec 16, 2022 11:45 am

Re: Labels x from Zero hourly Steps

Thu Jan 26, 2023 12:47 pm

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

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

Re: Labels x from Zero hourly Steps

Tue Jan 31, 2023 12:58 pm

It works. Thanks a lot.

jakub.s
Posts: 99
Joined: Fri Dec 16, 2022 11:45 am

Re: Labels x from Zero hourly Steps

Tue Jan 31, 2023 1:09 pm

I'm glad it helped.

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

Best regards,
Jakub

Return to “Highcharts Usage”