-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Charts freeze and throw voronoi error if two series have the same point #873
Comments
Hi there, I certainly haven't seen anything like this... Can you provide a jsfiddle that shows the issue using the latest nvd3 version? |
I'll certainly try. Maybe it's something 'local', but it's still very weird that previous version works without any issues and current one seems to be throwing a fit. I'll work on a fiddle and see if I can reproduce it. |
I narrowed it down to I kept digging through old issues and adding one line to
Then everything renders properly and there are no errors whatsoever in the console or otherwise. Although, admittedly, overall performance (at least under FF) is better if I remove focusable line chart altogether from the page. |
Now that is weird... there were issues with the old version and useVoronoi where chrome and IE would have performance issues, but I reworked that code based on http://bl.ocks.org/njvack/1405439 and I haven't seen any performance issues since then. Is there any way you can provide the problem chart online where I an look at and debug it? Are there errors in the js console? Do the voronoi regions look okay if you do chart.showVoronoi(true) ? |
I'll try to get a fiddle together, I can't promise it thought because of my time constraints and deadlines :) Anyway, if I enable voronoi and kill d3.js when it hangs under FF, next render shows the chart, but the console says: TypeError: vb is null
Once I disable voronoi, there are no errors at all.
|
Ah okay, that helps. This looks related: d3/d3#1908 So this may be related to the known issue where we don't handle having two of the same point: |
Can you try removing any duplicate points (even if they're on different lines) to see if that makes the chart work properly? I know that's not a solution, but it would verify that the above is indeed the issue. |
That's it! If I leave just one series on the chart (by cutting 3 other series out which share the same x-coordinates), everything works even with Although I got that exact same error about vs being null even in 1.1.15, but all charts were working without any apparent issues then. |
Okay, closing this then as a duplicate... I'll try to get this fixed soon, several people have brought it up. |
Please check using this fix to see if it resolves your issue. This fixed the stackedareachart for me, which had the same bug. |
Actually I'll open this issue and close the other one since that one is reeeeealy old and I don't know if they'll ever reply and verify things are fixed :p |
Can you confirm that the latest code in the development branch fixes your issue? |
I hope I'll have a chance to test it on Monday |
Hey there, any further problems? If not I'll close this issue. |
Bumping the jitter also seems to work. Anyway, I'll probably use |
Hi there,
I have 3 charts with date series (x-axis) and numbers on y-axis, line chart, stacked area chart and bar chart.
Each one of the series in any given chart has 240 points, 4 series on a chart.
In 1.1.15 everything is snappy and works really great on IE, Chrome and FF.
My d3.js version is 3.5.5
The only error I'm getting in the console is this, when any and all of the charts are being rendered:
error in d3.js line 5232, col 25:
But even then everything still works.
After the update nvd3 to 1.7.1, FF freezes until I kill d3.js, same with IE, Chrome just freezes and I can only kill the whole tab.
Firefox error:
Console says:
which points to:
If I kill the script in FF/IE, I can actually see the charts. No luck with Chrome.
Another peculiar thing is memory used by the browser, only one tab (with the charts) open:
For 1.1.15 memory pressure is stable and low.
Story is a bit different for 1.7.1: Chrome was still growing when I killed the whole tab. Firefox reaches 3.2 GB quickly and stays there. IE stays around ~400 MB (going up and down) until I kill the script.
Is there anything here that stands out for you guys? For now I'll just stay on the older version of nvd3 to keep the site usable :)
The text was updated successfully, but these errors were encountered: