Violin graph with variable dynamic grouping


I have timeseries data stretching over two years, with one entry every 30 minutes.
When I plot the whole graph, you can’t see anything unless you zoom in on a few days.
My goal is to switch graphs depending on the zoom.
I have these units of grouping in mind :

  1. 30 minutes
  2. daily
  3. weekly (split sundays, double graph)
  4. monthly

Basic grouping of a timeseries, depending on the visible scope. If I have around 10 days on the zoom, I show a violin graph grouped per days. If I zoom out, I group per weeks, then per months. If I zoom in completely, I show the line plot, every 30 minutes.

Can someone guide me on how to do that ? Don’t need the whole code, just the variables to play with or another fantastic video from Adam.


Hello @hmiemad,

Give a look at the relayoutData as the input, you might be able to ascertain the information and determine what changes you want to make to the figure based upon the ‘xaxis.range[0]’ and ‘xaxis.range[1]’.

If that doesnt work for you, selectData might be easier to implement. Just have a button that resets the graph to the furthest out.