wilsonneto
Posts: 2
Joined: Thu Feb 25, 2021 2:37 pm

Problem with zoom in to weekdays

I dont understand why I can't zoom in to weekdays in this chart. What i'm doing wrong?

https://jsfiddle.net/netocamargo/oz6cLj7x/10/

I'm trying to use a gantt chart to control a timeline of activities.

Hope can you help me.
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: Problem with zoom in to weekdays

Hi,
Welcome to our forum and thanks for contacting us with your question!

There is a problem with the date you are uploading to the series, I changed it and now the days of the week are visible.

Below is an example from which I took the data:
https://jsfiddle.net/gh/get/library/pur ... o/subtasks

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

Let me know how are you going with this.
Best regards.
Sebastian Hajdus
Highcharts Developer
wilsonneto
Posts: 2
Joined: Thu Feb 25, 2021 2:37 pm

Re: Problem with zoom in to weekdays

Can you tell me more about whats wrong with the dates ? I can't see what im doing wrong.
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: Problem with zoom in to weekdays

Hi,
Thanks for your message.

In your data you don't use this part of code, you need to calculate your date like this:

Code: Select all

var today = new Date(),
  day = 1000 * 60 * 60 * 24;

// Set to 00:00:00:000 today
today.setUTCHours(0);
today.setUTCMinutes(0);
today.setUTCSeconds(0);
today.setUTCMilliseconds(0);

Generally, intervals are calculated automatically, but you have the possibility to set the tickInterval to adjust your own interval.
https://jsfiddle.net/BlackLabel/Lfjgqmhy/
https://api.highcharts.com/gantt/xAxis.tickInterval

Best regards.
Sebastian Hajdus
Highcharts Developer

Return to “Highcharts Gantt”