score:0

you have to set datetimelabelformats.xaxis.list as a list of options since both the short format (w1) or long format (week 1) maybe used depending on the zoom level.

you also have to defined it twice (for the 2 rows of the headers) by settings xaxis as an array where the first element is the configuration for the bottom row and the second for the top row:

this.gantt = highchartsgantt.ganttchart('gantt', {
    // ...

    xaxis: [{
       // ...
       datetimelabelformats: {
         week: {
           list: [ 'semaine %w', 's%w' ]
         } as highcharts.axisdatetimelabelformatsoptionsobject
       }
    }, {
       datetimelabelformats: {
         week: {
           list: [ 'semaine %w', 's%w' ]
         } as highcharts.axisdatetimelabelformatsoptionsobject
       }
    }]

    // ...
});

and if you use typescript you'll have to cast the week property to highcharts.axisdatetimelabelformatsoptionsobject (i didn't find any proper typings for these specific gantt options).

references : https://api.highcharts.com/gantt/xaxis.datetimelabelformats https://www.highcharts.com/forum/viewtopic.php?t=43936#p155436

score:1

you can change the term "week" in datetimelabelformats:

xaxis: [{
    ...
}, {
    datetimelabelformats: {
        week: 'woche %w'
    }
}]

live demo: https://jsfiddle.net/blacklabel/vw7hjg64/

api reference: https://api.highcharts.com/gantt/xaxis.datetimelabelformats.week


Related Query

More Query from same tag