You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to manually set the data view port with Include X/Y, the plot will show nothing until double clicked.
This is being done to hide the most recent plot point of data in a historic time series (Which is retrieved every 100ms or so), in order to avoid the appearance of stuttering when data comes in. (Stuttering will appear as soon as plot.auto_bounds([true, true].into()) is used.
To Reproduce
Create a thread which adds a plot point every 100ms or so
letmut plot = Plot::new(d.group_name.clone()).height(space_per_chart).allow_drag(false).include_x(disp_now asf64)// Timestamp now - 100.0ms to hide the most recent plot point (To look smooth).include_x(last_bound)// Timestamp now - 20 seconds.legend(legend.clone());ifletSome((min, max)) = &d.bounds{// Data has finite range in Y dir, restrict it
plot = plot.include_y(*min);if*max > 0.1{// 0.0 check
plot = plot.include_y(*max);}}// False False - User has to double click to show the chart, and it looks smooth// True True - Plot stutters as the infrequent data will show
plot = plot.auto_bounds([false,false].into());
plot.show(col, |f| {for line in lines {
f.line(line);}});
Expected behavior
Plot should show the requested area immediately, rather than wait for user input.
With plot = plot.auto_bounds([true, true].into()); (Stutters, but expected behaviour, hence why no autobounds is being used) Kooha-2024-01-26-10-10-42.webm
The text was updated successfully, but these errors were encountered:
This problem seems to be that the bounds set by include_x()/include_y() will not be used except on the first call. These methods set min_auto_bounds, which is only used to initially set the bounds memory or to restore the initial bounds by double clicking.
Describe the bug
When trying to manually set the data view port with Include X/Y, the plot will show nothing until double clicked.
This is being done to hide the most recent plot point of data in a historic time series (Which is retrieved every 100ms or so), in order to avoid the appearance of stuttering when data comes in. (Stuttering will appear as soon as
plot.auto_bounds([true, true].into())
is used.To Reproduce
Expected behavior
Plot should show the requested area immediately, rather than wait for user input.
Screenshots
With
plot = plot.auto_bounds([false, false].into());
(Buggy)Kooha-2024-01-26-10-09-39.webm
With
plot = plot.auto_bounds([true, true].into());
(Stutters, but expected behaviour, hence why no autobounds is being used)Kooha-2024-01-26-10-10-42.webm
The text was updated successfully, but these errors were encountered: