This is a migrated thread and some comments may be shown as answers.

Chart in Carousel/UIScrollView on iOS

12 Answers 162 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Stephen
Top achievements
Rank 1
Stephen asked on 14 Sep 2016, 10:54 PM

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.

12 Answers, 1 is accepted

Sort by
0
Accepted
Adrian
Telerik team
answered on 17 Sep 2016, 10:28 AM
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
0
Stephen
Top achievements
Rank 1
answered on 19 Sep 2016, 06:01 PM
Thanks, Adrian. That did the trick.
0
Stephen
Top achievements
Rank 1
answered on 19 Sep 2016, 06:15 PM

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

0
Adrian
Telerik team
answered on 21 Sep 2016, 01:55 PM
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
0
Stephen
Top achievements
Rank 1
answered on 21 Sep 2016, 03:32 PM

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. 

0
Victor
Telerik team
answered on 26 Sep 2016, 11:58 AM
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
0
Stephen
Top achievements
Rank 1
answered on 27 Sep 2016, 12:55 PM
Thanks. Hopefully I can reproduce it outside of our product, but I will try and get that submitted.
0
Stephen
Top achievements
Rank 1
answered on 28 Sep 2016, 08:09 PM

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

0
Adrian
Telerik team
answered on 30 Sep 2016, 01:48 PM
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
0
Stephen
Top achievements
Rank 1
answered on 30 Sep 2016, 02:23 PM
No problem. Thanks for letting me know.
0
Pavel R. Pavlov
Telerik team
answered on 06 Oct 2016, 12:15 PM
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
0
Stephen
Top achievements
Rank 1
answered on 06 Oct 2016, 02:28 PM
Excellent. Thanks, Pavel.
Tags
Chart
Asked by
Stephen
Top achievements
Rank 1
Answers by
Adrian
Telerik team
Stephen
Top achievements
Rank 1
Victor
Telerik team
Pavel R. Pavlov
Telerik team
Share this question
or