-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
@etpinard 's PR #373 handles the case of static data with lines but no markers. To handle streaming data, "latest X time" should be part of autorange, such that it gets recalculated every time the data changes.
Markers will be a problem in the existing system because they cause the range to be padded, and that padding will grow as a fraction of the plot as you zoom in. That would also be fixed by working this into the autorange machinery.
So what would such a system look like? I think extra options for rangemode seems like the easiest way, plus a mechanism to specify the span (how about span ??)
So, to show the last 6 months, something like:
rangemode='largest', span='6months'
But there could be others, like the first 6 months:
rangemode='smallest', span='6months'
Or autoscale one end, with the other end fixed (may handle the stepmode='todate' case from #373 ):
rangemode='afterconstant', rangelimit='2015-01-01' (rangelimit isn't a great name, but that's the idea)
rangemode='beforeconstant', rangelimit=100 (don't show anything bigger than 100)
Also: how do we work this into the interactions? If we change nothing else, doubleclick to autorange will revert to the rangemode settings (because all it does it set autorange: true. Maybe that's what we want to happen... but we could also do something snazzy like if you doubleclick again then it goes to FULL autorange (rangemode='normal') but stash the rangemode so if you doubleclick a third time you'll go back to the original rangemode. Dunno, that part may be too complicated...