Bar Series does not redraw in iOS, Is there any method that can be used to refresh/redraw?

8 posts, 0 answers
  1. Ram Prasad
    Ram Prasad avatar
    6 posts
    Member since:
    Mar 2017

    Posted 03 May Link to this post

    Hi,

    We are using Xamarin forms controls of telerik UI for Xamarin.

    Bar series in Charts is not rendering it's bars in iOS. This is a case where I first bind chart to a collection with Zero Values(for Numberic Axis) and change data of values to Non-Zero values, then it does not redraw Bars but it shows labels (data points) with updated numbers/values.

    In other case, i.e., bind chart to collection with Non-zero values first then change to zero values, works fine.

     

    I am able to reproduce this with your samples (SDKBrowser). Is there any way to force redraw bars??

     

    Thanks,

    Ram prasad

     

     

     

     

  2. Rosy Topchiyska
    Admin
    Rosy Topchiyska avatar
    586 posts

    Posted 03 May Link to this post

    Hi Ram,

    Thank you for contacting us.

    Indeed there is an issue where chart axis is not updated when the data has changed. I have logged it in our feedback portal where you can track its status. I have also added telerik points to your account as a token of gratitude for bringing this issue to our attention.

    As a workaround, you can reset the chart axis to force the chart to update its data.
    chart.Series[0].ItemsSource = GetCategoricalData();
    chart.VerticalAxis = new NumericalAxis();

    Please, let us know if you have further questions.

    Regards,
    Rosy Topchiyska
    Telerik by Progress
    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
  3. Ram Prasad
    Ram Prasad avatar
    6 posts
    Member since:
    Mar 2017

    Posted 11 Jul Link to this post

    Hello, 

    The above solution does not seem to work. Is there any fix or update on this issue?

    Thanks,

    Ram prasad

     

  4. Ves
    Admin
    Ves avatar
    2914 posts

    Posted 14 Jul Link to this post

    Hi Ram,

    Please, use the following approach -- clear the series source explicitly before assigning the new one:
    chart.Series[0].ItemsSource = null;
    chart.Series[0].ItemsSource = GetCategoricalData();
    chart.VerticalAxis = new NumericalAxis();

    In addition, please make sure you use the latest release -- version 2017.2.626.

    Best regards,
    Ves
    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
  5. Thomas
    Thomas avatar
    2 posts
    Member since:
    Jul 2017

    Posted 24 Jul in reply to Ves Link to this post

    Hi Ves,

     

    How would resetting the source work if the ItemSource is bound to an observable collection in Xaml?

     

    Thanks

  6. Lance | Tech Support Engineer, Sr.
    Admin
    Lance | Tech Support Engineer, Sr. avatar
    419 posts

    Posted 25 Jul Link to this post

    Hello Thomas,

    You can set the binding programmatically as you would normally do in any XAML framework, using the DependencyProperty in the SetBinding method. In Xamarin.Forms, the SetBinding method is used as well, see the Xamarin.Forms documentation here.

    The LineSeries object, inherits from ChartSeries (see the class hierarchy here). ChartSeries has a property named ItemsSource (the DependencyProperty is named ItemsSourceProperty).

    Thus, you can use the following SetBinding implementation:

    // In XAML <telerikChart:LineSeries x:Name="MyLineSeries"
    //                                  ItemsSource = "{Binding DataItems}" >
     
    // In C#
    MyLineSeries.SetBinding(ChartSeries.ItemsSourcePropertynew Binding("DataItems"));


    Regards,
    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
  7. Ganesh
    Ganesh avatar
    11 posts
    Member since:
    Jun 2017

    Posted 07 Aug Link to this post

    Hi,

    I have the same issue, I am unable to show Bar graphs according to my Data from server.

    I am adding the data to observable collection after server call in viewmodel, But the bar graphs are not drawing.

    I am using the latest dll.

    let me know how to update the bars according to the data after server call.

    Thank you,

     

  8. Lance | Tech Support Engineer, Sr.
    Admin
    Lance | Tech Support Engineer, Sr. avatar
    419 posts

    Posted 07 Aug Link to this post

    Hello Ganesh,

    See Rosy's or  Ves's reply above, this is what you'll currently need to do in order to re-draw the series after an items update.

    We are aware of the issue and are working on a fix that will be in an upcoming release. This is a high priority item and you can track the status of the issue here in our feedback portal.

    Regards,
    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