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

Zooming-in below boostThreshold doesn't disable the Boost #18804

Closed
jszuminski opened this issue Apr 11, 2023 · 2 comments · Fixed by #20062
Closed

Zooming-in below boostThreshold doesn't disable the Boost #18804

jszuminski opened this issue Apr 11, 2023 · 2 comments · Fixed by #20062

Comments

@jszuminski
Copy link
Contributor

Expected behavior

As written in the Boost docs (https://www.highcharts.com/docs/advanced-chart-features/boost-module):

The intended way of using the module, is to set thresholds in such a way that the SVG-renderer “takes over” rendering when zooming in. This approach gives the expected interactivity when the points are less dense, coupled with high performance when the point density is high.

But if we zoom on a boosted series so that the number of visible points on the chart is less than series.boostThreshold the series is still boosted (and, for example, the dataLabels do not show up).

Live demo with steps to reproduce

https://jsfiddle.net/BlackLabel/yke96xbj/

  1. Try zooming in so that there are less than 100 points (less than series.boostThreshold)
  2. The dataLabels do not show up and the series is still boosted
@alrahemtulla
Copy link

Linking original forum post: https://www.highcharts.com/forum/viewtopic.php?f=9&t=50662

@TorsteinHonsi
Copy link
Collaborator

Internal note

This happens for scatter series, but not for line series. In the extended getProcessedData function, the dataToMeasure is used to asses whether to kick into boost mode or not. This data to measure is computed by the super getProcessedData function. Unlike the line series, scatter series is not sorted. For sorted series, the data is cropped to prevent wasting resources on rendering data outside the viewed range. This does not happen for unsorted series like the scatter.

It is possible that we do this cropping further down in the rendering part of the Boost module. Otherwise we should probably create a cropping function for scatter data, that we can use on line 1321 as an alternative to series.processData.

Then if we make this work, we should also have a mechanism to reuse this cropped data in the extended render function, to prevent looping the full data twice and rendering it when not necessary.

Here's where we do a similar test at the rendering level:

if (y !== null && x >= xMin && x <= xMax && isYInside) {

@bre1470 bre1470 self-assigned this Nov 21, 2023
Development-Flow automation moved this from To do to Done Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

5 participants