-
Notifications
You must be signed in to change notification settings - Fork 591
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
Scale domain vs filter selection: automatic axis scaling #5802
Comments
Please use stack overflow or slack for questions. We reserve the issue tracker for bugs and feature requests (including doc requests). |
@domoritz I would've posted a feature request if someone could confirm this is currently impossible, hence the question (apologies for hassle). I've posted an SO question - hoping someone could answer that. |
If you want to filter the data to the selected points or set the scale domain to only include some filtered data, you need to use the filter method. |
@domoritz Thanks. The problem is, scale domain method with binding to x-axis works surprisingly fine if there's around 100K points in the dataset, whereas filter method almost dies. I was wondering, if scale domain method is so efficient (because it doesn't have to scan through all data points along the x axis), is there a faster way to auto-scale the resulting plot along the y-axis? If this was possible, it would make vega-lite miles ahead all of the existing tools. Alternatively, maybe it was possible to show the full dataset (with scale domain), but auto-scale it along y-axis using heavily resampled dataset? (so that it can compute y-min and y-max much faster on a smaller number of points). Not entirely sure that's possible in vega-lite. // I was even thinking, it might be even fine to have to pre-compute some mins/maxes for a quantized matrix of (start, end) selection ranges and pass them to vega-lite as a separate dataset, but not sure if it's doable either. |
Can you find out what's slow? I'd rather improve the performance of filtering than support two ways to achieve the same thing. That would be fantastic. Feel free to open a new issue with the goal of performance improvements for your use case. Thanks! |
In
Scale Domains
docs it is noted:Which is indeed almost the same (although filter method being much slower, as noted in the docs), except for one difference:
The question: is it possible to have the y-axis automatically zoom in to the selected points as you move the selection, with "scale domain" method (same as it does with filter-selection method)?
// I've checked all scale-domain issues here, on altair repo and SO and couldn't find anything related; apologies if it's something obvious.
The text was updated successfully, but these errors were encountered: