Repository navigation
Fix BarChart stack items without from_y and LineChart point animation - #7064
Merged
Merged
Conversation
A BarChartRodStackItem left from_y unset, so the client read a missing value and the whole BarChart failed to render. from_y now defaults to 0 on both sides. LineChart kept one spots list per data series and refilled it on every update. The previous LineChartData held that same list, so the implicit animation tweened from the new points to the new points and the chart jumped. Each update now builds a new list (flet-charts#8).
It used a title syntax Docusaurus 3 doesn't support, so it rendered badly, and it described LocalAuthentication setup, which the LocalAuthentication page already covers.
BarChart stack items without from_y and LineChart point animation
Deploying flet-website-v2 with
|
| Latest commit: |
a91f9a0
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ec32d540.flet-website-v2.pages.dev |
| Branch Preview URL: | https://fix-charts-stack-item-line-a.flet-website-v2.pages.dev |
Set the gauge chart animation duration to 100 ms instead of disabling it.
- Slide the X axis with a dedicated controller while a rolling window scrolls, instead of mutating lists fl_chart is still tweening, so scrolls that arrive mid-animation no longer morph samples by index. - Detect scrolling with a tolerance scaled to the magnitude of X, use fl_chart's own bound inference, and accept windows that only grow. - Rebuild series only when the control changes, not on every build, and reuse them for touch indicators. - Resolve above/below spot line flags by spot identity when settled, with a self-correcting counter during animations. - Default a BarChartRodStackItem without a color to its rod's color, and type from_y as a plain number.
FeodorFitsner
approved these changes
Nov 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two flet-charts bug fixes for 1.1.3, plus a small docs cleanup.
BarChartfails when a stack item has nofrom_yBarChartRodStackItem.from_ywas optional and defaulted toNone, so leaving it out sent nothing to the client. The Dart side force-unwrapped it (getDouble("from_y")!), so building the rod threw and the wholeBarChartfailed:from_ynow defaults to0on both sides.LineChartjumps instead of animating (flet-charts#8)_LineChartControlStatekept oneList<FlSpot>per data series and refilled it in place (clear()+add()) on every update. The previousLineChartData, which fl_chart's implicit animation tweens from, referenced that same list. So the animation started from the new points and the chart jumped straight to its final state. Point edits now build a new list so the previous coordinates stay available to the tween. When a fixed-width rolling window advances over unchanged samples, the chart animates the X axis while preserving sample coordinates. This works with explicit and inferred X bounds.Runnable examples and tests
Run one example at a time. From
sdk/python, start the app on port 8550. Fromclienton the PR branch, runfvm flutter run -d chrometo connect with the local renderer.Point updates with fixed axes
Click Toggle point values. The script changes only the Y values. On
main, the points jump to the final shape. On this branch, they interpolate over one second.line_chart_jump.py
Right-to-left scrolling with explicit X bounds
Run
running_line_chart.pywith the same command. It adds one sample every 500 ms and animates the eight-second window over 400 ms. The retained waveform should move left with the same sample heights.running_line_chart.py
Declarative dashboard with inferred X bounds
The CPU, memory, and disk gauges append keyed samples every second. They use a 100 ms built-in animation and infer the X bounds from their data. Each waveform should scroll left while keeping the retained samples at the same heights. Dashboard example
Flutter regression tests
The tests check intermediate painted positions for rolling windows with explicit and inferred X bounds, interpolation when a point changes, and per-point visibility for
above_lineandbelow_line. I also replayed the Flet updates from all three dashboard gauges in Flutter and verified scrolling onfl_chart1.2.0 and 1.3.1. Widget testsDocs
Removed the "Touch ID and Face ID" note from the Permissions section of the macOS publishing page. Its
:::note Titlesyntax doesn't render in Docusaurus 3. It also describedLocalAuthenticationsetup, which the LocalAuthentication page already covers.Summary by Sourcery
Fix chart rendering and animation regressions while adding regression coverage and cleaning up macOS publishing documentation.
Bug Fixes:
Enhancements:
Documentation:
Tests:
Chores: