I plot very simple data from a JSON file: I need help format my x-date-axis. I don't know how to specify the date format from the JSON-File for d3.js. I tried the following:
var parseDate = d3.time.format("%Y%m%d").parse;
The JSON data looks like this:
var data = [
{"mytime": 20150801, "tt": 17.0},
{"mytime": 20150802, "tt": 17.6},
];
The result on the x-axis is not as expected. Find my fiddle here: https://jsfiddle.net/1m1qm6pv/1/
Problem i think is this:
data.forEach(function(d) {
d.mytime = parseDate(d.mytime);
});
With these 3 lines of code it doesn't work.