Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Latest commit

 

History

History
44 lines (26 loc) · 1.8 KB

README.md

File metadata and controls

44 lines (26 loc) · 1.8 KB

iOS-PubCharts

Open source native charting library for iOS.

Image

This class draws a CrustChart (a pie chart without the center) with supplied values and colors. The user can tap or swipe around the chart to highlight the individual segments, sending the UIControlEventValueChanged key to the observer.

This was a product of NPR's Serendipity Day #9, for more details on Serendipity Day, checkout http://www.npr.org/blogs/inside/2011/10/14/141312774/happy-accidents-the-joy-of-serendipity-days

Usage

The constructor accepts a frame, and two NSArrays (one for values, one for colors).

- (id)initWithFrame:(CGRect)frame withValues:(NSArray *)values
         withColors:(NSArray *)colors;

TODO

  • This release has little validation, other than converting sums >< 100 to percentages, but future updates will validate the colors parameter has sufficient colors for the segments provided and / or add some automatic color selection.
  • This has not been tested with transforms / NSLayoutConstraints yet either.
  • Future additions will include more chart types as time permits.

Credits

PubCharts / CrustChart were developed by Michael Seifollahi (@mikeseif).

PubCharts / CrustChart were inspired by the design explorations of the consumate Benjamin Dauer (@benjamindauer).

Contact

Follow NPR Tech on Twitter (@NPRTechTeam)

Maintainers

License

Code is licensed under MIT License Terms.