iOS native chart drill down

4 posts, 0 answers
  1. Brendon
    Brendon avatar
    1 posts
    Member since:
    Nov 2014

    Posted 03 Nov 2014 Link to this post

    Hi,
    I would like to know whether the native iOS charts does support drill down e.g. when I select charts like bar, pie, or line, it will drill down and show the detailed data.  I cant seem to find a technical document on how to do that.  Can you help to provide the link, so I have better idea.

    Thanks,
    Brendon
  2. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 05 Nov 2014 Link to this post

    Hi Brendon,

    Please find the answer to this question in your previous support ticket. Do not hesitate to contact us if you have further questions.

    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. Allen
    Allen avatar
    4 posts
    Member since:
    Oct 2014

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

    Hi Jack,

    Is this information available? I would like to be able to do a drill-down on line selection in a chart.

    Thanks,

    Allen
  5. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 13 Nov 2014 Link to this post

    Hi Allen,

    Thank you for asking. I am posting my answer here:

    This feature is not supported our of the box in TKChart. It is a powerful feature and we will consider implementing it in a future release. In fact, it is quite easy to achieve this scenario with a few lines of code. One option is to handle the chart:didSelectPoint:inSeries:atIndex method and replace chart data with new one. Please, consider the following code snippet:
    - (void)chart:(TKChart *)chart didSelectPoint:(id<TKChartData>)point inSeries:(TKChartSeries *)series atIndex:(NSInteger)index
    {
        NSMutableArray *items = [NSMutableArray new];
        for (int i = 0; i<10; i++) {
            TKChartDataPoint *point = [[TKChartDataPoint alloc] initWithX:@(i) Y:@(arc4random()%100)];
            [items addObject:point];
        }
        TKChartLineSeries *s = [[TKChartLineSeries alloc] initWithItems:items];
        [chart removeAllData];
        [chart addSeries:s];
    }

    The attached project demonstrates this approach. Do not hesitate to contact us if you have any questions.

    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.

     
Back to Top
DevCraft banner