﻿<Page
    x:Class="UWP.PieChart.DoughnutChartExample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:UWP.PieChart"
    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>
        <StackPanel Grid.Row="0" Orientation="Horizontal">
            <Button  Height="30" Click="UpdateAllOnClick" Padding="10 0">
                Move All
            </Button>
            <Button Height="30" Click="RestartOnClick">Restart</Button>
            <TextBlock VerticalAlignment="Center" Padding="10 0">Series</TextBlock>
            <Button Height="30" Click="AddSeriesOnClick" MinWidth="30">
                +
            </Button>
            <Button  Height="30" Click="RemoveSeriesOnClick" MinWidth="30">
                -
            </Button>
            <TextBlock VerticalAlignment="Center" Padding="10 0">Values</TextBlock>
            <Button Height="30" Click="AddValueOnClick" MinWidth="30">
                +
            </Button>
            <Button  Height="30" Click="RemoveValueOnClick" MinWidth="30">
                -
            </Button>

        </StackPanel>
        <lvc:PieChart Name="Chart" Grid.Row="1" Series="{Binding SeriesCollection}" 
                      LegendLocation="Right" InnerRadius="100" Margin="0 15">
            <lvc:PieChart.ChartLegend>
                <lvc:DefaultLegend BulletSize="20"></lvc:DefaultLegend>
            </lvc:PieChart.ChartLegend>
            <lvc:PieChart.DataTooltip>
                <lvc:DefaultTooltip BulletSize="20"></lvc:DefaultTooltip>
            </lvc:PieChart.DataTooltip>
        </lvc:PieChart>
    </Grid>
</Page>
