Skip to content

Kolbuc/cksparkline

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CKSparkline

CKSparkline is an open source library that provides your application easy access to Sparkline Graphs. Sparklines are well suited to visualizing information in the screen resolution available to the iPhone and iPod Touch.

Attributes

  • data (property) sets the datasource for the view. Datasource is provided as a NSArray containing NSNumber objects.

  • lineColor (property) sets the color used for line display. Color is supplied as a UIColor object.

  • highlightedColor (property) sets the color to be used for line display when the view is selected. Color is supplied as a UIColor object.

  • selected (property) sets if the view is selected. BOOL YES or NO.

Example Usage

CKSparkline *sparkline = [[CKSparkline alloc]
    initWithFrame:CGRectMake(0.0, 0.0, 100.0, 30.0)];

// Sample data
sparkline.data = [NSArray arrayWithObjects:
                  [NSNumber numberWithFloat:2.0],
                  [NSNumber numberWithFloat:4.5],
                  [NSNumber numberWithFloat:5.2],
                  [NSNumber numberWithFloat:7.1],
                  [NSNumber numberWithFloat:2.3],
                  [NSNumber numberWithFloat:3.9],
                  [NSNumber numberWithFloat:1.2],
                  nil];

[parentView addSubview:sparkline];
[sparkline release];

Be sure to include CKSparkline.m and CKSparkline.h into your application project.

About

Sparklines for Cocoa Touch applications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published