Bars are not redrawing when item source is updated

2 posts, 0 answers
  1. Thomas
    Thomas avatar
    2 posts
    Member since:
    Jul 2017

    Posted 22 Jul 2017 Link to this post

    Hi all,



    we have a XAML chart which works fine if data is set in the viewmodel when the page is drawn. If we update the observable collection (itemsource) later, only the x-axis labels are drawn but neither the bars nor the Y-axis is drawn (Xamarin Forms latest version with latests version of Telerik charts)


    Here is our XAML:


          <telerikChart:RadCartesianChart Grid.Row="6" Margin="35,0,10,5" BackgroundColor="Red">
                      <telerikChart:PaletteEntry FillColor="White" StrokeColor="White"/>
                      <telerikChart:PaletteEntry FillColor="Pink" StrokeColor="Pink" />

                  <telerikChart:CartesianChartGrid StripLinesVisibility="None" YStripeColor="Red" YStripeAlternativeColor="Red" XStripeColor="Red" XStripeAlternativeColor="Red"/>   

              <telerikChart:CategoricalAxis LineColor="White" LabelTextColor="White" GapLength="0.7"/>
              <telerikChart:NumericalAxis LineColor="Red" LabelTextColor="White"/>
              <telerikChart:BarSeries CombineMode="Cluster" ItemsSource="{Binding Revenue, Mode=TwoWay}">
                  <telerikChart:PropertyNameDataPointBinding PropertyName="Value"/>
                  <telerikChart:PropertyNameDataPointBinding PropertyName="Category"/>
              <telerikChart:BarSeries CombineMode="Cluster" ItemsSource="{Binding Expenditure, Mode=TwoWay}">
                  <telerikChart:PropertyNameDataPointBinding PropertyName="Value"/>
                  <telerikChart:PropertyNameDataPointBinding PropertyName="Category"/>


    And here is the code which then updates the viewmodel - as said, the labels (Category) on the X-Axis work, but not the values or the Y-Axis:


                try {
                    List<SumStat> sumStatList = bindableDataPackage.sumStats;
                    var revenues = new ObservableCollection<CategoricalData>();
                    var expenditures = new ObservableCollection<CategoricalData>();

                    foreach (var stat in sumStatList) {
                        if (stat.sumplus < 50000) { 
                            revenues.Add(new CategoricalData { Category =, Value = stat.sumplus });
                            expenditures.Add(new CategoricalData { Category =, Value = stat.summinus });

    // these 2 properties of type observable collection trigger the update
                    Revenue = revenues;
                    Expenditure = expenditures;

                } catch (Exception e) {
                    StarFinanz.Core.Diagnostics.Trace.TraceInformation("Error: " + e.Message);

  2. Lance | Manager Technical Support
    Lance | Manager Technical Support avatar
    1195 posts

    Posted 25 Jul 2017 Link to this post

    Hi Thomas,

    I see that you've already had an opportunity to review the discussion in this thread about your question. the development team is aware of it and are working on it now.

    Rosita has shared the URL to the Feedback Portal item for this in that thread. For your convenience, here it is again. You can follow it to be notified of status changes. 

    Lance | Tech Support Engineer, Sr.
    Progress Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top