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

31 lines
1.4 KiB
XML

<Page
x:Class="UWP.CartesianChart.StackedBar.StackedColumnExample"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:UWP.CartesianChart.StackedBar"
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="*"></RowDefinition>
</Grid.RowDefinitions>
<Button Height="30" Click="UpdateAllOnClick" HorizontalAlignment="Stretch">
Move All
</Button>
<lvc:CartesianChart Grid.Row="1" Series="{Binding SeriesCollection}">
<lvc:CartesianChart.AxisX>
<lvc:Axis Labels="{Binding Labels}">
<lvc:Axis.Separator>
<!--step 1 forces the axis to display all labels, disabling it makes it invisible-->
<lvc:Separator Step="1" IsEnabled="False"></lvc:Separator>
</lvc:Axis.Separator>
</lvc:Axis>
</lvc:CartesianChart.AxisX>
</lvc:CartesianChart>
</Grid>
</Page>