Basic Gauge
View model
using System.Collections.Generic;
using LiveChartsCore;
using LiveChartsCore.SkiaSharpView;
using CommunityToolkit.Mvvm.ComponentModel;
namespace ViewModelsSamples.Pies.Gauge1;
public partial class ViewModel : ObservableObject
{
public IEnumerable<ISeries> Series { get; set; }
= new GaugeBuilder()
.WithMaxColumnWidth(30)
.AddValue(30)
.BuildSeries();
}
using Eto.Forms;
using LiveChartsCore.SkiaSharpView.Eto;
using ViewModelsSamples.Pies.Gauge1;
namespace EtoFormsSample.Pies.Gauge1;
public class View : Panel
{
private readonly PieChart pieChart;
public View()
{
var viewModel = new ViewModel();
pieChart = new PieChart
{
Series = viewModel.Series,
InitialRotation = -90,
Total = 100,
};
Content = pieChart;
}
}
Articles you might also find useful: