Gyanendra
Gyanendra

Reputation: 361

Bars of bar graph in core plot is not click able if there is no value for bar graph

I have a problem in core plot. There is delegate method when user taps on the bar which is given below.

- (void)barPlot:(CPTBarPlot *)plot barWasSelectedAtRecordIndex:(NSUInteger)idx

Which works fine when there is value for bar.It does not get call when there is no value for a bar. Is there is any way to make x-axis points click able for those bar which does not have value?

Upvotes: 2

Views: 309

Answers (1)

Eric Skroch
Eric Skroch

Reputation: 27381

You can add a delegate to the plot area, too. Implement the -plotAreaWasSelected: method and it will be called when the user touches the plot area outside the plot bars. If you need to know where the user touched, implement the -plotAreaWasSelected:withEvent: method instead and use the plot space to get the touch point from the event.

Upvotes: 2

Related Questions