How two datasource binding for one radchart

2 posts, 0 answers
  1. dao hong ninh
    dao hong ninh avatar
    7 posts
    Member since:
    Mar 2010

    Posted 07 Oct 2010 Link to this post

    I have one RadChart and one RadCombobox. The RadCombobox has two value.
         1. Value one -> DataSource (name is "datasource1")
         2. Value two -> DataSource (name is "datasource2")
    When RadComboBox selected Change ,I reassign data and I binding "data" datasource for RadChart (name is "rdChart")

    With rdChart              
                    .ItemsSource = Nothing
                    .SeriesMappings.RemoveAll()               
                    Me.AddSeries()          ' readd series for radchart
                    .ItemsSource = data
    End With
    But RadComboBox is value two, I have throw error:
    at Telerik.Windows.Controls.Charting.PlotAreaAxisX2D.CalculateTopOffset(IDataAxis controlAxis)
       at Telerik.Windows.Controls.Charting.PlotAreaAxisX2D.SetPosition(IDataAxis controlAxis)
       at Telerik.Windows.Controls.Charting.PlotAreaAxisX2D.VerticalDataAxisRangeChanged(Object sender, EventArgs e)
       at Telerik.Windows.Controls.Charting.Axis.OnRangeChanged(EventArgs args)
       at Telerik.Windows.Controls.Charting.Axis.UpdateRangeAndStep(Double minValue, Double maxValue, Double step)
       at Telerik.Windows.Controls.Charting.Axis.UpdateRangeAndStep()
       at Telerik.Windows.Controls.Charting.Axis.BuildAxisData()
       at Telerik.Windows.Controls.Charting.AxisY.BuildAxisData()
       at Telerik.Windows.Controls.Charting.Axis.UpdateAxis()
       at Telerik.Windows.Controls.Charting.AxisY.UpdateAxis()
       at Telerik.Windows.Controls.Charting.Axis.ChartAreaDataChanged(Object sender, EventArgs e)
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at Telerik.Windows.Controls.Charting.ChartArea.OnDataChanged()
       at Telerik.Windows.Controls.Charting.ChartArea.UpdateChart()
       at Telerik.Windows.Controls.Charting.ChartArea.OnDataSeriesCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
       at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at Telerik.Windows.Data.RadObservableCollection`1.ResumeNotifications()
       at Telerik.Windows.Controls.Charting.RadHierarchicalObservableCollection`1.AddRange(IEnumerable`1 items)
       at Telerik.Windows.Controls.RadChart.GenerateDataSeries(Object originalData, SeriesMappingCollection seriesMappings, ChartArea chartArea)
       at Telerik.Windows.Controls.RadChart.GenerateDataSeries(Object originalData)
       at Telerik.Windows.Controls.RadChart.Rebind(Object originalData)
       at Telerik.Windows.Controls.RadChart.ItemsSourcePropertyChanged(DependencyObject target, DependencyPropertyChangedEventArgs args)
       at Telerik.Windows.PropertyMetadata.<>c__DisplayClass1.<Create>b__0(DependencyObject d, DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
       at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
       at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet)
       at Telerik.Windows.Controls.RadChart.set_ItemsSource(Object value) 

    I using telerik Q2 2010 SP2.
  2. Velin
    Admin
    Velin avatar
    391 posts

    Posted 13 Oct 2010 Link to this post

    Hello dao hong ninh,

    Following your instructions I was unable to reproduce the problematic behavior. Please find attached my sample project.


    Sincerely yours,
    Ryan
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top