Skip to content

Certain data set causes the browser to crash #672

@CoryJ34

Description

@CoryJ34

Codepen

https://codepen.io/anon/pen/BgNzaj

That codepen may not even load due to the browser crashing, so the issue (and code) can also be demonstrated here:

https://codesandbox.io/s/apexchart-test-hjmx9

All that's necessary is a chart options object like this:

var options = {
  chart: { type: "line" },
  series: [
    { 
      name: "Values",
      data: [
        "2.28", 
        "2.19", 
        "2.02", 
        "1.90", 
        "1.88", 
        "1.90"
      ] 
    }
  ]
};

Explanation

Using a simple line chart with the six data points listed above, the browser crashes. The above codesandbox sample can work if an earlier version is selected for the apexchart dependency (3.4.1 is a good working version)

  • What is the behavior you expect?

    The chart to render successfully as it did in earlier versions of apexcharts.

  • What is happening instead?

    The browser crashes and has to be reloaded.

  • What error message are you getting?

    In Chrome dev tools, the debugger pauses as it detects a potential out-of-memory exception (looks like it's happening in the niceScale function)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions