mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-15 14:06:47 +08:00
添加项目文件。
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<Page
|
||||
x:Class="UWP.CartesianChart.InLineSyntax.InLineSyntaxTest"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:UWP.CartesianChart.InLineSyntax"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:lc="using:LiveCharts.Uwp"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"></RowDefinition>
|
||||
<RowDefinition Height="*"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock>This chart is totally built with XAML.</TextBlock>
|
||||
<lc:CartesianChart Grid.Row="1">
|
||||
<lc:CartesianChart.Series>
|
||||
<lc:LineSeries Values="{x:Bind LineSeries1}" />
|
||||
<lc:LineSeries Values="{x:Bind LineSeries2}" />
|
||||
</lc:CartesianChart.Series>
|
||||
<lc:CartesianChart.AxisX>
|
||||
<lc:Axis Labels="{x:Bind Labels}"/>
|
||||
</lc:CartesianChart.AxisX>
|
||||
</lc:CartesianChart>
|
||||
</Grid>
|
||||
</Page>
|
||||
@@ -0,0 +1,24 @@
|
||||
using LiveCharts;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
|
||||
// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
|
||||
|
||||
namespace UWP.CartesianChart.InLineSyntax
|
||||
{
|
||||
/// <summary>
|
||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
||||
/// </summary>
|
||||
public sealed partial class InLineSyntaxTest : Page
|
||||
{
|
||||
public InLineSyntaxTest()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
public IChartValues LineSeries1 { get; set; } = new ChartValues<int>(new int[] { 1, 2, 3, 5 });
|
||||
|
||||
public IChartValues LineSeries2 { get; set; } = new ChartValues<int>(new int[] { 4, 6, 2, 5 });
|
||||
|
||||
public string[] Labels { get; set; } = new string[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Ago", "Sep", "Oct" };
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user