Hello,
I've tried to figure this out on my own, and was wondering if anyone could
shed any light on the bug that I'm seeing in my page. Last night when the
month changed, something odd happened to all the continuous graphs on my
page and I have a feeling it has to do with the date I'm passing to the
graph. I'm passing 24 hours of temperature data via JSON and declaring a
column of type "datetime" like so:
"temperatureHistory": [
[
{
"id": "Day",
"type": "datetime"
},
"T",
{
"role": "tooltip"
},
"DP",
{
"role": "tooltip"
},
"WC",
{
"role": "tooltip"
}
],
[
"Date(2015, 03, 31, 22, 00, 00)",
3.1,
"22:00 Temperature: 3.1°F",
-19.7,
"22:00 Dew Point: -19.7°F",
-23.6,
"22:00 Wind Chill: -23.6°F"
],
[
"Date(2015, 03, 31, 23, 00, 00)",
2.7,
"23:00 Temperature: 2.7°F",
-18,
"23:00 Dew Point: -18°F",
-24.3,
"23:00 Wind Chill: -24.3°F"
],
[
"Date(2015, 04, 01, 00, 00, 00)",
3.1,
"00:00 Temperature: 3.1°F",
-14.1,
"00:00 Dew Point: -14.1°F",
-23.6,
"00:00 Wind Chill: -23.6°F"
],
[
"Date(2015, 04, 01, 01, 00, 00)",
4,
"01:00 Temperature: 4°F",
-6.9,
"01:00 Dew Point: -6.9°F",
-22.3,
"01:00 Wind Chill: -22.3°F"
],
[
"Date(2015, 04, 01, 02, 00, 00)",
4.4,
"02:00 Temperature: 4.4°F",
-5.3,
"02:00 Dew Point: -5.3°F",
-21.9,
"02:00 Wind Chill: -21.9°F"
],
...
For some reason, my graph is not displaying properly. Since the data is 24
hours from start to end, I've had issues in the past with using a "time"
instead of a "datetime" label for the x-axis, and this issue seems to be
related. It seems like google visualization is ignoring the 'month' part
of the date and only interpreting the hours part of the date. The data is
currently displaying in such a way that everything before midnight is
graphed immediately after midnight. See below to see what the graph looks
like. The blue arrow represents that where that data should be located:
<https://lh3.googleusercontent.com/-pDVSueyD5mA/VRvkI1IN0JI/AAAAAAAAABE/4qMud2Lx3Zw/s1600/Capture.PNG>
You can find the graphs here: http://xmountwashington.appspot.com/csc.html
and the data is located
here: http://xmountwashington.appspot.com/csc.php?size=small
Please note that that server has a viewWindow that cuts data off data ( eg
the right axis is located) at the current time. The graph above is what is
seen if I get rid of this viewWindow.
Any thoughts on this? Have there been issues in the past with passing
date() data over JSON that spans more than one month? Is this date() data
being passed to the graphs correctly?
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.