-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add optional redraw parameter to extendTraces/prependTraces #6682
base: master
Are you sure you want to change the base?
Conversation
An optional parameter has been added to extendTraces and prependTraces that specifies whether the graph should be redrawn after a new group of traces has been appended or prepended, as the case may be. This can be useful when the time to redraw cannot keep up with the frequency in which new data arrives, or when data arrives so fast that updating the graph with each trace addition is distracting. Importantly, this change is backward compatible with any prior version, as the optional redraw parameter defaults to true, thus, unless explicitly set to false, graphs will continue to be redrawn after each trace addition.
Thanks @drderiv - this is an interesting concept and clearly useful! I'm a little worried about it though, as the user would need to be pretty careful to end any particular chain of operations with What if we instead added a |
To clarify your concern, it's that a user does a chain of The way I am currently using it is like this: |
Add redrawMinimumInterval parameter to config for use with extendTraces/prependTraces. Fully backwards compatible as default is zero.
Revert previous changes and attempt to implement suggestion of @alexcjohnson to use throttle functionality for extendTraces/prependTraces minimum redraw interval.
Update to reflect change in approach suggested by @alexcjohnson.
@alexcjohnson any further thoughts on this one? thanks - @gvwilson |
Ah, I missed that @drderiv reworked this in line with my suggestion - thank you! This looks great. I haven't tested it, but assuming it works as intended I'm quite happy to accept this. I suspect adding a programmatic test of this will be tough - and the change is only in the non-default setting anyway, so manual testing may be the best way to handle this one. |
thanks @alexcjohnson - much appreciated |
An optional parameter has been added to extendTraces and prependTraces that specifies whether the graph should be redrawn after a new group of traces has been appended or prepended, as the case may be. This can be useful when the time to redraw cannot keep up with the frequency in which new data arrives, or when data arrives so fast that updating the graph with each trace addition is distracting. Importantly, this change is backwards-compatible with any prior version, as the optional redraw parameter defaults to true, thus, unless explicitly set to false, graphs will continue to be redrawn after each trace addition.