locked
Chart reset? RRS feed

  • Question

  • Hi

    I have a chart from System.Windows.Controls.DataVisualization.Charting;

    
    <chartingToolkit:Chart x:Name="mcChart" 
    	Style="{DynamicResource ChartStyle1}">
    	<chartingToolkit:LineSeries
    		DataPointStyle="{DynamicResource LineDataPointStyle1}" 	Style="{DynamicResource BackgroundLineSeriesStyle}" PolylineStyle="{DynamicResource MainPolylineStyle}" 									
    	/>
    
    </chartingToolkit:Chart>
    

    c#:

    LineSeries ls = new LineSeries();
          ls.IndependentValueBinding = new Binding("Key");
          ls.DependentValueBinding = new Binding("Value");
    List<KeyValuePair<double, double>> lst = ....
    ls.ItemsSource = lst;
    mcChart.Series.Clear();
    mcChart.Series.Add(ls);
    

    When I wanted to change data on the chart the Axis properties are still from previews chart.
    How to reset Axis, or whole control?

    Liriann.

     

     

     

     

    Thursday, February 3, 2011 8:07 AM

Answers