How to change just the crosshair tooltip text for shinobi chart


I am trying to change the crosshair tooltip text but after many attempts I am still unsuccessfull, can someone help me out with this.

Thanks in advance,




The crosshair tooltip’s text labels use the chart’s axes to format the string.

Under the hood, it uses the method stringForId: which converts the given id (NSNumber NSDate e.t.c) to a string, taking into account the axis’ labelFormatString. If one is not supplied then it uses a default label formatter.

If you’re using a date axis, you can modify the value displayed by the tooltip by altering it’s labelFormattring e.g.:

dateAxis.labelFormatString = @"d MM"

If you don’t want to modify the axis’ values and just the tooltip’s label, then you should be able to subclass SChartCrosshairTooltip and override the method setResolvedDataPoint:fromSeries:fromChart:. You should then be able to set the text to whatever you wish.

I hope that helps!