-
Notifications
You must be signed in to change notification settings - Fork 678
Open
Labels
Description
<PackageReference Include="LiveChartsCore.SkiaSharpView.Avalonia" Version="2.0.0-rc6.1" />
AMAML
<lvc:CartesianChart Grid.Row="1" LegendPosition="Top" Series="{Binding Series}" XAxes="{Binding XAxes}" YAxes="{Binding YAxes}" Background="WhiteSmoke"/>
C#
public ISeries[] Series { get; set; } = new ISeries[]
{
new LineSeries<int> { Stroke=new SolidColorPaint(SKColors.Blue),Name = "qty", Values = null },
new LineSeries<int> { Stroke=new SolidColorPaint(SKColors.Green),Name = "ok", Values = null },
new LineSeries<int> { Stroke=new SolidColorPaint(SKColors.Red),Name = "ng", Values = null },
};
public Axis[] XAxes { get; set; } = new Axis[]
{
new Axis{ Name = "data",MinStep=1, Labels=new string[]{ }}
};
public Axis[] YAxes { get; set; } = new Axis[]
{
new Axis{ Name = "",MinLimit=0}
};
C# Button
XAxes[0].Labels = dbdata.Select(o => o.day.ToString()).ToArray();
Series[0].Values = dbdata.Select(o => o.count).ToArray();
Series[1].Values = dbdata.Select(o => o.okCount).ToArray();
Series[2].Values = dbdata.Select(o => o.notCount).ToArray();
Switching between individual points, success
https://github.com/user-attachments/assets/1b26215c-9952-4389-b0d0-c9cd200bf020

Switching between multiple points and a single point failed
https://github.com/user-attachments/assets/dff113fe-9968-4e8e-b474-2770ecf0e2a9

Reactions are currently unavailable