LogarithmScaleExample.xaml 1.42 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
<UserControl x:Class="Wpf.CartesianChart.LogarithmScale.LogarithmScaleExample"
             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:Wpf.CartesianChart.LogarithmScale"
             xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <lvc:CartesianChart Series="{Binding SeriesCollection}">
            <lvc:CartesianChart.Resources>
                <Style TargetType="lvc:Separator">
                    <Setter Property="Stroke" Value="LightGray"></Setter>
                </Style>
            </lvc:CartesianChart.Resources>
            <lvc:CartesianChart.AxisX>
                <lvc:LogarithmicAxis LabelFormatter="{Binding Formatter}" 
                                     Base="{Binding Base}" >
                    <lvc:LogarithmicAxis.Separator>
                        <lvc:Separator StrokeThickness="1" IsEnabled="True"></lvc:Separator>
                    </lvc:LogarithmicAxis.Separator>
                </lvc:LogarithmicAxis>
            </lvc:CartesianChart.AxisX>
        </lvc:CartesianChart>
    </Grid>
</UserControl>