GithubHelp home page GithubHelp logo

carabina / swiftyscrollablegraph Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ivanovgeorge/swiftyscrollablegraph

0.0 1.0 0.0 56 KB

SwiftyScrollableGraph is an easy to setup and use scrollable graph view for swift. Customizable, fast and clean.

License: MIT License

Ruby 6.71% Swift 78.38% Objective-C 2.59% Shell 12.32%

swiftyscrollablegraph's Introduction

SwiftyScrollableGraph

It's an easy to setup and use scrollable graph view for swift. Customizable, fast and clean.

Installing

Easy as adding this to your podFile

pod 'SwiftyScrollableGraph'

Using

  1. Add view on your viewcontroller in storyboard
  2. Set it as "SwiftyScrollableGraph" Class and make an outlet to your code. Now it's ready to use!
  3. To add data and draw first graph, just call in viewDidLoad(or anywhere you need) yourSwiftyScrollableGraph.reloadGraphWith(pointsData: [(value: 11, description: "Jan."),(value: 2, description: "Feb."),(value: 33, description: "Mar."),(value: 0, description: "Apr.")]) pointsData - is an array of values and description. Values used for point yAxis coordinates, and description for desciption via or(and) xAxys labels. Now it's ready! You should see somthing like this:

Now, you want to make some customiztion. Just see this commands and theyr description (or check the SampleProject)

reloadGraphWith(pointsData: [(value: Int, description: String)]) // loads data to graph and draw it.

autoScroll = Bool // true enables autoscrolling to the end of graph on draw

infoView = UIView // This can override default infoView. You can just ignore it, or set to nil to use default infoView

backgroundColor = UIColor // background color

spaceBetweenPoints = Int // this is space beetween two point on xAxis

animation = Bool //ebale or disable graph draw animation

animationTime = Int // time, which graph animation will take (see )

leftSpacer = Int // left safe space, so you can scroll to the first point

rightSpacer = Int // right safe space, so you can scroll to the last point

chartLine.color = UIColor // chartline color

chartLine.size = Int // charline size

pickedPoint.size = Int // current "picked" point size. Set to 0, not to show it

pickedPoint.color = UIcolor // current "picked" point color

points.size = Int // all graph points size. Set to 0, not to show them

points.color = UIColor // graph points color

xAxisLine.isOn = Bool // show or not xAxis Line

xAxisLine.size = 1 // xAxis line size

xAxisLine.color = UIColor // xAxis line color

yAxisLine.isOn = Bool // show or not yAxis Line

yAxisLine.size = 1 // yAxis line size

yAxisLine.color = UIColor // xAxis line color

swiftyscrollablegraph's People

Contributors

ivanovgeorge avatar

Watchers

 avatar

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.