Radial Area
View model
using LiveChartsCore;
using LiveChartsCore.SkiaSharpView;
using LiveChartsCore.SkiaSharpView.Painting;
using SkiaSharp;
namespace ViewModelsSamples.Polar.RadialArea;
public class ViewModel
{
public ISeries[] Series { get; set; } = [
new PolarLineSeries<int>
{
Values = [7, 5, 7, 5, 6],
LineSmoothness = 0,
GeometrySize= 0,
Fill = new SolidColorPaint(SKColors.Blue.WithAlpha(90))
},
new PolarLineSeries<int>
{
Values = [2, 7, 5, 9, 7],
LineSmoothness = 1,
GeometrySize = 0,
Fill = new SolidColorPaint(SKColors.Red.WithAlpha(90))
}
];
public PolarAxis[] AngleAxes { get; set; } = [
new PolarAxis
{
LabelsRotation = LiveCharts.TangentAngle,
Labels = ["first", "second", "third", "forth", "fifth"]
}
];
}
using Eto.Forms;
using LiveChartsCore.SkiaSharpView.Eto;
using ViewModelsSamples.Polar.RadialArea;
namespace EtoFormsSample.Polar.RadialArea;
public class View : Panel
{
/// <summary>
/// Initializes a new instance of the <see cref="View"/> class.
/// </summary>
public View()
{
var viewModel = new ViewModel();
var polarChart = new PolarChart
{
Series = viewModel.Series,
AngleAxes = viewModel.AngleAxes,
InitialRotation = -45,
};
Content = polarChart;
}
}
Articles you might also find useful: