WARNING : This content was auto generated from a backup file, links and images may be broken.
Over the weekend I managed to throw together some code to produce a reasonably pretty bar graph using Objective-C and a UIView base class. The Graph is rendered via the drawRect function and uses the CGContext to render the graph and all it is components.

Current Features:
Positive Graph Rendering.
Positive / Negative Graph Rendering.
Customizable Bar rendering.
Customizable Graph area rendering.
Background Image support.
Font selection.
Hide / Show Labels.
Hide / Show bar names.
Hide / Show Scale.
Hide / Show Bar Percentages.
The graph code still need’s some work here is a few ideas on what I would like to improve reduce the complexity of the drawRect function add support for negative value graphs. I would also like to provide a number of render option (2D / 3D) that could be selected via an enum value rather than the current set of booleans (there are quite a lot of them).
Update: Look’s like my percentage calculation could do with some work as well :)
Comments
Comments powered by Disqus