Skip to content
Discussion options

You must be logged in to vote

I don't know Plot very well but I don't believe it supports updates the data for the existing plot: you need to recreate a new SVG (createPlot) and replace existing node in the DOM.

        model.on("change:data", () => {
            // remove the existing plot
            el.removeChild(el.firstChild);
            // make a new one
            el.appendChild(createPlot(model.get("data")));
        });

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by vwkd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants