Chart in Carousel/UIScrollView on iOS

13 posts, 1 answers
  1. Stephen
    Stephen avatar
    8 posts
    Member since:
    Jul 2016

    Posted 14 Sep Link to this post

    I have a chart embedded in a carousel, and ultimately in a UIScrollView, inside the iOS renderer. Has anyone gotten this to work? It works fine in Android, but not iOS. 

    It seems like the chart plot area is hijacking any attempts to pan the scroll view, because I can scroll the charts using any other part of the view in the carousel, including both components outside the chart and the chart axes themselves.

    Has anyone used this chart like that, or do the devs know of an issue preventing the pan gesture from bubbling up? Thanks.

  2. Answer
    Adrian
    Admin
    Adrian avatar
    167 posts

    Posted 17 Sep Link to this post

    Hi, Stephen,

    Yes, we are aware about this issue. Currently TKChart handles swipe gestures event when pan and zoom are turned off. Here is the issue in our feedback portal. Feel free to vote/comment there. It will be addressed in a future release. Until then a possible solution is to turn off gestures for the chart view by setting its UserInteractionEnabled property to false.

    Regards,
    Adrian
    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. DevCraft banner
  4. Stephen
    Stephen avatar
    8 posts
    Member since:
    Jul 2016

    Posted 19 Sep in reply to Adrian Link to this post

    Thanks, Adrian. That did the trick.
  5. Stephen
    Stephen avatar
    8 posts
    Member since:
    Jul 2016

    Posted 19 Sep in reply to Adrian Link to this post

    I was going to start another thread, but it appears I've isolated this issue to being in the UIScrollView as well. I have a carousel/scroll view with four charts in it. The first chart gets real time data and refreshes by modifying the collection assigned to ItemsSource. This works great, however in iOS, the x-axis labels are clipped and not visible the majority of the time. Occasionally as data comes in, it's correct, but mostly its not. I also tried replacing the entire collection on updates, but that didn't make a difference.

    The other three charts in the view are static, and never have the issue.

    Please see the screenshots I've attached for reference. This is the same chart at different points in time with modified data.

    Thanks

  6. Adrian
    Admin
    Adrian avatar
    167 posts

    Posted 21 Sep Link to this post

    Hi, Stephen,

    A possible reason for this issue could be using multiline fit mode for the x axis labels. A possible workaround is setting the plot mode to None:
    chart.XAxis.Style.LabelStyle.FitMode = TKChartAxisLabelFitMode.None;

    I hope this helps.

    Regards,
    Adrian
    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
  7. Stephen
    Stephen avatar
    8 posts
    Member since:
    Jul 2016

    Posted 21 Sep in reply to Adrian Link to this post

    I'm not setting the fit mode anywhere, but I tried setting it to None explicitly, and there was no change. Oddly enough, using MultiLine was kind of better, because no labels were clipped mid-label. However, I'm pretty sure the lower of the multi-line labels was intermittently clipped entirely due to the same issue.

    I may use multi-line mode for now, because it doesn't look as broken, but some labels are missing entirely intermittently. For what it's worth, I'm using the Xamarin Forms product, not Xamarin.iOS directly. 

  8. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 26 Sep Link to this post

    Hi Stephen,

    Thanks for reporting this. It sounds like something is not working correctly on our side if the labels disappear intermittently. Can you please post a support ticket and attach a sample project that reproduces the issue? This way we can debug it and fix it if the problem is indeed on our side.

    Regards,
    Victor
    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
  9. Stephen
    Stephen avatar
    8 posts
    Member since:
    Jul 2016

    Posted 27 Sep in reply to Victor Link to this post

    Thanks. Hopefully I can reproduce it outside of our product, but I will try and get that submitted.
  10. Stephen
    Stephen avatar
    8 posts
    Member since:
    Jul 2016

    Posted 28 Sep in reply to Victor Link to this post

    Apparently I get no support at all with my license and can't submit a ticket? Crazy. I'm attaching the sample project here instead. Note that changing DateTimeMajorStep to 30 seconds in SensorReadingChartContentView:26, instead of 10, the labels are no longer cut off.

    I can only attach images, so try this link, valid for two days: http://expirebox.com/download/2ff2f94f2c717ff7ae9924843a6cc719.html

  11. Adrian
    Admin
    Adrian avatar
    167 posts

    Posted 30 Sep Link to this post

    Hello, Stephen,

    I downloaded the archive, however I will need more time to investigate the issue. I will get back to you when I am ready. Thank you for the cooperation.

    Regards,
    Adrian
    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
  12. Stephen
    Stephen avatar
    8 posts
    Member since:
    Jul 2016

    Posted 30 Sep in reply to Adrian Link to this post

    No problem. Thanks for letting me know.
  13. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 06 Oct Link to this post

    Hi Stephen,

    We managed to reproduce the issue on our side. We can confirm it is a bug in our code. This is why we logged in our backlog system. You can track its process using this item from our feedback portal. As a small sign of appreciation of your feedback I updated your points (+500).

    Regards,
    Pavel R. Pavlov
    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
  14. Stephen
    Stephen avatar
    8 posts
    Member since:
    Jul 2016

    Posted 06 Oct in reply to Pavel R. Pavlov Link to this post

    Excellent. Thanks, Pavel.
Back to Top
DevCraft banner