Varea_stack streaming different stackers/different number of stackers

Thanks @Bryan, I was struggling to explain my understanding of how the varea_stack works so hesitated to reply.

I’ll add that I have gone down this rabbit hole for a number of applications and each time have resorted to a Patches glyph driven by a CDS with “actual_x”, “actual_y” and “stack_geom_x” and “stack_geom_y” columns. Then when new data gets added, or existing data gets manipulated, CustomJS code calculates the new stack geometries with some array manipulation and cumulative summing. See Fill between multi_line - #2 by gmerritt123 for some related reference.

The kinda nice thing about this approach is that because you are directly writing out the geometry based on the y values of the thing below the current one, you don’t need consistent X values for each item → the bottom geom is based on the x-y of the previous item’s top, and the top is based on the cumulative sum of the y, and the current x.