-
Notifications
You must be signed in to change notification settings - Fork 621
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
Ordinal scales crash on mid-sized datasets in Chrome and Firefox #4974
Comments
Update: apparently explicitly stating Still, it's kind of strange that this crashes the way it does—per the docs here, I was expecting an unspecified |
The problem is the size of the canvas, I think. If you use SVG, the chart should render. As far as I understand it, it's a browser limitation. |
Understood—that makes sense. This addresses the concerns I had here. The only other thing I was going to suggest would be raising an error when the maximum canvas size is exceeded, but it looks like that's already noted in vega/vega#1522. Thanks for your help! |
I ran into this problem on a dataset with about 3,000 rows on a single bar plot. I'd been using a
quantitative
scale, but was looking to switch to using anordinal
scale to ensure that each bar would be assigned at least one pixel of width.I noticed that the editor would just crash whenever I tried using an ordinal scale with my data. Strangely, this crash was triggered by a certain amount of data rows being present: I was able to isolate it down to exactly 1,631 being the upper limit of data rows that would work. Adding in one more data row would consistently cause the Vega Editor to crash. (I've worked with and seen examples of way larger datasets in Vega-Lite, so I figure this is a bug.)
The dataset that causes this error
This spec is a subset of the data I'm currently working with. It displays fine as it currently is.
When I open that data in the Vega Editor in Chrome, and add in exactly one more
data row to the spec, the entire visualization crashes without an error message
in the same way as with the flights-2k dataset—all I see is this:
(Changing up the
Feature ID
andIntercept
doesn't seem to make a difference in preventing the crash, also.)Reproducing the problem with a more "normal" dataset
I know the spec above isn't very minimal (sorry!), so I was able to reproduce this sort of problem using the
flights-2k
Vega example dataset. The below spec crashes in the Vega Editor and when loaded using Vega-Embed:It's worth noting that this works fine for me in Safari, strangely enough. Chrome (which for me is at version 74.0.3729.157) is where I get a crash.
(I installed Firefox on my computer just to test if this crashes there also, but it looks like every spec I try also crashes in Firefox with the error
[Error] [Exception... "Failure" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: https://vega.github.io/editor/vega.js :: t.a :: line 18" data: no]
. That seems like a different problem. I'm using Firefox version 66.0.5, for reference.)Thanks!
The text was updated successfully, but these errors were encountered: