项目结构调整

This commit is contained in:
艾竹
2023-04-16 20:11:40 +08:00
parent cbfbf96033
commit 81f91f3f35
2124 changed files with 218 additions and 5516 deletions

View File

@@ -0,0 +1,49 @@
using System;
using System.Windows.Controls;
using LiveCharts;
using LiveCharts.Wpf;
namespace Wpf.CartesianChart.BasicLine
{
public partial class BasicLineExample : UserControl
{
public BasicLineExample()
{
InitializeComponent();
SeriesCollection = new SeriesCollection
{
new LineSeries
{
Title = "Series 1",
Values = new ChartValues<double> { 4, 6, 5, 2 ,7 }
},
new LineSeries
{
Title = "Series 2",
Values = new ChartValues<double> { 6, 7, 3, 4 ,6 }
}
};
Labels = new[] {"Jan", "Feb", "Mar", "Apr", "May"};
YFormatter = value => value.ToString("C");
//modifying the series collection will animate and update the chart
SeriesCollection.Add(new LineSeries
{
Values = new ChartValues<double> {5, 3, 2, 4},
LineSmoothness = 0 //straight lines, 1 really smooth lines
});
//modifying any series values will also animate and update the chart
SeriesCollection[2].Values.Add(5d);
DataContext = this;
}
public SeriesCollection SeriesCollection { get; set; }
public string[] Labels { get; set; }
public Func<double, string> YFormatter { get; set; }
}
}