I hope y'all can help me. I am stuck trying to make a bar chart with a time series using D3 and a JSON file. My JSON file is structured like so:
{
"ProjectCode": "PRJ2.1",
"numberOfSchools": 1188,
"newSchools": 0,
"date": 2011-12
},
The y axis is supposed to show the numberOfSchools whilst the x axis is supposed to show the years passed. I used a combination of a time scale and ordinal scale for the x axis and parsed the date as so:
data.forEach(function(d) {
d.date = parseDate(d.date.toString());
d.numberOfSchools = +d.numberOfSchools;
});
I'm guessing the JSON file is not being parsed properly and have tried the solutions here and here with no luck. I'm using D3.v3. and below is my JSFiddle