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

xAxis timeline label

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: 47
Joined: Fri May 06, 2022 7:28 am

Re: xAxis timeline label

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: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: xAxis timeline label

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: 47
Joined: Fri May 06, 2022 7:28 am

Re: xAxis timeline label

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: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: xAxis timeline label

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: 47
Joined: Fri May 06, 2022 7:28 am

Re: xAxis timeline label

Hello, thanks for the answer.
I managed to found my own answer.
That's what i was looking for :
Image
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: xAxis timeline label

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”