Skip to content
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

Implement progressive zooming in reports #222

Open
dalonsoa opened this issue Mar 15, 2024 · 0 comments
Open

Implement progressive zooming in reports #222

dalonsoa opened this issue Mar 15, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@dalonsoa
Copy link
Collaborator

Some time ago, we made a first attempt at coding a widget for the interactive visualization of the time series in javascript, with the ability to zoom in and out. We tested two approaches:

Our first widget pulled the entire time series from the database to the client side, and then vizualised the relevant time window on the client. This had the advantage that data had to be pulled in only once, and that zooming was quick (as the data was already at the client side). The disadvantage was that potentially a very large time series was pulled in (if the time series is long) and not all of it is needed (if the client never zooms out to the full time series). Some clients even struggled to keep the full time series in their memory.

In a second attempt, the client only requests the time slice that is visualised. This is quicker, but requires a request to the database for every zoom-out action. This can slow down the user experience. However, we mitigated this by making use of the aggregated (hourly, daily) data in the database. The widget calculated the resolution of the time series based on the size of the viewport (number of pixels) and select the coarsest time series needed to visualize. For example, if the visualization zoomed to 2 years of data, and the viewport is 600 pixels wide, then the daily data (730 data points) is perfectly fine. This method worked really well, as the amount of data transferred and processed per zoom action was minimized.

There are many such visualization widgets nowadays, and they may already have smart was to do this, but I thought I would document here in case it is still of relevance.

Originally posted by @ICHydro in #209

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants