beto-rodriguez / LiveCharts2

Simple, flexible, interactive & powerful charts, maps and gauges for .Net, LiveCharts2 can now practically run everywhere Maui, Uno Platform, Blazor-wasm, WPF, WinForms, Xamarin, Avalonia, WinUI, UWP.
https://livecharts.dev
MIT License
4.38k stars 572 forks source link

Graphs have a black background on Uno MacCatalyst #1681

Open d2dyno1 opened 3 weeks ago

d2dyno1 commented 3 weeks ago

Describe the bug Using CartesianChart while running under Uno on MacCatalyst will result in a broken, black background. In addition, when the graph is loaded, horizontal guidelines are shown until the graph is resized via an animation.

To Reproduce Steps to reproduce the behavior:

  1. Create a new Uno App
  2. Install the latest version of LiveCharts2 -- (RC-4.5) LiveChartsCore.SkiaSharpView.Uno.WinUI
  3. Create a new simple cartesian chart and fill it with sample data
  4. See a black background, horizontal lines drawn, and custom gradient color not being applied

Sample code:

UnoApp54.zip

Expected behavior Graph background should be transparent when set, the graph should not flicker when loading, horizontal lines shouldn't be drawn when not specified, and custom gradient should be applied.

Screenshots

https://github.com/user-attachments/assets/5c52309e-00ad-47c2-a969-1e8be3c9320e

Desktop (please complete the following information):

Additional context This issue was already present a couple of releases ago. It is most likely also present on Uno Linux X11 since it uses Skia, however, I haven't tested it.