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
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.
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
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.
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.
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)
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.
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.
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.