How to display point shapes with delegate protocol

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

    Posted 04 Dec 2014 Link to this post

    My chart can display point shapes by setting them directy like below:

    series.style.pointShape = [TKPredefinedShape.alloc initWithType:TKShapeTypeCircle andSize:(CGSize){8, 8}];
    TKChartPaletteItem *pointPaletteItem = TKChartPaletteItem.new;
    pointPaletteItem.fill = [TKSolidFill solidFillWithColor:UIColor.whiteColor];
    pointPaletteItem.stroke = [TKStroke strokeWithColor:UIColor.greenColor];

    TKChartPalette *pointPalette = TKChartPalette.new;
    [pointPalette addPaletteItem:pointPaletteItem];

    series.style.shapePalette = pointPalette;


    But how to display point shapes with delegate protocol?

    I tried this:
    - (TKShape *)chart:(TKChart *)chart shapeForSeries:(TKChartSeries *)series atIndex:(NSUInteger)index

    but it seems it is not working.
  2. Jack
    Admin
    Jack avatar
    2333 posts

    Posted 05 Dec 2014 Link to this post

    Hello Erkan,

    It looks like an issue in TKChart. I confirm that this method is never called. I logged the issue and it will be addressed in our upcoming release in Q1 2015. Here is a link to our feedback portal where you can track/vote/or comment on that issue. I updated also your Telerik points for reporting it. I hope the specified time frame is feasible for you.

    Should you have other questions, do not hesitate to ask.

    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. Eytan
    Eytan avatar
    1 posts
    Member since:
    Jan 2015

    Posted 13 Jan 2015 in reply to Jack Link to this post

    Hello, 

    I don't think it's intentional, but you can cause the delegate method to trigger by defining the pointShape on series.style. Here's my line of hackery that gets the ball rolling:

    series.style.pointShape = [[TKPredefinedShape alloc] initWithType:TKShapeTypeCircle andSize:CGSizeZero];
  5. Jack
    Admin
    Jack avatar
    2333 posts

    Posted 14 Jan 2015 Link to this post

    Hi Eytan,

    Thank you for pointing that out. I confirm that in this case the shapeForSeries:atIndex: method is being called. However, this method should be called in all cases. The good news is that this issue is already addressed in our development branch and the fix will be available with our upcoming release in February.

    Should you have other questions, we will be glad to assist.

    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