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

How to Shows the Datapoint values in CustomAnimation-line chart?

1 Answer 69 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.
Nandu
Top achievements
Rank 1
Nandu asked on 03 Sep 2015, 11:15 AM

Hi,

 Im using TKChart, i have done the line graph X-axis ​dates and y-axis integer values. But how i can show the graph data point values?

Im using below method.

- (void)chart:(TKChart *)chart didSelectPoint:(id<TKChartData>)point inSeries:(TKChartSeries *)series atIndex:(NSInteger)index
{
    NSLog(@"A point tapped!");
    UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"" message:[NSString stringWithFormat:@"%@",[serverData objectAtIndex:index]] delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles: nil];
    [alert show];
}

above method im showing 1 alert, but i don't want to alert. I want to shows the data points in label or any other way.

Thanks. 

 

 ​

1 Answer, 1 is accepted

Sort by
0
Sophi
Telerik team
answered on 04 Sep 2015, 08:52 AM
Hello Nandu,

To show the values of your data points you should make the point labels of the series visible.
columnSeries.style.pointLabelStyle.textHidden = NO;
columnSeries.style.pointLabelStyle.labelOffset = UIOffsetMake(0, -15);
There is an article, in our online documentation, dedicated to the point labels and their usage.

In case you want to have a custom appearance of the point labels you should conform to the TKChartDelegate and provide custom labels as you implement the chart:labelForDataPoint:inSeries:atIndex: method.
You can find examples of point labels customization in our  point labels customization article.

In case you have other or further questions, feel free to write us back any time.

Regards,
Sophi
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
Nandu
Top achievements
Rank 1
Answers by
Sophi
Telerik team
Share this question
or