Skip to content

Rangeslider strange behaviour and legend still working while staticPlot is true #5177

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
COLLINETTEBastien opened this issue Sep 30, 2020 · 7 comments
Labels
bug something broken

Comments

@COLLINETTEBastien
Copy link

Hello,
I am using Plotly at work and I noticed that when the parameter 'staticPlot' is true, the plot events are disabled but the legend and the range slider are still usable.
Moreover, the range slider has a strange behavior when 'staticPlot' is enabled: each click on the slider reset the selected range so we can't move it as expected.

Here's a working example to illustrate what I'm saying:
https://codepen.io/collinettebastien/pen/bGpyvgw

So is it possible to disable the events that concern the legend and the range slider without removing them or, at least, keep the range slider working the same as when the plot isn't static?

Thank you very much !

@alexcjohnson alexcjohnson added the bug something broken label Sep 30, 2020
@alexcjohnson
Copy link
Collaborator

Thanks @COLLINETTEBastien - this is definitely a bug, staticPlot should disable all interactions of any kind. Thanks for the clear codepen.

@josephernest
Copy link

@archmoj @COLLINETTEBastien How did you solve the issue? It seems it is not solved as of december 2022:

In this example (live demo here), the plot is static but the slider is still active:

<meta charset="utf8">
<script src="https://cdn.plot.ly/plotly-latest.js"></script>
<div id="myDiv"></div>
<script>
var steps = [];
for (var i = 0; i < 100; i++) 
    steps.push({label: i, method: "skip"});
Plotly.newPlot("myDiv", [{ "y": [1, 2, 3] }], {sliders: [{ len: 1, x: 0, steps: steps }]}, {staticPlot: true});
</script>

@josephernest
Copy link

Can we reopen this @alexcjohnson?

@archmoj
Copy link
Contributor

archmoj commented Dec 12, 2022

@archmoj @COLLINETTEBastien How did you solve the issue? It seems it is not solved as of december 2022:

In this example (live demo here), the plot is static but the slider is still active:

<meta charset="utf8">
<script src="https://cdn.plot.ly/plotly-latest.js"></script>
<div id="myDiv"></div>
<script>
var steps = [];
for (var i = 0; i < 100; i++) 
    steps.push({label: i, method: "skip"});
Plotly.newPlot("myDiv", [{ "y": [1, 2, 3] }], {sliders: [{ len: 1, x: 0, steps: steps }]}, {staticPlot: true});
</script>

@josephernest Please note plotly-latest stayed at latest v1.
To load the latest current v2 version try https://cdn.plot.ly/plotly-2.16.4.min.js instead.

@josephernest
Copy link

Thanks @archmoj but the problem is still there with 2.16.4:

https://jsfiddle.net/2mgzy38j/

The plot is static, but the slider is still active (it should not).

@archmoj
Copy link
Contributor

archmoj commented Dec 12, 2022

Thanks @archmoj but the problem is still there with 2.16.4:

https://jsfiddle.net/2mgzy38j/

The plot is static, but the slider is still active (it should not).

Thanks for the demo.
You are right. I reopen the issue.

@archmoj archmoj reopened this Dec 12, 2022
@archmoj archmoj mentioned this issue Dec 12, 2022
@archmoj
Copy link
Contributor

archmoj commented Dec 12, 2022

@josephernest I close this issue which was related to rangeslider not slider.
For slider I opened #6392.

@archmoj archmoj closed this as completed Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

No branches or pull requests

4 participants