Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to clear and re-draw #23

Closed
peterbe opened this issue Nov 27, 2019 · 4 comments
Closed

Ability to clear and re-draw #23

peterbe opened this issue Nov 27, 2019 · 4 comments

Comments

@peterbe
Copy link

peterbe commented Nov 27, 2019

I'm currently using ref.current.querySelectorAll("*").forEach(n => n.remove()); where ref.current refers to the DOM <div> element.
This kinda works but it appears the y-axis is changing which might be a bug but I'd rather figure out a way to re-draw or clear.

@MintyMods
Copy link

I got it to work using the following hack:-

   chart.svg.selectAll("*").remove();
   chart.drawChart();

but agree a redraw call would be cleaner.
Linking #9

@jwilber
Copy link
Owner

jwilber commented Jun 25, 2020

+1
Will add update function to do this that can take new data.
Possible pain point: smooth transition of rough paths.

@epykure
Copy link

epykure commented May 11, 2021

I would like to integrate this nice charting library to our Python ecosystem but I cannot find any details on a JavaScript API to update chart, add points, or change the options. Is it in the roadmap ?
If you are interested this is what I manage to get for the time being: https://epykure.github.io/demos/charts/roughViz.html.

Thanks

@jwilber
Copy link
Owner

jwilber commented Oct 1, 2023

.redraw() method added in v2

@jwilber jwilber closed this as completed Oct 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants