Giter Club home page Giter Club logo

gaugeview's Introduction

GaugeView

Alt text

Version License Platform

Introduction

GaugeView is a small library to create and display Gauge graphs. It is fully customizable: you can set the color, size, text and many other properties of the graph. Do you need to display data in a simple way? Or you just wanto to add a fancy donut to your app? This is the library you were looking for!

Alt text

Requirements

  • iOS 8+
  • Xcode 7.0+

Installation

CocoaPods

Add the GaugeView pod into your project and run pod install

pod 'GaugeView'

Manual Install

Download GaugeVIew and import GaugeView.swift and GaugeLayer.swift inside your xcode project.

Sample App

To start using GaugeView you can build the provided example project

  1. Open Example/GaugeView.xcodeproj in Xcode.
  2. Build and run.

Usage

It's very easy to set up, just import GaugeView in your Swift code:

import GaugeView

Interface Builder:

Add an UIView with interface builder and set GaugeView as UIView custom class.

Link it with the outlet property declared in your code.

@IBOutlet private weak var gaugeView: GaugeView!

It's simple to customize! Here's an example of configuration of the view. Look at the Customization section for more details.

gaugeView.percentage = 80
gaugeView.thickness = 5
gaugeView.labelFont = UIFont.systemFontOfSize(40, weight: UIFontWeightThin)
gaugeView.labelColor = UIColor.lightGrayColor()
gaugeView.gaugeBackgroundColor = UIColor.lightGrayColor()

Programmaticaly:

Declare a variable with GaugeView type

private var gaugeView: GaugeView!

Instantiate and customize it. Make it fancy! Look at the Customization section to see more details.

gaugeView = GaugeView(frame: CGRect(x: 0, y:0, width: 100, height: 100)

gaugeView.percentage = 80
gaugeView.thickness = 5
gaugeView.labelFont = UIFont.systemFontOfSize(40, weight: UIFontWeightThin)
gaugeView.labelColor = UIColor.lightGrayColor()
gaugeView.gaugeBackgroundColor = UIColor.lightGrayColor()

Customization

These are the customizable properties:

Gauge

  • Float startAngle
  • CGFloat thickness
  • Float percentage
  • UIColor gaugeBackgroundColor
  • UIColor gaugeColor
  • Float animationDuration

Label

  • String labelText
  • UIFont labelFont
  • UIColor labelColor

License

GaugeView is Copyright (c) 2015 Belka, srl. It is free software, and may be redistributed under the terms specified in the LICENSE file.

About Belka

Alt text

Belka is a Digital Agency specialized in design, mobile applications development and custom solutions. We love open source software! You can see our projects or look at our case studies.

Interested? Hire us to help build your next amazing project.

www.belka.us

gaugeview's People

Contributors

chrisdhaan avatar depoon avatar giovannifrigo avatar gnurant avatar juleship avatar maybeiamme avatar

Watchers

 avatar  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.