Skip to content

backport(2.0.x): fixes from master (#2164, #2170, #2172, #2173, #2177, #2179) - #2184

Merged
beto-rodriguez merged 6 commits into
release/v2.0.xfrom
backport/v2.0.x-fixes
Apr 28, 2026
Merged

backport(2.0.x): fixes from master (#2164, #2170, #2172, #2173, #2177, #2179)#2184
beto-rodriguez merged 6 commits into
release/v2.0.xfrom
backport/v2.0.x-fixes

Conversation

@beto-rodriguez

Copy link
Copy Markdown
Collaborator

Summary

Backports six bug-fix PRs from master onto release/v2.0.x. Each is a behavior fix with no breaking API change.

PR Issue Fix
#2164 #2132 / #2083 Null-gap line rendering on inserts and resize (VectorManager rewrite)
#2170 #1986 Avalonia chart blank in ScrollViewer / TabItem when data arrives off-screen
#2172 #1864 Avalonia: only mark wheel event as handled when zoom is actually enabled
#2173 #2073, #2152 Stacker: sign-segregated tracks for column/row + cumulative track for area/step-area
#2177 #2175, #2119 ZoomAndPanMode granular flags (PanX/ZoomX/PanY/ZoomY) + manual Zoom() honors NoFit
#2179 #2131 PieChart: clamp gauge value to chart MaxValue so value > MaxValue can't sweep past 360°

Skipped from the same window:

Resolution notes

A few merges had to be resolved by hand because the source branches diverged from 2.0.x:

Test plan

  • dotnet build src/LiveChartsCore/LiveChartsCore.csproj -f net8.0 — clean
  • dotnet build src/skiasharp/LiveChartsCore.SkiaSharp/LiveChartsCore.SkiaSharpView.csproj -f net8.0 — clean
  • dotnet build src/skiasharp/LiveChartsCore.SkiaSharp.WPF/... — clean (net462 + net8.0-windows + net8.0-windows10.0.19041)
  • dotnet build src/skiasharp/LiveChartsCore.SkiaSharp.Avalonia/... — clean (net6.0 + net8.0 + netstandard2.0)
  • dotnet test --project tests/CoreTests/CoreTests.csproj --framework net8.0 — 125/125 passed
  • dotnet test --project tests/SnapshotTests/SnapshotTests.csproj — 83/83 passed (including new StackedAreaTests_Issue2073_MixedSigns, StackedRowSeriesTests_Issue2152_MixedSigns, PieChartTests_GaugeValueExceedsMaxValue, PieChartTests_GaugeValueExceedsRangeWithMinValue)

🤖 Generated with Claude Code

fix: null-gap line rendering on inserts and resize (#2132)
fix(avalonia): chart blank in ScrollViewer/Tab when data arrives off-screen (#1986)
…el-handled

fix(avalonia): only mark wheel event as handled when zoom is enabled (#1864)
…d-signs

fix(stacker): correct stacking for mixed positive/negative values (#2073, #2152)
…m-pan-flags

fix(zoom): split ZoomAndPanMode into per-gesture flags + honor NoFit in manual Zoom
…-clamp

fix(pie): clamp gauge value to chart MaxValue (#2131)
Copilot AI review requested due to automatic review settings April 28, 2026 20:38
@github-actions

github-actions Bot commented Apr 28, 2026

Copy link
Copy Markdown

Thanks for your contribution!

The build and test process is starting. This may take a while.
You can find more details below as the process continues or at the actions tab.

Packing complete!

You can download the NuGet packages for this build here (dev-366).
The packages will be available for 30 days, you can either use them directly, or wait for this PR to be merged to have them published to NuGet.org.

Running tests 🧪

Tests are running now, you can monitor their progress below or at the actions tab.

Core ✅ | Snapshot ✅ | Windows ✅ | Linux ✅ | Mac ✅ | Browser ✅ | Android ✅ | iOS ✅

Test Results Summary (Passed) ✅

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Backports six bug-fix PRs from master into release/v2.0.x, covering rendering correctness (line gaps, stacking, pie gauge clamp), interactive zoom/pan behavior, and an Avalonia off-screen rendering deadlock—plus associated regressions/tests and docs updates.

Changes:

  • Fixes line-series null-gap rendering regressions by rewriting VectorManager and removing unsafe path-container cleanup in line/step/polar line series.
  • Corrects stacking semantics for mixed-sign data by introducing cumulative stacking for area/line while keeping sign-segregated tracks for bars/rows.
  • Improves interaction & platform behavior: granular ZoomAndPanMode flags + NoFit honoring, Avalonia viewport visibility wake-up, and wheel-event handling only when zoom is enabled; adds/updates tests, snapshots, and docs.

Reviewed changes

Copilot reviewed 28 out of 34 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/SnapshotTests/StackedRowSeriesTests.cs Adds snapshot regression test for mixed-sign stacked row rendering (#2152).
tests/SnapshotTests/StackedAreaTests.cs Adds snapshot regression test for mixed-sign stacked area baseline behavior (#2073).
tests/SnapshotTests/PieChartTests.cs Adds snapshot regressions for gauge values exceeding MaxValue/range (#2131).
tests/SnapshotTests/LineSeriesTests.cs Adds deterministic snapshot regression for null-gap interpolated inserts (#2132).
tests/SharedUITests/CartesianChartTests.cs Updates Avalonia UI test to use new #1986 repro and wait for async data load.
tests/CoreTests/SeriesTests/StackedStepAreaSeriesTest.cs Updates core assertions to match new 3-track stack semantics (positive/negative/cumulative).
tests/CoreTests/SeriesTests/StackedAreaSeriesTest.cs Updates core assertions to match new 3-track stack semantics (positive/negative/cumulative).
tests/CoreTests/OtherTests/ChartInteractiveApiTests.cs Adds tests for granular zoom/pan flags and NoFit honoring in manual Zoom().
tests/SnapshotTests/Snapshots/StackedRowSeriesTests_Issue2152_MixedSigns.png Adds baseline image for new stacked-row regression.
tests/SnapshotTests/Snapshots/StackedAreaTests_Issue2073_MixedSigns.png Adds baseline image for new stacked-area regression.
tests/SnapshotTests/Snapshots/PieChartTests_GaugeValueExceedsMaxValue.png Adds baseline image for new pie-gauge clamp regression.
tests/SnapshotTests/Snapshots/StackedColumnsTests_Basic.png Updates stacked-columns baseline to reflect corrected behavior.
src/LiveChartsCore/Measure/VectorManager.cs Rewrites consecutive segment management to avoid stale eviction/RemoveAt path shifting; adds TrimTail().
src/LiveChartsCore/CoreLineSeries.cs Removes unsafe Count==1 cleanup, seeds new visuals consistently, uses cumulative stacking, calls TrimTail().
src/LiveChartsCore/CoreStepLineSeries.cs Mirrors CoreLineSeries fixes (cleanup removal, cumulative stacking, TrimTail(), new-visual seeding).
src/LiveChartsCore/CorePolarLineSeries.cs Mirrors line-series fixes for polar paths and stacked baseline (cumulative).
src/LiveChartsCore/Kernel/Stacker.cs Adds cumulative stacking track and restores sign-segregated behavior for bars/rows.
src/LiveChartsCore/Kernel/StackedValue.cs Adds CumulativeStart/CumulativeEnd to expose new stacking track.
src/LiveChartsCore/CorePieSeries.cs Clamps gauge/pie stack end to effective total/range so sweep cannot exceed full angle (#2131).
src/LiveChartsCore/Measure/ZoomAndPanMode.cs Splits zoom/pan into granular flags (PanX/ZoomX/PanY/ZoomY) while keeping composites.
src/LiveChartsCore/CartesianChartEngine.cs Updates gesture logic to consult granular flags; ensures manual Zoom(...NoFit...) is honored.
src/LiveChartsCore/Motion/CoreMotionCanvas.cs Adds internal NotifyPlatformVisible() to bump frame timestamp for off-screen → visible transitions (Avalonia fix).
src/skiasharp/LiveChartsCore.SkiaSharp.Avalonia/SourceGenChart.cs Hooks EffectiveViewportChanged and triggers visibility wake-up + update when entering viewport.
src/skiasharp/LiveChartsCore.SkiaSharp.Avalonia/SourceGenCartesianChart.avalonia.cs Only handles wheel event when zoom is enabled (don’t swallow scroll when zoom disabled).
src/skiasharp/LiveChartsCore.SkiaSharpView.Eto/SourceGenCartesianChart.eto.cs Only handles mouse wheel when zoom is enabled (lets container scrolling work otherwise).
samples/AvaloniaSample/VisualTest/VirtualizationTest/View.axaml Removes old virtualization repro view (superseded by Issue1986Repro).
samples/AvaloniaSample/VisualTest/Issue1986Repro/ViewModel.cs Adds async-data-load repro viewmodel for Avalonia #1986 scenario.
samples/AvaloniaSample/VisualTest/Issue1986Repro/View.axaml Adds richer TabControl+ScrollViewer repro UI with off-screen charts.
samples/AvaloniaSample/VisualTest/Issue1986Repro/View.axaml.cs Wires DataContext and kicks off async load; exposes helpers for UI tests.
samples/AvaloniaSample/MainWindowViewModel.cs Registers the Avalonia-only Issue1986 repro in the sample list.
docs/samples/lines/zoom/template.md Documents granular zoom/pan flags and examples.
docs/cartesianChart/axes.md Documents granular zoom/pan flags and examples.

Comment on lines 58 to +77
/// <summary>
/// Disables data bounds fitting when zooming or panning, this flag must be used in conjunction with
/// <see cref="X"/>, <see cref="Y"/>, or <see cref="Both"/> to have an effect.
/// any of the pan/zoom flags (<see cref="PanX"/>, <see cref="ZoomX"/>, <see cref="PanY"/>, <see cref="ZoomY"/>,
/// <see cref="X"/>, <see cref="Y"/>, or <see cref="Both"/>) to have an effect.
/// </summary>
NoFit = 1 << 2,
NoFit = 1 << 4,

/// <summary>
/// Disables the "Zoom by section" feature, which allows zooming in on a specific section of the chart.
/// </summary>
NoZoomBySection = 1 << 3,
NoZoomBySection = 1 << 5,

/// <summary>
/// When this flag is present the panning will be triggered using the right click on desktop devices and the touch-and-hold gesture on touch devices.
/// The "Zoom by section" feature will be triggered to the left click on desktop devices and the touch-and-hold gesture on touch devices,
/// this flag must be used in conjunction with
/// <see cref="X"/>, <see cref="Y"/>, or <see cref="Both"/> to have an effect.
/// When this flag is present the panning will be triggered using the right click on desktop devices and a double tap on touch devices.
/// The "Zoom by section" feature will be triggered by the left click on desktop devices and a single tap on touch devices,
/// this flag must be used in conjunction with any of the pan/zoom flags
/// (<see cref="PanX"/>, <see cref="ZoomX"/>, <see cref="PanY"/>, <see cref="ZoomY"/>,
/// <see cref="X"/>, <see cref="Y"/>, or <see cref="Both"/>) to have an effect.
/// </summary>
InvertPanningPointerTrigger = 1 << 6,
@beto-rodriguez
beto-rodriguez merged commit a52d9d0 into release/v2.0.x Apr 28, 2026
43 checks passed
@beto-rodriguez
beto-rodriguez deleted the backport/v2.0.x-fixes branch April 28, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants