Chart Axes intervals and lineseries

Sep 19, 2014 at 6:08 AM
Hi,

Using the below code i could change the x and y axis intervals but the graph is not chaging based on that. I want the lineseries should change based on the intervals. Is that possible?

XAML:

<wpfTool:Chart Name="mcChart" DockPanel.Dock="Top" DragLeave="Chart_DragLeave" AllowDrop="True" Width="500" Height="500" PreviewMouseWheel="mcChart_PreviewMouseWheel"
           MaxHeight="500" MaxWidth="500"  PreviewDragLeave="mcChart_PreviewDragLeave">
        <wpfTool:Chart.Axes>
            <wpfTool:DateTimeAxis Name="XAxis" Orientation="X" ShowGridLines="True" AllowDrop="True" />
            <wpfTool:LinearAxis Name="YAxis" Orientation="Y"  ShowGridLines="True" AllowDrop="True" />
        </wpfTool:Chart.Axes>
<wpfTool:LineSeries Name="Line1" IsSelectionEnabled="True"
                ItemsSource="{Binding Path=Data1}"
                IndependentValuePath="Date"
                DependentValuePath="Value"/>
        <wpfTool:LineSeries Name="Line2"
                ItemsSource="{Binding Path=Data2}"
                IndependentValueBinding="{Binding Date}"
                DependentValueBinding="{Binding Value}"/>            
    </wpfTool:Chart>
XAML.cs: private void mcChart_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
    {
          if (e.Delta > 0)
        {
            XAxis.Interval -= 0.5;
            YAxis.Interval -= 0.5;
        }
        else
        {
            XAxis.Interval += 0.5;
            YAxis.Interval += 0.5;
        }
    }