Hi:
I would like to display just the year on my x axis of the line chart,
however, in my database table the date is stored as a full date. I
came across Scalar functions and it seems that year() function will
return what I am after. I keep getting an "cannot parse query" error.
Can someone point out my syntactical error? The column name is my
database that holds the date values is title "date".
function drawVisualization(name,year) {
//console.log("Inside drawVisualization
function: " + name);
google.visualization.drawChart({
"containerId": "chart_div",
"dataSourceUrl": 'http://www.google.com/
fusiontables/gvizdata?tq=',
"query": "SELECT
year(date),average_ground_water_level FROM 1974520 WHERE name = '" +
name + "'",
"chartType": "LineChart",
"options": {
"title": name,
"vAxis": { "title": "Average Daily
Groundwater Level - (M)" },
"hAxis": {
"title": "Year",
"showTextEvery":"0",
},
"width":"700px"
}
});
}
Thanks in advance,
Michael
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.