mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-19 16:06:35 +08:00
项目结构调整
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<Page
|
||||
x:Class="UWP.CartesianChart.LineExample.LineExample"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:UWP.CartesianChart.LineExample"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:lvc="using:LiveCharts.Uwp"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"></RowDefinition>
|
||||
<RowDefinition Height="Auto"></RowDefinition>
|
||||
<RowDefinition Height="*"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<lvc:CartesianChart Grid.Row="2">
|
||||
<lvc:CartesianChart.Series>
|
||||
<lvc:VerticalLineSeries Values="{Binding Values}" DataLabels="True" />
|
||||
</lvc:CartesianChart.Series>
|
||||
<lvc:CartesianChart.DataTooltip>
|
||||
<!--The Selection mode property should be done automatically in future versions-->
|
||||
<lvc:DefaultTooltip SelectionMode="SharedYValues"></lvc:DefaultTooltip>
|
||||
</lvc:CartesianChart.DataTooltip>
|
||||
</lvc:CartesianChart>
|
||||
</Grid>
|
||||
</Page>
|
||||
@@ -0,0 +1,32 @@
|
||||
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.LineExample
|
||||
{
|
||||
/// <summary>
|
||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
||||
/// </summary>
|
||||
public sealed partial class LineExample : Page
|
||||
{
|
||||
public LineExample()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
Values = Values = new ChartValues<float>
|
||||
{
|
||||
3,
|
||||
4,
|
||||
6,
|
||||
3,
|
||||
2,
|
||||
6
|
||||
};
|
||||
|
||||
DataContext = this;
|
||||
}
|
||||
|
||||
public ChartValues<float> Values { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user