Chart crashes sometimes

11 posts, 0 answers
  1. Alex
    Alex avatar
    10 posts
    Member since:
    Apr 2011

    Posted 30 Oct 2014 Link to this post

    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
  2. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 31 Oct 2014 Link to this post

    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.

     
  3. DevCraft banner
  4. Alex
    Alex avatar
    10 posts
    Member since:
    Apr 2011

    Posted 02 Nov 2014 in reply to Jack Link to this post

    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
  5. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 03 Nov 2014 Link to this post

    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.

     
  6. Siam
    Siam avatar
    1 posts
    Member since:
    Nov 2014

    Posted 12 Mar 2015 in reply to Jack Link to this post

    Happens for me in iOS8.1. Not in iOS7.
  7. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 17 Mar 2015 Link to this post

    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.

     
  8. megharaj
    megharaj avatar
    4 posts
    Member since:
    Feb 2015

    Posted 14 Apr 2015 in reply to Jack Link to this post

    Assertion failed: (transform_is_valid(m)), function CGMutablePathRef CGPathCreateMutableCopyByTransformingPath(CGPathRef, const CGAffineTransform *), file Paths/CGPath.cc, line 168.
  9. megharaj
    megharaj avatar
    4 posts
    Member since:
    Feb 2015

    Posted 14 Apr 2015 Link to this post

    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)

     

     

     

     

     

  10. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 14 Apr 2015 Link to this post

    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.

     
  11. megharaj
    megharaj avatar
    4 posts
    Member since:
    Feb 2015

    Posted 19 Apr 2015 in reply to Jack Link to this post

    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.

  12. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 20 Apr 2015 Link to this post

    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.

     
Back to Top
DevCraft banner