mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-13 04:59:26 +08:00
添加项目文件。
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
using LiveCharts;
|
||||
using LiveCharts.Uwp;
|
||||
using System;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
|
||||
// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
|
||||
|
||||
namespace UWP.CartesianChart.Basic_Bars
|
||||
{
|
||||
/// <summary>
|
||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
||||
/// </summary>
|
||||
public sealed partial class BasicRowExample : Page
|
||||
{
|
||||
public BasicRowExample()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
SeriesCollection = new SeriesCollection
|
||||
{
|
||||
new RowSeries
|
||||
{
|
||||
Title = "2015",
|
||||
Values = new ChartValues<double> { 10, 50, 39, 50 }
|
||||
}
|
||||
};
|
||||
|
||||
//adding series will update and animate the chart automatically
|
||||
SeriesCollection.Add(new RowSeries
|
||||
{
|
||||
Title = "2016",
|
||||
Values = new ChartValues<double> { 11, 56, 42 }
|
||||
});
|
||||
|
||||
//also adding values updates and animates the chart automatically
|
||||
SeriesCollection[1].Values.Add(48d);
|
||||
|
||||
Labels = new[] { "Maria", "Susan", "Charles", "Frida" };
|
||||
Formatter = value => value.ToString("N");
|
||||
}
|
||||
|
||||
public SeriesCollection SeriesCollection { get; set; }
|
||||
public string[] Labels { get; set; }
|
||||
public Func<double, string> Formatter { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user