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
Title is probably wrong (: but couldn't think of a better one.
Trying to get a 'windowing' like scroll from a LineMark by removing the first data element when adding a new value to the end of data.
The resulting graph is correct, but the transition is awkward as seen in the below video. It starts out looking good, when just adding points, but not as expected when you start shifting values.
If you add points to the end of data it correctly transitions right to left, but once the length of data doesn't change (same points but shifted right to left) it doesn't recognize the right to left movement and assumes they are just changing values and transitions vertically.
Not sure if there is another way to achieve this or a limitation for the current transition implementation.
stream?.listen((newData) {
if (limit !=null&& data.length > limit) {
data.removeAt(0); //remove first element and shift
}
data.add(newData.value!); // add element to end
changeDataStream?.sink.add(ChangeDataEvent(data));
});
//[...]//LineMark Definition inside ChartLineMark(
transition:Transition(
duration:constDuration(
seconds:1,
),
),
)
The text was updated successfully, but these errors were encountered:
Title is probably wrong (: but couldn't think of a better one.
Trying to get a 'windowing' like scroll from a
LineMark
by removing the first data element when adding a new value to the end of data.The resulting graph is correct, but the transition is awkward as seen in the below video. It starts out looking good, when just adding points, but not as expected when you start shifting values.
If you add points to the end of data it correctly transitions right to left, but once the length of data doesn't change (same points but shifted right to left) it doesn't recognize the right to left movement and assumes they are just changing values and transitions vertically.
Not sure if there is another way to achieve this or a limitation for the current transition implementation.
The text was updated successfully, but these errors were encountered: