Code Monkey home page Code Monkey logo

cksparkline's Introduction

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.

  • lineWidth (property) sets the width used for line display.

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

  • drawPoints (property) draws an ellipse at each data point, with the final point drawn in red.

  • drawArea (property) fills the area below the line.

Example Usage

Include CKSparkline.m and CKSparkline.h in your application's Xcode project.

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];

cksparkline's People

Contributors

adamkeys avatar brow avatar dj2 avatar keysolutions avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cksparkline's Issues

Accepting improvements?

I have modified your code to enable display of a target line along with upper and lower limits. Are you accepting pull requests? Should I host a separate repo and credit CKSparkline?

ios simulator screen shot 08 jan 2015 12 08 53

Assigning instance variable to self

I'm getting 2 warnings in the example project and in my own project when I add the the h and m files.

Assigning instance variable to itself on:
CK_ARC_RELEASE(data);

and on
CK_ARC_RELEASE(computedData);

Any ideas?

Running XCode 4.6.3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.