Chart trackball not working on 2016 Q1

Thread is closed for posting
2 posts, 0 answers
  1. Robert
    Robert avatar
    7 posts
    Member since:
    Aug 2015

    Posted 31 Jan 2016 Link to this post

    I added code to enable a chart trackball according to the documentation, and when I run my chart--nothing happens.  I do have my delegate configured properly, and can capture other events etc without problems.

    Just to compare, I compiled and ran the Chart/Trackball annotation part of the TelerikUIExamples project. It doesn't display a trackball either. Tried this both with the Swift and Objective-C versions of the demo program. I tried running the program on the latest simulator image, and an older iOS 8.4 image -- neither displays the trackball information that's setup in the code.


    Is the trackball feature broken in Q1/16? 


    I'm running: 

    Telerik UI iOS Q1/2016

    Xcode 7.2 on OSX 10.11.3

    Physical Device: iOS 9.2.1 on iPad Air 2



  2. Yoanna
    Yoanna avatar
    44 posts

    Posted 02 Feb 2016 Link to this post

    Hello Robert, 

    Thank you for contacting us.

    I have tested out  TKChartTrackball in both our SDK examples and a brand new project on a physical device it seem all works correctly. 
    In order to setup trackball correctly you should do these steps:

    1. Allow trackball 
    _chart.allowTrackball = YES;
    2. Set the delegate to TKChart
    _chart.delegate = self;
    3. Override delegate's -chart:trackballDidTrackSelection method
    - (void)chart:(TKChart *)chart trackballDidTrackSelection:(NSArray *)selection
        if (selection.count>0) {
            id value = ((TKChartSelectionInfo*)selection[0]).dataPoint.dataXValue;
            NSString *str = [NSString stringWithFormat:@"Pos = %@", value];
            chart.trackball.tooltip.text = str;

    By default TKChartTrackball is designed to show after 0.5 seconds hold gesture. You can control this by setting the minimumPressDuration property.

    I hope this helps. If the issue still occur, please send us some code or a small test project where we can see the issue represented and investigate this further.

    Looking forward to your reply.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top