novus / nvd3

A reusable charting library written in d3.js
http://nvd3.org/
Other
7.22k stars 2.15k forks source link

Multichart Voronoi Issue - turning off Voronoi doesn't help #1704

Open nscalf561 opened 8 years ago

nscalf561 commented 8 years ago

I'm using multichart to plot sets of scatter data on two y axes and I'm getting "Uncaught TypeError: Cannot read property 'x' of null" inconsistently. After looking through some of the other issues posted, it seems very similar to #368 but turning off Voronoi didn't resolve it. Turning on the guideline fixed the problem, but it introduced a new issue where the guideline was very inaccurate. The problem was also resolved by shutting off and turning back on the line in the legend.

I resolved this by changing lines 11424 and 11425 from "...Math.random() * 1e-4" to 1e-3. I saw you had previously changed it from 1e-7 down to 1e-4, which made my TypeError occur inconsistently, but it still occurred about 1/3 of the time I loaded the page.

Has anyone else ran into this issue with only scatter points on multichart?

liquidpele commented 8 years ago

Yea, that's kind of a hack around the real issue. There was an unfinished attempt to solve the underlying issue here:

https://github.com/novus/nvd3/pull/448

If you want to code up a real solution that avoids duplicate points then please send a pull request :)