<Window x:Class="WpfApp1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
        xmlns:local="clr-namespace:WpfApp1"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <Grid>
        <lvc:CartesianChart Grid.Row="1"  Series="{Binding Series}" Margin="2,-25,2,10"
                            Hoverable="False" DisableAnimations="True" DataTooltip="{x:Null}" >
            <lvc:CartesianChart.AxisX>
                <lvc:Axis FontSize="16" MaxValue="{Binding XMax}" MinValue="{Binding XMin}">
                    <lvc:Axis.Resources>
                        <Style TargetType="lvc:AxisSection" x:Key="AxisSectionStyle">
                            <Setter Property="StrokeThickness" Value="0.5"/>
                            <Setter Property="DataLabel" Value="True"/>
                            <Setter Property="DisableAnimations" Value="True"/>
                            <Setter Property="DataLabelForeground" Value="White"/>
                            <Setter Property="Opacity" Value="0.5"/>
                            <Setter Property="Panel.ZIndex" Value="1"/>
                        </Style>
                    </lvc:Axis.Resources>
                    <lvc:Axis.Separator>
                        <lvc:Separator Stroke="LightGray"/>
                    </lvc:Axis.Separator>
                </lvc:Axis>
            </lvc:CartesianChart.AxisX>
            <lvc:CartesianChart.AxisY>
                <lvc:Axis IsEnabled="False" ShowLabels="False"/>
            </lvc:CartesianChart.AxisY>
        </lvc:CartesianChart>
    <Button Content="加载" Height="50" Width="80" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5" Click="Button_Click"/>
    </Grid>
</Window>
