Step Line Graph iOS


#1

smiley cry I want to create a steped line graph in iOS. Is there any way to create this in shinobi if there is then please send me some helping code.

In other words i want to connect my data points using perpendicular/ 90 digree lines e.g. if A is point at (2, 1) location and B is point at (1, 2) location then to connect these points we will not draw directly straight line from A to B but i want first i will draw a parallel line to Y and then a paralle line but perpendicular to the previous line will be drawn. So at the end the connection b/w A and B will look like this |_ . Please reply anyone ASAP.


#2

Hi mohsinbmwm3,

You can do this by creating a SChartStepLineSeries in your SChartDataSource method “sChart:seriesAtIndex:”.

This series handles drawing the 90 degrees lines for you. Meaning you just need to supply the datapoints and it will do the rest.

Let me know if you have any questions.

Kind regards,
Andrew Polkinghorn.