EventDrops
EventDrops copied to clipboard
Generate a chart from any type of data array
The .date function should be used like this:
var eventDropsChart = d3.chart.eventDrops()
.date(function(d){ return d.date; });
d3.select('#chart_placeholder')
.datum(data)
.call(eventDropsChart);`
Instead of
var eventDropsChart = d3.chart.eventDrops();
d3.select('#chart_placeholder')
.datum(data)
.date(function(d){
return d.date;
}),
.call(eventDropsChart);
In latest version (1.0.0
), we don't support configurable anymore. Instead, we need to pass a date
property to a configuration object, something like:
const chart = eventDrops({
drop: {
date: d => new Date(d.date),
},
});
Hence, the date
function is now related to chart, and not to selection anymore. Does it fulfill your need?