Pierre_M

FusionTime - Timestamp duplicate in fusionDataStore.createDataTable(data, schema)

Recommended Posts

I use FusionTime for ploting time series and it works great but I noticed a bug with FusionTime recently.

As you can see in the attached screenshot, there is a shift in the plot after the 27th of october.

Looking more precisely, it appears that the probleme lays in the method fusionDataStore.createDataTable(data, schema).

My input data are :

const data = [
  ["2019-10-20", 1],
  ["2019-10-21", 2],
  ["2019-10-22", 3],
  ["2019-10-23", 4],
  ["2019-10-24", 5],
  ["2019-10-25", 6],
  ["2019-10-26", 7],
  ["2019-10-27", 8],
  ["2019-10-28", 9],
  ["2019-10-29", 10],
  ["2019-10-30", 11]
];

const schema = [
  {
    name: "Time",
    type: "date",
    format: "%Y-%m-%d"
  },
  {
    name: "Grocery Sales Value",
    type: "number"
  }
];

The result given by fusionDataStore.createDataTable(data, schema)._data is :

[
  [1571522400000, 1],
  [1571608800000, 2],
  [1571695200000, 3],
  [1571781600000, 4],
  [1571868000000, 5],
  [1571954400000, 6],
  [1572040800000, 7],
  [1572127200000, 8],
  [1572217200000, 9],
  [1572303600000, 10],
  [1572390000000, 11]
]

As you can notice, there is a duplicate in the timestamp 1572127200000.

A complete example of the problem is available in this sandbox : https://codesandbox.io/s/fusioncharts-timeserie-bug-example-4pbue?fontsize=14

Maybe a pb with summer/winter time ?

Thanks!

Capture d’écran de 2019-11-01 10-40-04.png

Share this post


Link to post
Share on other sites

Hi Pierre,

 

The FT chart in the provided codesandbox sample does not have a shift in the plot after the 27th of October. It is showing the tooltip correctly for the respective plots, you can check the below screenshot of your provided sample :

image.thumb.png.59eeb3a3931ee91c19c4b75019c5408d.png

Also there is no duplicate in the timestamp both the code and the sample provided.

 

Thanks,

Akash.

Share this post


Link to post
Share on other sites

Hello Akash,

Thank you for you answer.

It is weird because I tried the CodeSandBox on different computers but I still have the same problem. I also noticed the problem on the FusionCharts website (see screenshot enclosed).

On this example, the problem appears after the 26th of october 2014. This date is precisely the day of passing from "summer time" to "winter time" in Europe. This is why I believe the problem is linked to this ( https://en.wikipedia.org/wiki/Summer_time_in_Europe )

Is there something in the code that could explain the problem?

Thanks

Pierre

fusiontime.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now