TL;DR: How do you best deal with real-time dynamic data where you would like to add and remove lines/glyphs from the plot while still remaining efficient (i.e. using the stream function).
MultiLineGlyph? Adding/Removing glyphs if that is possible? Other options?
Problem:
For a real-time web-app, I have a line per user on a graph, and as users come and go I would like to add and remove the line.
I’ve used the multiline object for this before, but it does not support streaming AFAIK, and if possible I would like a more efficient implementation that does not send the entire data over the wire on every update (as happens with setting source.data
directly if I understand correctly.
What options do exist in this scenario? Is it the multi-line object and forgo streaming, or are there entirely other options?
I’ve been trying to dynamically add and remove step glyphs from my figure as I mentioned, and while adding seems to somewhat work, removing does not work at all. Thank you for your help!
More use cases
Another use-case where this could be very useful is to re-use a graph instead of creating a new one (e.g. have a drop-down menu that you choose a data type to display). This would be a solution for another problem, where too many graphs seem to massively slow down the rendering of the document.
Updates:
[1] In my case, I am talking about dynamically adding/removing ~20 glyphs.