erwan
Posts: 11
Joined: Fri Nov 27, 2020 7:26 am

Week: monday to friday. Possible ?

Hi all,

Is it possible to have displaying weeks with days from monday to friday only in the gantt chart?
We don't use saturday & sunday.
I cannot find information on this subject in the documentation.

Erwan
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: Week: monday to friday. Possible ?

Hi,

We appreciate you reaching out to us again.

Generally speaking, the default for Highchart is UTC, which is converted according to the given data, there is no literal function to exclude weekends.
Kind of like xAxis.startOfWeek where you can choose what day the week should start with, but there is another way that might work for your goals.

You can use xAxis.breaks to hide weekends on the chart, you need to load extra modules (https://code.highcharts.com/modules/broken-axis.js).
Below you can find an example of how to use breaks, but you can also create a function that would insert a break in every weekend.

Live demo:
https://jsfiddle.net/BlackLabel/h9nxf3e4/

API References:
https://api.highcharts.com/gantt/xAxis.breaks
https://api.highcharts.com/gantt/xAxis.startOfWeek

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

Return to “Highcharts Gantt”