Ok Daniel, I got now:
[[6,"Date(2017, 11, 05)"],[6,"Date(2017, 10, 30)"],[7,"Date(2017, 10,
29)"],[9,"Date(2017, 10, 28)"],[5,"Date(2017, 10, 27)"]]
Now is error
Uncaught (in promise) Error: Type mismatch. Value date(2017, 11, 05) does
not match type date in column index 1.
In html I have:
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('number', 'ph');
data.addColumn('date', 'date'); // maybe is here mistake???
var jsonData = $.ajax({
url: "getData2.php",
dataType: "json",
async: false
}).responseText;
var obj = JSON.parse(jsonData);
data.addRows(obj);
var options = {
title:'pH vrijednost zadnjih 5 mjerenja',
width: 1000, height: 300,
hAxis: {
title:'datum'
},
vAxis: {
title: 'pH'
},
};
var chart = new
google.visualization.LineChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
Do I need some hAxis { format:'some rule like Y/mm/dd' ....
--
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/34918671-8507-415c-95bc-e6e290026287%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.