Skip to content

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

Closed

Description

@jszuminski

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

Activity

  1. alrahemtulla commented on Aug 4, 2023

    @alrahemtulla
  2. TorsteinHonsi commented on Sep 8, 2023

    @TorsteinHonsi
    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) {

  3. self-assigned this
    on Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions