C# .NET - Who is Michael Detras? - Asked By wanlan meng on 24-Sep-13 11:05 PM

I read the article you wrote 
https://www.nullskull.com/a/1487/scrolling-in-wpf-toolkits-column-chart.aspx
Now I want to add more data to the Chart,but the operating results are not ideal.Before the addition of XAML:
<Window x:Class="WPFToolkitChartScrollDemo.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="clr-namespace:WPFToolkitChartScrollControls;assembly=WPFToolkitChartScrollControls"
    xmlns:charting="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"
    Title="MainWindow" Height="400" Width="500">
    <Grid>
        <charting:Chart>
            <charting:Chart.Series>
                <controls:ScrollableColumnSeries
                    IndependentValueBinding="{Binding Name}"
                    DependentValueBinding="{Binding Quantity}"
                    ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Window}, Path=Parts}"/>
            </charting:Chart.Series>
        </charting:Chart>
    </Grid>
</Window>

And After the additon of XAML:
<Window x:Class="WPFToolkitChartScrollDemo.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="clr-namespace:WPFToolkitChartScrollControls;assembly=WPFToolkitChartScrollControls"
    xmlns:charting="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"
    Title="MainWindow" Height="400" Width="500">
    <Grid>
        <charting:Chart>
            <charting:Chart.Series>
                <controls:ScrollableColumnSeries
                    IndependentValueBinding="{Binding Name}"
                    DependentValueBinding="{Binding Quantity}"
                    ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Window}, Path=Parts}"/>
                <controls:ScrollableColumnSeries
                    IndependentValueBinding="{Binding Name}"
                    DependentValueBinding="{Binding Quantity}"
                    ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Window}, Path=Parts2}"/>

            </charting:Chart.Series>
        </charting:Chart>
    </Grid>
</Window>                                                                                                                                                                                                                      
百度在线翻译#auto/zh/#auto/zh/#zh/en/#zh/en/#zh/en/%E6%9C%AA%E6%B7%BB%E5%8A%A0%E5%89%8D%E7%9A%84xaml#zh/en/#zh/en/%E5%BD%93%E6%8B%96%E5%8A%A8%E6%BB%9A%E5%8A%A8%E6%9D%A1%E7%9A%84%E6%97%B6%E5%80%99%EF%BC%8C%E5%8F%AA%E7%94%A8series#zh/en/%E5%BD%93%E6%8B%96%E5%8A%A8%E6%BB%9A%E5%8A%A8%E6%9D%A1%E7%9A%84%E6%97%B6%E5%80%99%EF%BC%8C%E5%8F%AA%E7%94%A8series%5B0%5D%E7%9A%84%E6%95%B0%E6%8D%AE%E7%B3%BB%E5%88%97%E5%8F%91%E7%94%9F%E6%94%B9%E5%8F%98%EF%BC%8C%E8%80%8Cseries#zh/en/%E5%BD%93%E6%8B%96%E5%8A%A8%E6%BB%9A%E5%8A%A8%E6%9D%A1%E7%9A%84%E6%97%B6%E5%80%99%EF%BC%8C%E5%8F%AA%E7%94%A8series%5B0%5D%E7%9A%84%E6%95%B0%E6%8D%AE%E7%B3%BB%E5%88%97%E5%8F%91%E7%94%9F%E6%94%B9%E5%8F%98%EF%BC%8C%E8%80%8Cseries%5B1%5D%E7%9A%84%E5%8D%B4%E6%B2%A1%E6%9C%89%E5%8F%98%E5%8C%96

When the scroll, only the series[0] data series change, while series[1] did not change. Can you help me? Thanks in advance!