-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add way to set which traces show up in range slider plot #2010
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
Comments
Any updates on this? Having a bit more control over the display aspects of the rangeslider would be very useful. |
Hi, I found a workaround to hide extraneous traces with this simple css:
In my case this leaves only a first trace on the rangeslider. |
Hi, Can anyone help with this? Cheers |
This is a different approach where I wrote my custom range slider so that I can keep one generic range slider for all the plots in my screen and activate different ones based on user interaction. Hope it helps someone. Following code pen has this custom range slider. |
This would be a nice addition. Edit: has anyone found any alternative solution for this? the one suggested by rychoo2 does not work anymore. In my case, I only need the first trace to be displayed. |
@pavitrakumar78 For CSS-based solution, you need to inspect your plot using browser's dev tools and see what classes you can use as a selector in your case. It will depend on what do you need and config of your plot. In my case, for example,
does the trick (I needed to hide scatter trace from range slider and leave bars). This piece of CSS might work to hide all traces except first (works for plot I'm playing with):
|
@GendelfLugansk Thanks! I will try this. |
Another workaround would be to add second Minimal example:
|
@GendelfLugansk I tried both your suggestions.
-- I think a much easier solution would be just to implement or bring-back the |
This solution works GREAT I also can notice the performance improvements, only gotcha: if your x axis is type date, make sure axis2 is also type date, also you might want to remove the labels from axis2 since plotly doesn't do it and you get weird text like so: |
This issue has been tagged with A community PR for this feature would certainly be welcome, but our experience is deeper features like this are difficult to complete without the Plotly maintainers leading the effort. What Sponsorship includes:
Please include the link to this issue when contacting us to discuss. |
Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson |
Hi,
I played with financial charts and candlesticks chart and found that the range slider is somewhat limited.
In my quest to customize it, I found those links : #279 where I saw that a feature I wanted to use was listed but then I found https://plot.ly/javascript/reference/#layout-xaxis-rangeslider and saw this was not yet implemented.
I would like to draw severals informations in one graph : for example : Candles, Volume, 1 or more moving average etc ...
example :
https://codepen.io/anon/pen/LzpKZg
You can see that all traces are draw again in the range slider. it's useless, take memory, render the trace in this areas unreadable etc.
The option "showtraces" from #279 seemed to be really useful for this kind of data's. Could it be implemented ?
Best option should be to implement the showtrace option and give an array of the trace to be drawn, second option could be to draw only the first trace, and user arrange his data to put the trace he want in first place.
Also is there a workaround to remove some trace from the range slider ?
Regards.
The text was updated successfully, but these errors were encountered: