Basic

This sample uses C# 12 features, it also uses features from the CommunityToolkit.Mvvm package, you can learn more about it here.

This web site wraps every sample using a UserControl instance, but LiveCharts controls can be used inside any container.

sample image

View model

using LiveChartsCore;
using LiveChartsCore.Measure;
using LiveChartsCore.SkiaSharpView;
using LiveChartsCore.SkiaSharpView.Painting;
using LiveChartsCore.SkiaSharpView.VisualElements;
using SkiaSharp;

namespace ViewModelsSamples.Polar.Basic;

public class ViewModel
{
    public ISeries[] Series { get; set; } = [
        new PolarLineSeries<double>
        {
            Values = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],
            DataLabelsPaint = new SolidColorPaint(new SKColor(30, 30, 30)),
            GeometrySize = 15,
            DataLabelsSize = 8,
            DataLabelsPosition = PolarLabelsPosition.Middle,
            DataLabelsRotation = LiveCharts.CotangentAngle,
            IsClosed = true
        }
    ];

    public PolarAxis[] RadialAxes { get; set; } = [
        new PolarAxis
        {
            LabelsAngle = -60,
            MaxLimit = 30, // null to let the chart autoscale (defualt is null) // mark
        }
    ];

    public PolarAxis[] AngleAxes { get; set; } = [
        new PolarAxis
        {
            LabelsRotation = LiveCharts.TangentAngle,
            //IsInverted = true // enables counter clockwise draw. // mark
        }
    ];

    public LabelVisual Title { get; set; } =
        new LabelVisual
        {
            Text = "My chart title",
            TextSize = 25,
            Padding = new LiveChartsCore.Drawing.Padding(15),
            Paint = new SolidColorPaint(SKColors.DarkSlateGray)
        };
}

XAML

<UserControl x:Class="AvaloniaSample.Polar.Basic.View"
             xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:lvc="using:LiveChartsCore.SkiaSharpView.Avalonia"
             xmlns:vms="using:ViewModelsSamples.Polar.Basic">
  <UserControl.DataContext>
    <vms:ViewModel/>
  </UserControl.DataContext>
    <Grid>
        <lvc:PolarChart
            Series="{Binding Series}"
            AngleAxes="{Binding AngleAxes}"
            RadiusAxes="{Binding RadialAxes}"
            Title="{Binding Title}">
        </lvc:PolarChart>
    </Grid>
</UserControl>

Articles you might also find useful: