Waterfall chart using Shinobicontrols


How to use Shinonicontrols column-series to create waterfall chart ?


Hi Vikas,

The ‘ColumnChart’ example, packaged with the framework, shows an example of how to create a waterfall chart. Have you managed to get a chance to look at that sample yet?




I’m interested in this as well.  The Examples that ship with the .dmg (that you can drag to the desktop from the installer) do not include a “ColumnChart” example.  What is included is called “ColumnSeries” and is a smple column chart that doesn’t illustrate a waterfall technique (see below).  Can you be more specific where to find this example?




Hi Rob,

You’re right - the sample which Jan referred to in June last year is no longer shipped with our installer. To be honest, the simplest way of implementing a waterfall chart would take a different approach to that taken in the sample project anyway. We would recommend using a candlestick series instead, and then styling the candlesticks so that the sticks aren’t drawn. This should hopefully cover the use case you’re after. If you look at the CandlestickChart sample which is shipped with our installer, you can adapt it to give you an example of what I mean. In the ViewController.m file in the sample, modify the sChart:seriesAtIndex datasource method to the following:

-(SChartSeries *)sChart:(ShinobiChart *)chart seriesAtIndex:(NSInteger)index {
    SChartCandlestickSeries* candleStickSeries = [[SChartCandlestickSeries alloc] init];
    candleStickSeries.style.stickColor = [UIColor clearColor];
    return candleStickSeries;

To ensure that the first and last data points are represented by whole columns, you should set the opening value of the first data point, and the closing value of the last data point, to 0.

I hope this helps, let me know how things go.