I have an horizontal bar chart in which the datapoint labels are placed above the bar, outside the datapoint area.
When I tap on a bar, a certain action is executed. I’d like to have the same effect by tapping on the label, but something is not working.
Since I already implemented the delegate method
sChart:alterDataPointLabel:forDataPoint:inSeries: to move the labels outside the bars, I added these lines:
UITapGestureRecognizer *tapLabel = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapLabelAction:)]; tapLabel.numberOfTapsRequired = 1; [label addGestureRecognizer:tapLabel];
tapLabelAction: method is never called. I even tried to set
label.userInteractionEnabled = YES; but nothing changes.