Hi,
When i tried to show the data in a chart, i am getting the below error. Can
anyone help me why it is not converting the date "*2018-04-01 00:00:53*"?
*Type mismatch. Value 2018-04-01 00:00:53 does not match type date in
column index*
And my code is
var dataTable = new google.visualization.DataTable();
dataTable.addColumn('string','stock');
dataTable.addColumn('date','Time');
dataTable.addColumn('number','price');
var json=$.parseJSON( jsonData);
for (var i=0;i<json.length;i++) {
delete json[i].id;
delete json[i].LastTradePrice;
delete json[i].Min24hrs;
delete json[i].LowestAsk;
delete json[i].Max24hrs;
delete json[i].HighestBid;
var row = [];
for (var item in json[i]) {
row.push(json[i][item]);
}
dataTable.addRow(row);
}
var data =google.visualization.Table(dataTable,true);
var chart = new
google.visualization.CandlestickChart(document.getElementById('chart'));
chart.draw(data, {width: 400, height: 240});
--
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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-visualization-api/5f65fc8f-ad6a-4544-838b-a536fe5bddda%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.