1) I want each date to be displayed only once. But every value for the
x-axis is being displayed.
I am getting json data from php file through ajax call.
this is my data
[["Timestamp","Cpu","Hstatus","Free"],["05-03",0.6,1,0],["05-03",0.9,1,0],["05-03",0.1,1,0],["05-03",0.6,1,0.849],["05-03",0.4,1,0],["05-03",0.23,1,0],["06-03",0.45,1,0.34],["06-03",0.81,1,3.45],["07-03",0.65,1,0.34],["07-03",0.35,1,0.34],["07-03",0.81,1,3.45],["07-03",0.21,1,3.45]]
//to draw the chart
function drawChart(response) {
var data = google.visualization.arrayToDataTable(response);
var options = {
title: 'Host 1', colors:['blue','green','red',],
chartArea:{left:40,top:25,width:450,height:200},
height:270,
};
var chart = new google.visualization.LineChart(
document.getElementById('graph1'));
chart.draw(data, options);
}
is there a way to display each date only once?
2) I tried to do this with annotation timeline too but it always says date
format wrong.
in my php code i do this
$a= date('Y,m,d',strtotime($row['Timestamp']);
$temp[] = ( $a);
the error is:Uncaught Error: Type mismatch. Value 2014,03,05 does not match
type date in column index 0
--
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.
<<attachment: ggraph.png>>
