This is a migrated thread and some comments may be shown as answers.

Chart trackball not working on 2016 Q1

1 Answer 30 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Robert
Top achievements
Rank 1
Robert asked on 01 Feb 2016, 12:47 AM

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

 

 

1 Answer, 1 is accepted

Sort by
0
Yoanna
Telerik team
answered on 02 Feb 2016, 08:52 AM
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.

Regards,
Yoanna
Telerik
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
Tags
Chart
Asked by
Robert
Top achievements
Rank 1
Answers by
Yoanna
Telerik team
Share this question
or