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.
I am using LiveCharts2 in my Avalonia UI project on Windows and I’m encountering an issue when I try to set the series.CornerRadius property for a PieSeries.
Here’s a snippet of my code:
public ObservableCollection<PieSeries<ObservableValue>> Series { get; set; } =
GaugeGenerator.BuildSolidGauge(
new GaugeItem(30, series =>
{
series.Fill = new SolidColorPaint(new SKColor(0, 255, 0));
series.DataLabelsSize = 50;
series.DataLabelsPaint = series.Fill;
series.DataLabelsPosition = PolarLabelsPosition.ChartCenter;
series.InnerRadius = 85;
// series.CornerRadius = 30; // This line causes the issue
}),
new GaugeItem(GaugeItem.Background, series =>
{
series.InnerRadius = 85;
series.Fill = new SolidColorPaint(new SKColor(0, 255, 0, 20));
}));
When I try to uncomment the line series.CornerRadius = value;, my program freezes and the user interface becomes unresponsive. I can’t click on other buttons or interact with the user interface in any way.
I’ve tried running this operation in a try/catch block and on a separate thread using Task.Run(), but the issue persists.
Any help on how to resolve this issue would be greatly appreciated. Thank you!
I am using LiveCharts2 in my Avalonia UI project on Windows and I’m encountering an issue when I try to set the series.CornerRadius property for a PieSeries.
Here’s a snippet of my code:
When I try to uncomment the line series.CornerRadius = value;, my program freezes and the user interface becomes unresponsive. I can’t click on other buttons or interact with the user interface in any way.
I’ve tried running this operation in a try/catch block and on a separate thread using Task.Run(), but the issue persists.
Any help on how to resolve this issue would be greatly appreciated. Thank you!