iOS: Show tooltip only if user taps directly on a datapoint


#1

Currently tooltips are shown in a chart via tap and hold (longpress) gesture inside the chart. Is there any possibility to show a tooltip after a user taps directly on a datapoint like if you tap on a uibutton?

If no, is there any plan to support this in the near feature? 


#2

Hi,

Thanks for getting in touch!

We are currently changing code in this area which will make this feature possible.

However, this will require you to implement certain methods yourself.

I have made a note in our system to inform you when the code changes have been released.

Let me know if you have any questions.

Kind regards,
Andrew Polkinghorn


#3

Hi Andrew,

I am trying to achieve a similar thing.

In a scatter chart we only want to respond when the user taps the data point (almost) drectly, Is this possible now, or in development?

With kind regards,
Maarten van der Velden


#4

Hi Maarten,

Apologies it’s taken us a while to get back to you.

You should be able to achieve what you’re after by implementing something like the following, remembering to set your chart’s delegate:

- (void)sChart:(ShinobiChart *)chart toggledSelectionForPoint:(SChartDataPoint *)dataPoint inSeries:(SChartSeries *)series
atPixelCoordinate:(CGPoint)pixelPoint {
     [chart.crosshair showAtPoint:pixelPoint];
}

I hope that helps!

Sam