mauriciopoppe / function-plot

A 2d function plotter for the web
https://mauriciopoppe.github.io/function-plot/
MIT License
914 stars 112 forks source link

Feature request: provide a way to teardown a functionPlot instance #262

Closed mauriciopoppe closed 6 months ago

mauriciopoppe commented 6 months ago

There's only a create + update API but not a delete API, providing a delete API should fix https://github.com/mauriciopoppe/function-plot/issues/245#issuecomment-1658964176.

mauriciopoppe commented 6 months ago

Use the following methods to destroy the graph and the resources created.

const instance = functionPlot({ ... })
instance.destroy()