CrossHair Bug with empty series



Let’s say we have 3 SChartLineSeries, but first one has no data points (i.e. empty)

See the screenshot, where yellow and blue series have points, but red one has not.

Shinobi detects nearest series line to the tap when user do long tap to see crosshair, which is nicely working feature, unless one of your series is empty.

In that case Shinobi ALWAYS returns empty series, does not matter where you tap! See red crosshair on the scrennshot.

In other words delegate method

-(void) setDataPoint:(id<SChartData>)dataPoint fromSeries:(SChartSeries *)series fromChart:(ShinobiChart *)chart

will always get empty series (red one from my example) and strange dataPoint with index = 0, and values pointing to 0,0 (whatever it means in your chart coordinates)

In my case dataPoint looks like this:

(lldb) po dataPoint
{ index=0, x=2010-01-01 00:00:00 +0000, y=0, selected=N }

Also, series is EMPTY, i.e. there are no dataPoints at all:

(lldb) po [[series dataSeries] dataPoints]
<__NSArrayM 0x2b1f5070>(


That may easily result in crash due to array index is out of bounds.

Shinobi Version is 2.6.1

This bug may be related to this one:,-datapoint,-series,-pixel%29-returns-wrong-series

Please fix.



This issue should be fixed as of version 2.7.2. Please let us know if you have any further problems.

Best regards,
Jan Akerman


We had the same problem. And I can confirm that 2.7.2 fixes this issue.


2.7.2 works perfect.Thank you !