Error: Invalid value for <circle> attribute cx="NaN"
jeraymond opened this issue · comments
Jeremy Raymond commented
Hello,
I'm trying to use EventDrops 1.0.1 without a Module Bundler. When the chart renders all the drops are stuck on the left side of the graph. The the console logs I see JavaScript error
Error: Invalid value for <circle> attribute cx="NaN"
It seems like there is something wrong calculating the x-axis value. Here is a repro of the issue. Any ideas?
Jonathan Petitcolas commented
It seems you have forgotten to specify the date
function. Here is the fixed version.
var chart = eventDrops({
range: {
start: new Date('03/01/2018 6:55:11 PM'),
end: new Date('03/05/2018 6:55:11 PM')
},
drop: {
+ date: d => d.date,
}
});
Jeremy Raymond commented
Thanks that fixed the issue.