Black Lives Matter. Please consider donating to Black Girls Code today.

Provide different data to rangeslider and chart


I want to provide own data to the rangeslider. Im currently working with time series and e.g. I want to load data for the last 10 years in that every month is a measure point. This data should shown in the rangeslider (rough aggregation).

On the other hand I want to show in the plot itself the detailed data for example one month (07/2016) with measure-points every hour.

So I think for that case it makes sense to provide rough data to the rangeslider and detailed data to the plot. Is that possible or have the plot and rangeslider the same data-base? I hope I have expressed myself correctly:-)

1 Like

Supplying range-slider only data isn’t possible at the moment unfortunately.

It would be a great addition to plotly.js, no doubt. But it isn’t a short term priority for us.

1 Like

Thank you for your fast answer. Of course I understand, that this isn’t a short term priority.
My Workaround will be the following:

  • Load ALL data on highest aggregation type (e.g. each month one measure) and put it into the graph AND save it in a cache variable
  • After the user zooms into e.g. one month it loads the newDetailedData (e.g. every hout one measure). It deep-copies the cache (with rough data) and overrides the data-range from newDetailedDataDateBegin and newDatailedDataDateEnd with the newDetailedData.
  • It plots the enriched data with plotly. (The cache variable will still contain only the data with the highest aggregationType)

That leads to a good miniature of the whole graph in the range slider - based on the highest aggregationType. But it supports a more detailed level (e.g. on zoom)

Of course I like to hear other approaches to that topic:-)

@etienne Are there some news to this topic? Is it possible to subscripe any topic to get informed if this feature will release in future?

Create a plot with a rangeslide, hide the main plot (eg. using layout) & then sync it up with another plot yourself?

In my case I needed a common Range slider to be displayed for multiple plots where the data in the range slider would change based on the currently active plot. So I created my own custom range slider. Still some works needs to be done on correctness of the range and sometime overlapping range. Also on the performance side. But I think this could help some one until this feature is out for a release.

Custom Range Slider