-
Notifications
You must be signed in to change notification settings - Fork 678
Open
Labels
Description
LiveChartsCore.SkiaSharpView.Avalonia The Strokes in the LineSeries are inconsistent
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();
preview

Reactions are currently unavailable