Apex chart show the wrong datetime

Hi, I've downloaded the ApexChart modules from kyvis-labs. It looks great!

But for some reason it modifies my timestamp 2 hours wrong. The dataset is correct and it interprets the data with an exact 2 hours lag. I have searched and searched what could cause this issue but haven't found a solution. Any Ideas?
It shows correct in a normal Powerchart.

1 Like

Your screenshot doesn't help much. You have shown two different dataset plots and the Dataset Editor y-value is constant 4200. You haven't demonstrated the problem.

You are certinly right, It was not too obvious. But I don't know how I can make it more clear. At the picture below the data set has a timestamp from 28-11-2023 15:52:39 -> 28-11-2023 16:52:03. The dataset contains 119 datapoints. The apex chart interprets the timestamp time to be 13:52 -> 15:52. Which I have no clue on why.

The exact two hour difference makes me suspect a time zone issue. Is the time zone in the project properties set to something different from the time zone of the data's source?

EDIT: I ran into a similar issue when I was storing data manually. Our local data was being stored to the database in UTC. When retrieved in Perspective, Ignition assumed the data was in the gateway time zone (PT) and converted the timestamps from PT to local time. Of course, this resulted in all the timestamps being off by the PT offset.

EDIT 2: I just saw you said it works in a regular powerchart, so it's probably not the project time zone setting. I'm still thinking time zone shenanigans of some sort, but I'm not familiar enough with ApexChart to suggest where this might be happening.

Found it finally, thank you Felipe for giving me Ideas to look for.
After googling around a bit more, I found out that it apparently convert it to UTC time by standard. Looking into the documentation I found the option to change it to false. https://apexcharts.com/docs/options/xaxis/

After changing it to false it used the local timezone set in the project and database.

2 Likes

thanks brother, You saved me

1 Like

@Edvard_Wilhelms how did you add Apexcharts in Ignition?

1 Like