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

Chart crashes sometimes

10 Answers 112 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alex
Top achievements
Rank 1
Alex asked on 31 Oct 2014, 03:27 AM
Hi,

I have been experiencing crashes from time to time. It is never very consistent. I tried to isolate it in a few cases but have not been able to. Most often the crashes occur at:

Assertion failed: (transform_is_valid(m)), function CGMutablePathRef CGPathCreateMutableCopyByTransformingPath(CGPathRef, const CGAffineTransform *), file Paths/CGPath.cc, line 168.

It happens when I try to zoom in/out the plot. I am implementing the zoom in/out myself as follows:
    1. Detect zoom in/out
    2. Clear the data: chart.removeAllData()
    3. Generate a new series
    4. Add the series to chart: chart.addSeries()

Thanks.

Alex

10 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 31 Oct 2014, 09:40 AM
Hi Alex,

Thank you for reporting this. Please, could you provide some additional information about the issue?

- Are you using a different thread to update the chart?
- Do you call the reloadData method of TKChart after replacing the series?
- Are you using the chartDidPan and chartDidZoom methods of TKChartDelegate to detect a zoom?

Finally, could you provide a sample application demonstrating your scenario. We will give it a test and we will try to address any potential issue. Thank you in advance.

Looking forward to your reply.

Regards,
Jack
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Alex
Top achievements
Rank 1
answered on 02 Nov 2014, 05:41 AM
Hi Jack,

Thank you for your responses. Here are my answers to your questions:
1. No, I am using the main thread to update the chart.
2. No, I am not calling reloadData method.
3. I have disabled the user interaction (i.e., chart.userInteractionEnabled = false)

As I mentioned, my project is quite complex and I have tried to re-produce it with a simpler project but no luck yet. I will send you the simpler project when I am able to reproduce the behavior.

Thanks.

Alex
0
Jack
Telerik team
answered on 03 Nov 2014, 12:27 PM
Hi Alex,

Thank you for those details. We still can't reproduce the issue. It could be related with the data used in your project. We are looking forward to a sample project where the issue can be reproduced.

Thank you for your cooperation and understanding!

Regards,
Jack
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Siam
Top achievements
Rank 1
answered on 12 Mar 2015, 06:42 PM
Happens for me in iOS8.1. Not in iOS7.
0
Jack
Telerik team
answered on 17 Mar 2015, 08:55 AM
Hello Siam,

Thank you for reporting that. Please, could you prepare a sample application and describe the exact steps and conditions to reproduce the issue. This will help us to research further and address the issue. Thank you in advance.

Looking forward to your reply.

Regards,
Jack
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
megharaj
Top achievements
Rank 1
answered on 14 Apr 2015, 08:13 AM
Assertion failed: (transform_is_valid(m)), function CGMutablePathRef CGPathCreateMutableCopyByTransformingPath(CGPathRef, const CGAffineTransform *), file Paths/CGPath.cc, line 168.
0
megharaj
Top achievements
Rank 1
answered on 14 Apr 2015, 08:19 AM

im not able to disply the percentage inside or outside of the pie chart with telerik,

attaching the code sample

 

  Cell4.backgroundColor = UIColor .clearColor()
                            let chart = TKChart(frame: CGRectInset(CGRectMake(0, 0, 320, 250), 15, 15))
                                    var pointsWithValueAndName = [TKChartDataPoint]()


                if Statistics.sharedInstance.Pie.count > 0 {
                                for var i = 0; i < (Statistics.sharedInstance.Pie.count); i++ {
                                let pie = Statistics.sharedInstance.Pie[i] as Dictionary<String,String>!
                                pointsWithValueAndName.append(TKChartDataPoint(name: pie["Header"], value: pie["Value"]))
                            }
                }
                    let series = TKChartPieSeries(items: pointsWithValueAndName)
                                    chart.legend().hidden = false
                                    chart.legend().style.position = TKChartLegendPosition.Right
                                    series.displayPercentage = true
                                    series.labelDisplayMode = TKChartPieSeriesLabelDisplayMode.Outside
                                    series.selectionMode = TKChartSeriesSelectionMode.DataPoint



                                    chart.allowAnimations = true

                                    var  numberFormatter = NSNumberFormatter()
                                    numberFormatter.numberStyle = NSNumberFormatterStyle.PercentStyle
                                    series.style.pointLabelStyle.formatter = numberFormatter
                                    series.style.pointLabelStyle.stringFormatter = "%.0f %%"
                                    series.expandRadius = 0.5
                                    chart.addSeries(series)


                                    Cell4 .addSubview(chart)

 

 

 

 

 

0
Jack
Telerik team
answered on 14 Apr 2015, 02:45 PM
Hello megharaj,

I am not sure about your question. Is it related with the previous one in this forum thread? You can control the expand radius by setting the expandRadius property. Use a value greater than 1 to achieve a positive expand. Consider the code below:
series.expandRadius = 1.3

Regards,
Jack
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
megharaj
Top achievements
Rank 1
answered on 20 Apr 2015, 04:04 AM

No Jack,

 

My issue was about percentage indication over the pie chart,

   series.displayPercentage = true
   even after this line in code im not able to disply to % value over the pie chart.

Please help me with that.

0
Jack
Telerik team
answered on 20 Apr 2015, 04:17 PM
Hello megharaj,

You should set also the textHidden property of the point label style to false in this scenario. Here is a sample:
series.style.pointLabelStyle.textHidden = false

I hope this helps.

Regards,
Jack
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
Chart
Asked by
Alex
Top achievements
Rank 1
Answers by
Jack
Telerik team
Alex
Top achievements
Rank 1
Siam
Top achievements
Rank 1
megharaj
Top achievements
Rank 1
Share this question
or