Vishal's p
Vishal's p

Reputation: 198

Core Plot - How to add Value on plotted points

enter image description hereI am using Core Plot first time for Plotting graph

Some how I finally managed to plot points but I want to show exact value of plotted point on the graph in annotation style. I want to show exact points values same as shown in this Attached image(graph image) https://i.sstatic.net/PpyRj.png Please help me

Thanks in advance graph image

Upvotes: 2

Views: 1197

Answers (1)

Volker
Volker

Reputation: 4658

You have to display data labels (that is what they are called in CorePlot), some good information are here Core-Plot CPTScatterPlot data labels

To show data labels, you'll need to return the corresponding values from

-(CPTLayer *)dataLabelForPlot:(CPTPlot *)plot recordIndex:(NSUInteger)index

Data labels do not appear by default. The automatic labels require both a labelTextStyle and labelFormatter to be set. Both of these properties default to nil which hides the labels.

Upvotes: 2

Related Questions