Chart display messed up on iPhone 5S


On my iPhone 5S running iOS 7 the display of the charts are really messed up.  This isn’t happening on any other device or OS.  As you can see at when I try to scroll or zoom the window at all the ‘redraw’ bounces all over the place, and then ends up at some random spot/size that doesn’t line up with the actual points on the Y axis.


Here are my delegate methods. 

- (int)numberOfSeriesInSChart:(ShinobiChart *)chart {
    return self.chartData == nil ? 0 : 3;

- (int)sChart:(ShinobiChart *)chart numberOfDataPointsForSeriesAtIndex:(int)seriesIndex {
    return [self.chartData count];

- (id<SChartData>)sChart:(ShinobiChart *)chart dataPointAtIndex:(int)dataIndex forSeriesAtIndex:(int)seriesIndex {
    SChartDataPoint *dp = [SChartDataPoint new];

    const NSArray *const dataPoint = self.chartData[dataIndex];

    int xValue = [dataPoint[1] intValue];

    if (xValue >= 70) {
        if (seriesIndex != 2)
            xValue = 0;
    } else if (xValue > 40) {
        if (seriesIndex != 1)
            xValue = 0;
    } else if (seriesIndex != 0)
        xValue = 0;

    dp.yValue = dataPoint[0];
    dp.xValue = @(xValue);

    return dp;

- (SChartSeries *)sChart:(ShinobiChart *)chart seriesAtIndex:(int)index {
    SChartBarSeries *series = [SChartBarSeries new];
    series.stackIndex = @1; // All series have same stack index so there is no blank spacing.
    series.animated = YES; = @[
                               [UIColor redColor],
                               [UIColor yellowColor],
                               [UIColor greenColor]
                               ][index]; = [UIColor darkGrayColor]; = YES;

    return series;


Hi grosch,

Thank you for reporting this issue, and thank you for sending us your datasource code. We’ll investigate at this end, and get back to you once we’ve determined what is going on.




I can provide the entire project if somebody from Shinobi support wants to send me an email that I can reply to.


Hi grosch,

Would you like to send the project to




Hey Grosch,

I took a look at your project and I couldn’t replicate your issue with our latest version of ShinobiCharts (2.5.6). Could I ask what version of charts you are using?

It looks like an issue we had when Apple first released their 64bit hardware, which we fixed in our 2.5.4 release - I can’t be 100% sure though. Could you try updating to a newer version of charts that contains this fix? If this doesn’t fix the problem, please let us know and we’ll investigate further.



I was running against an older version apparently.  I installed your .dmg file, but I’m now unclear on how I link against it in my project.  Would you provide instructions, or a pointer to the doc please?  It doesn’t seem to work as an auto-imported package and I’m not clear on where it installed the framework to.


Hi grosch,

The instructions at the top of the “Draw a Simple Chart” in the user guide should explain how do add in the framework. Rather than dragging it in, you can just search for it after pressing the “+” button in “Link Binary with Libraries”

Another thing to be aware of is that a few new libraries are required, such as CoreText.framework and libstdc++.dylib. There are some known issues with the latter, so if you start to get C++ compiler warnings, try using libstdc++.6.0.9.dylib.


Thanks, everything is working correctly now.  No more strange effects from the graphs.


Great to hear!