This repository has been archived by the owner on Jun 4, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Plot: avoid timeseries downsample if we are already below display lim…
…it (#7333) This change updates the TimestampDatasetsBuilderImpl to avoid doing a downsample if we are already under the viewport size for the number of items we want to display. While this does technically create a dataset that could have multiple datums at the same pixel coordinate, this is a tradeoff to avoid downsample rounding errors for extremely close datums at different zoom levels. As the user zooms in, we might resolve these datums to the same pixel or different pixels based on rounding - even though in absolute terms they are further apart (i.e. going from 0.42 to 0.477 distance apart). This tends to be most obvious once you've already zoomed to a point where data was displayed without downsampling but then zooming in again changes the rounding and the logic would think the data is downsampled. In practice, the purpose of downsampling is to avoid rendering _too many_ datums on a plot since rendering takes time. But when the dataset is already so small that it is under our viewport size and max point threshold then there's no reason to run downsampling and we can display all the datums regardless of whether they would appear at the same pixel or not.
- Loading branch information