Closed jamesleesaunders closed 6 years ago
In the code o the article changing this:
// Convert csv to d3-ez data format
data = [{
key: "Total Price",
values: []
}];
d3.map(csv).values().forEach(function(d) {
data[0].values.push({
key: dateConvert(d.InvoiceDate),
value: d.Total
});
});
to:
// Convert csv to d3-ez data format
data = [{
key: "Total Price",
values: []
}];
d3.map(csv).values().forEach(function(d) {
data[0].values.push({
key: dateConvert(d.InvoiceDate),
value: +d.Total
});
});
NOTE: +d.Total fixes the y-axis overrun.
It looks like there is a possible bug with the line chart bleeding over the top of the chart? See tutorial at: https://www.slashdb.com/2018/02/15/howto-d3js/
NOTE: Also respond to author, Elliot Bricker, with thanks for writing tutorial!