Skip to content

randallli/DSBarChart

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

______  ___________            _____ _                _   
|  _  \/  ___| ___ \          /  __ \ |              | |  
| | | |\ `--.| |_/ / __ _ _ __| /  \/ |__   __ _ _ __| |_ 
| | | | `--. \ ___ \/ _` | '__| |   | '_ \ / _` | '__| __|
| |/ / /\__/ / |_/ / (_| | |  | \__/\ | | | (_| | |  | |_ 
|___/  \____/\____/ \__,_|_|   \____/_| |_|\__,_|_|   \__|

A simple Objective-C Bar Chart / Histogram library.

Latest Version: 0.4.0

Installation

Install manually

Simply click here to download the file and add it into your project directory.

Install using git

  1. Simply type git clone [email protected]:dhilipsiva/DSBarChart.git to clone this repo or git submodule add [email protected]:dhilipsiva/DSBarChart.git into your project folder.

Install using CocoaPods

DSBarChart is also avilable on CocoaPods. To Install using CocoaPods, follow the instructions:

  1. Open your Podfile
  2. Append pod 'DSBarChart', '~> 0.4.0'
  3. Type pod install on terminal
  4. Open your .xcworkspace file.

Sample Usage

NSArray *vals = [NSArray arrayWithObjects:
                 [NSNumber numberWithInt:30],
                 [NSNumber numberWithInt:40],
                 [NSNumber numberWithInt:20],
                 [NSNumber numberWithInt:56],
                 [NSNumber numberWithInt:70],
                 [NSNumber numberWithInt:34],
                 [NSNumber numberWithInt:43],
                 nil];
NSArray *refs = [NSArray arrayWithObjects:@"M", @"Tu", @"W", @"Th", @"F", @"Sa", @"Su", nil];
DSBarChart *chrt = [[DSBarChart alloc] initWithFrame:ChartView.bounds
                                               color:[UIColor greenColor]
                                          references:refs
                                           andValues:vals];
chrt.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
chrt.bounds = ChartView.bounds;
[ChartView addSubview:chrt];

Output of the sample code above

DSBarChart

Who is using DSBarChart

  1. ReWire

If you are using DSBarChart, please feel free to edit this list.

Credits

  1. DhilipSiva

Support

Final Note

As like many other developers, I would be happy if you give me an attribution if you use this. Drop a mail. Or buy me something from my wishlist:

  1. Amazon
  2. Flipkart

Bitdeli Badge

About

A simple Objective-C Bar Chart / Histogram library.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 100.0%