Posts: 5
Joined: Fri Jan 22, 2021 12:24 pm

Custom xAxis Labels for Highcharts

Tue May 04, 2021 4:32 pm

Hello everyone,

Thank you for the amazing assistance. I would like to create the following Gantt chart but instead of 2021, 2022, 2023. I would like to have Year 1, Year 2, Year 3.

Is it possible to do it. This is my project I have tried formatter but with no success

User avatar
Posts: 1098
Joined: Fri Aug 07, 2020 7:08 am

Re: Custom xAxis Labels for Highcharts

Wed May 05, 2021 10:40 am

Thanks for contacting us.

It's possible to add custom value in the label on the xaxis, you need to get to the function in xAxis.labels.formatter().

Code: Select all

    labels: {
      formatter() {
        return ' year'


API References:

Let me know if was that what you were looking for.
Best regards.
Sebastian Hajdus
Highcharts Developer

Return to “Highcharts Gantt”