Skip to content

Old graphs not removed when updating data with scattered graph #344

@Linho1219

Description

@Linho1219

For example:

functionPlot({
  target: "#playground",
  data: [
    {
      fn: "x^2",
      graphType: "polyline",
    },
  ],
});

And when calling:

functionPlot({
  target: "#playground",
  data: [
    {
      fn: "x^2",
      graphType: "scatter", // changed to scatter
    },
  ],
});

The old graph still exist. This problem appears when graphType changes from scatter to other values, or other values to scatter.

See demo here: https://codesandbox.io/p/sandbox/lllzml

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions