Column Width
View model
using LiveChartsCore;
using LiveChartsCore.SkiaSharpView;
namespace ViewModelsSamples.Bars.Spacing;
public class ViewModel
{
public ISeries[] Series { get; set; } = [
new ColumnSeries<double>
{
Values = [ 20, 50, 40, 20, 40, 30, 50, 20, 50, 40 ],
// Defines the distance between every bars in the series
Padding = 0,
// Defines the max width a bar can have
MaxBarWidth = double.MaxValue
}
];
}
using Eto.Forms;
using LiveChartsCore.SkiaSharpView.Eto;
using ViewModelsSamples.Bars.Spacing;
namespace EtoFormsSample.Bars.Spacing;
public class View : Panel
{
/// <summary>
/// Initializes a new instance of the <see cref="View"/> class.
/// </summary>
public View()
{
var viewModel = new ViewModel();
var cartesianChart = new CartesianChart
{
Series = viewModel.Series,
};
Content = cartesianChart;
}
}
Articles you might also find useful: