<pi:UserControlBase x:Class="智慧物流软件系统.OutputStatChartView"
             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:local="clr-namespace:智慧物流软件系统"
             xmlns:pi="https://github.com/ping9719/wpfex"
             xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800" LoadedVisibleFirst="loadFir">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>
        <TextBlock Text="{Binding Title,FallbackValue=当日生产统计}" HorizontalAlignment="Center" VerticalAlignment="Center" Style="{StaticResource TextBlockDefaultSecLight}"></TextBlock>
        <StackPanel Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="{Binding IsZero,Converter={StaticResource Boolean2VisibilityConverter}}">
            <TextBlock FontSize="40" FontFamily="{StaticResource IconFont}" Text="&#xeb91;">
                <TextBlock.Foreground>
                    <LinearGradientBrush EndPoint="0.5,1">
                        <GradientStop Color="White"/>
                        <GradientStop Color="Gray" Offset="1"/>
                    </LinearGradientBrush>
                </TextBlock.Foreground>
            </TextBlock>
            <TextBlock Foreground="Gray" HorizontalAlignment="Center">无数据</TextBlock>
        </StackPanel>
        <lvc:PieChart Grid.Row="1" LegendLocation="Bottom">
            <lvc:PieChart.Series>
                <lvc:PieSeries Title="合格" Fill="LimeGreen" Values="{Binding Values1}" DataLabels="True" LabelPoint="{Binding PointLabel}"/>
                <lvc:PieSeries Title="不合格" Fill="OrangeRed" Values="{Binding Values2}" DataLabels="True" LabelPoint="{Binding PointLabel}"/>
            </lvc:PieChart.Series>
        </lvc:PieChart>
    </Grid>
</pi:UserControlBase>
