<UserControl
    x:Class="SalesDashboard.SalesByCategory"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:SalesDashboard"
    xmlns:c1="using:C1.Xaml.Chart"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="400" Loaded="UserControl_Loaded_1">

    <Grid Background="Black">
        <Grid Margin="5">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <TextBlock Text="Sales by Category" Style="{StaticResource PageSubheaderTextStyle}" />
            <c1:C1Chart x:Name="c1Chart1" ChartType="PieDoughnut"  Grid.Row="1">
                <c1:C1Chart.Data>
                    <c1:ChartData ItemsSource="{Binding SalesByCategory}">
                        <c1:ChartData.Children>
                        <c1:DataSeries ValueBinding="{Binding}" PlotElementLoaded="DataSeries_PlotElementLoaded_1" SymbolStrokeThickness="0" Opacity="0.9"/>
                        </c1:ChartData.Children>
                    </c1:ChartData>
                </c1:C1Chart.Data>
                <c1:C1ChartLegend Position="Bottom" />
            </c1:C1Chart>
        </Grid>
    </Grid>
</UserControl>
