How to draw a chart like this?


#1

How to use the ShinobiCharts.framework to draw a chart as blow in iOS


|  NOV 1  |      2        |       3      |      4        |      5        |    6        |

|---------------------------------------------------------------------------|

| AM | PM | AM | PM | AM | PM | AM | PM | AM | PM | AM | PM |

|---------------------------------------------------------------------------|

|                                                                                                    |

|              draw the datapoint here                                           |

|----------------------------------------------------------------------------

Thanks.

Regards,

p31415


#2

HI p31415,

You can do this by adding a second x-axis, and setting both axes positions to be reversed.

On the lower axis, set its majorTickFrequency to be 12 hours, and its Label Formatter to use the value “a”.

On the upper axis, set the majorTickFrequency to be a day, and its Label Formatter to use the value “d”.

If you want to add the NOV, you will need to edit the label for “1” in the alterTickMark: SChartDelegate method.