Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

amcharts showing incorrect date value in category axis which is not present in dataProvider

I am plotting area chart using amcharts, the x-axis data date values range from 08/01/2014 to 08/30/2014. But the graph displaying the x-axis values from 07/31/2014 onwards. This issue is found only in latest version of windows Firefox and chrome. Attaching the screen shot of the graph plotted and the dataProvider values below.

dataProvider = [{ "value": 0, "date": "2014-08-01" }, { "value": 17 "date": "2014-08-02" }, { "value": 24 "date": "2014-08-03" }, { "value": 26 "date": "2014-08-04" }, .... ] Plotted chart

How could I solve this? Any help would be appreciated. Thanks in advance.

like image 871
Shinoj Avatar asked Sep 17 '14 14:09

Shinoj


1 Answers

I updated your fiddle here:

The issue is the TIMEZONE. Amcharts appears to be taking the given time as UTC and converting back to your local time.

In the fiddle I modified the first few data points to

2014-08-01T10:00:01 

next to 8AM next to 7AM (I am in California) and voila! date appears as expected in the balloons.

like image 76
Dinesh Avatar answered Oct 20 '22 17:10

Dinesh