Streaming Heatmaps

I have two heatmaps.
They are not sharing the same dataframes, but has the same dates in the timeseries.

The top one has the data in a different sample rate and with some math applied to it.

I want to:

  • stream data to the bottom chart when the range moves on the top one
  • lock the range to prevent changing its size (end-start)

How can i achieve this ?

Thank you

Not sure I understood what you want correctly, but there are two things that seem relevant:

  • DataRange1d has the renderers property
  • DataRange1d has the start and the end properties which, if set explicitly, will stop automatic range computation

I am not sure i understand you.
Maybe i better start with the following questions:

  1. Can i connect a Figure A with a Range and Figure B where the data in different between the figures?
  2. can i lock DataRange1d selection window to a fixed size?
  3. Can i populate Figure B with data whenever Figure A’s range changes?
  4. Can i do the above with streaming?

The answer is “yes” to every item except 2, because I don’t understand what “selection window” means. If you mean limiting the range of values displayed on a plot then the answer is also “yes”. If you mean limiting the selection tool, then I don’t know.

To understand my previous answer (assuming it at all relevant to you initial question), just go through the docstrings of the mentioned attributes.

I just re-read your initial question and (again, if my current understanding is correct) it seems that you can just use something like

p1 = figure(...)
p2 = figure(..., x_range=p1.x_range)

it will make sure that whenever any of the plots changes its X range for whatever reason (be it new data or user interaction or some CustomJS code) the other plot will also change its X range. Because the range is literally the same instance.

And to avoid panning the figures (if that’s what you mean by “lock the range to prevent changing its size”), you can just remove the pan tool from the set of tools.