Niceley
Posts: 46
Joined: Fri May 06, 2022 7:28 am

xAxis timeline label

Fri May 20, 2022 8:20 am

Hello,
Is there any way to change the name / label of the xAxis of a timeline ? And it is possible to change the distance between the timeline and the xAxis ?

Image

Niceley
Posts: 46
Joined: Fri May 06, 2022 7:28 am

Re: xAxis timeline label

Fri May 20, 2022 9:23 am

Hello, i found the way to change the distance for the xAxis but i still didn't found how to change the label of the xAxis
Thanks in advance.

mateusz.b
Posts: 2007
Joined: Tue Jul 13, 2021 11:34 am

Re: xAxis timeline label

Sat May 21, 2022 1:31 am

Hi Niceley,

Thanks for contacting us with your question.

X axis' labels can be changed with formatter callback function.
Demo:https://jsfiddle.net/BlackLabel/8yav1scb/
API reference: https://api.highcharts.com/highcharts/x ... .formatter

Let me know if it was what you were looking for.
Regards!
Mateusz Bernacik
Highcharts Developer

Niceley
Posts: 46
Joined: Fri May 06, 2022 7:28 am

Re: xAxis timeline label

Tue May 24, 2022 8:55 am

Hello, thanks for the anwser.
I have a question about it :
Formatter change the whole xAxis label, is there any way to have custom labels for each data ? For exemple, in the demo to have First dog then Sputnik 1 .. etc

mateusz.b
Posts: 2007
Joined: Tue Jul 13, 2021 11:34 am

Re: xAxis timeline label

Tue May 24, 2022 5:04 pm

HI Niceley,

I need more detailed description or an illustraion of how exactly labels should look like. Behaviour described by you sounds exactly like default axis labels:
https://jsfiddle.net/BlackLabel/zbh24xgo/

Perhaps you want to use categories array? https://jsfiddle.net/BlackLabel/y4xhmuce/

Regards!
Mateusz Bernacik
Highcharts Developer

Niceley
Posts: 46
Joined: Fri May 06, 2022 7:28 am

Re: xAxis timeline label

Wed May 25, 2022 7:12 am

Hello, thanks for the answer.
I managed to found my own answer.
That's what i was looking for :
Image

mateusz.b
Posts: 2007
Joined: Tue Jul 13, 2021 11:34 am

Re: xAxis timeline label

Wed May 25, 2022 12:35 pm

Hi Niceley,

Glad to hear that you figured it out. In case of any further questions feel free to contact us again!

Regards!
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Usage”