Skip to content

Area chart series toggling issue introduced in 4.1.0 #4855

@mrash

Description

@mrash

Description

In 4.1.0, series toggling in area charts with larger numbers of values causes the browser tab to crash and/or become unresponsive. I have isolated this problem with an area chart that includes only what is needed - two series and attempting to toggle one of them - to reproduce this issue in this codepen.io link.

Steps to Reproduce

  1. Load this codepen.io link.
  2. Observe that there are two series labeled "Series1" and "moving_avg_100D" respectively, and that the initial render of the graph is fine.
  3. Now, use the mouse to select the "moving_avg_100D" series from the legend and then try to toggle it with a click. This results in the browser tab crashing.

Expected Behavior

The expected behavior is to toggle (hide) the series labeled "moving_avg_100D". In versions prior to 4.1.0, this toggling behavior works fine, but appears to be broken in 4.1.0.

Actual Behavior

Upon trying to toggle the "moving_avg_100D" series, the browser tab crashes.

Screenshots

For version 4.1.0, the initial render of the area chart including both series works fine:
Screenshot 2024-12-07 at 6 28 51 PM

Now, highlight the "moving_avg_100D" series via the legend below the chart and click it (try to toggle or hide it) and observe that the browser tab crashes and codepen becomes unresponsive:
Screenshot 2024-12-08 at 9 20 11 AM

For versions prior to 4.1.0 (I've tested with every version going back to 3.53.0), the correct functionality works with the "moving_avg_100D" series successfully toggled:
Screenshot 2024-12-07 at 6 29 07 PM

If you want the raw data as a gist, then use the "ap_area_2series.html" file in this gist. Also, as a side note, if the "hidden" attributed is set to "true" (toggled by default) in the "moving_avg_100D" series, then the page does not render at all under 4.1.0 and the browser tab crashes. This is demonstrated by the "ap_area_2series_hidden.html" file in the same gist. This file is identical to the "ap_area_2series.html" file except that the "hidden" attribute is set to "true" for the "moving_avg_100D" series.

Reproduction Link

https://codepen.io/michael-rash/pen/JoPXaOw

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions