Skip to content

Recolor 1 point in 3D scatter with "restyle" cause a bug due to recursive loop #4369

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

Closed
Florent-Breton opened this issue Nov 20, 2019 · 1 comment

Comments

@Florent-Breton
Copy link

Hi,
I already check different issues about the same problem, like this one. But I have always the same problem, also with a csv with just 1 point.

Does my code wrong or the bug still remains?

`setTimeout(function () {
            myPlot.on('plotly_click', function (data) {
                console.log("data :", data)
                var pn = data.points[0].pointNumber;
                var tn = data.points[0].curveNumber;
                var colors = data.points[0].data.marker.color;

                colors[pn] = '#C54C82';
                var update = { 'marker': { color: colors, size: 4 } };
                Plotly.restyle('chart', update, [tn]);
            });
    }, 200)
`

plotly-latest.min.js:7 Uncaught RangeError: Maximum call stack size exceeded
at e.exports (plotly-latest.min.js:7)
at e.exports (plotly-latest.min.js:7)
at e.exports (plotly-latest.min.js:7)
at o.merge (plotly-latest.min.js:7)
at b._.plot (plotly-latest.min.js:7)
at Object.r.plot (plotly-latest.min.js:7)
at r.drawData (plotly-latest.min.js:7)
at Object.l.syncOrAsync (plotly-latest.min.js:7)
at r.plot (plotly-latest.min.js:7)
at Object.l.syncOrAsync (plotly-latest.min.js:7)

@etpinard
Copy link
Contributor

Yes, this is essentially a duplicate of #1025 - which we haven't resolved yet. Merging into #1025

Thanks for posting!

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

2 participants