senseinvader
Posts: 2
Joined: Tue Mar 28, 2023 5:37 pm

Problem with first day of the next month

Hi, Team!

I am facing a problem/bug - when a time range selected, which covers switching months (like 2/26/23 to 3/2/23), in such case the 1st is always displayed as if it belongs to the previous month. So in the above example, the 1st of March will be displayed as 2/01/23 instead of 3/01/23. Other days are displayed correctly.
We are passing into the highchart config values of currentMin and currentMax, as unix timestamps in UTC.

Can you tell if this is a somewhat known issue? And if it is possible to fix it?
jakub.s
Posts: 1164
Joined: Fri Dec 16, 2022 11:45 am

Re: Problem with first day of the next month

Hi,

Welcome to our forum & thanks for the question!

Could you please send me a demo of this issue? Only then will I be able to help.

Here's a demo with UTC dates where everything seems to work correctly: https://jsfiddle.net/BlackLabel/fky3049o/

Best regards,
Jakub
Jakub
Highcharts Developer
senseinvader
Posts: 2
Joined: Tue Mar 28, 2023 5:37 pm

Re: Problem with first day of the next month

Hi, Jakub!

Thank you for the response. Here you can see screenshots demonstrating the issue:
https://docs.google.com/document/d/1hxr ... sp=sharing

We pass start and end timestamps in unixtime format to the config object like this:

Code: Select all

config: {
	…,
        xAxis: 
        ​​{
            "type": "datetime",
            "showLastLabel": true,
            "minTickInterval": 60000,
            "currentMin": 1680089364600,
            "currentMax": 1680092975400
        },
        …
}
I assume that date stamps are generated by the library
jakub.s
Posts: 1164
Joined: Fri Dec 16, 2022 11:45 am

Re: Problem with first day of the next month

Hi, thanks!

I've tried, but unfortunately, I'm not able to reproduce this issue in my demo.

I passed this config and everything seems to work fine: https://jsfiddle.net/BlackLabel/bqvu2onj/

I'm afraid that this part of the config that you've sent does not cause this error. Could you please send me a full demo of this in an online code editor like JSFiddle?

It probably has to do with something in other parts of your chart config.

Best regards,
Jakub
Jakub
Highcharts Developer

Return to “Highcharts Usage”