Files
aistudio-wpf-diagram/Live-Charts-master/Examples/UWP/CartesianChart/Events/EventsExample.xaml
2021-07-23 09:42:22 +08:00

34 lines
1.7 KiB
XML

<Page x:Class="UWP.CartesianChart.Events.EventsExample"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:lvc="using:LiveCharts.Uwp"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<lvc:CartesianChart Grid.Row="1" Name="Chart" Zoom="Xy"
DataClick="ChartOnDataClick"
DataHover="Chart_OnDataHover"
UpdaterTick="ChartOnUpdaterTick"
DataClickCommand="{Binding DataClickCommand}"
DataHoverCommand="{Binding DataHoverCommand}"
UpdaterTickCommand="{Binding UpdaterTickCommand}">
<lvc:CartesianChart.AxisX>
<lvc:Axis RangeChanged="Axis_OnRangeChanged"
RangeChangedCommand="{Binding RangeChangedCommand}"/>
</lvc:CartesianChart.AxisX>
<lvc:CartesianChart.Series>
<lvc:LineSeries Values="{Binding Values}"
Fill="Transparent"
StrokeThickness="4"
PointGeometrySize="25"/>
</lvc:CartesianChart.Series>
</lvc:CartesianChart>
</Grid>
</Page>