Giter VIP home page Giter VIP logo

angular-svg-round-progressbar's Introduction

Angular SVG round progressbar

AngularJS module that uses SVG to create a circular progressar

Install

Include Angular and roundProgress.js or roundProgress.min.js in your page. You can use bower, or a script-tag:

bower install angular-svg-round-progressbar

or

<script src="http://crisbeto.github.io/angular-svg-round-progressbar/roundProgress.min.js"></script>

Add angular-svg-round-progress to your app's module dependencies:

angular.module('someModule', ['angular-svg-round-progress'])

Options

  • current current progress, some value on the scope or a number
  • max maximum value, some value on the scope or a number
  • radius radius of the circle
  • color hex color for the current value, example: #45ccce
  • bgcolor hex background color, example: #eaeaea
  • stroke specifies the thickness of the line
  • semi boolen, specifies whether the progressbar should be a semicircle or a full circle
  • To manually trigger a complete re-render of the progressbar, broadcast a "renderCircle" from a parent scope:
$rootScope.$broadcast('renderCircle');

Example:

<div 
	round-progress 
	max="max" 
	current="current" 
	color="#45ccce" 
	bgcolor="#eaeaea" 
	radius="100" 
	stroke="20"
	semi="true">
</div>

Browser support

  • Internet Explorer 9+
  • Firefox 28.0+
  • Chrome 31+
  • Safari 5.1+
  • and pretty much any browser that supports SVG

Development

  • npm install to install development dependencies
  • grunt to build minified demo in build/
  • grunt deploy to build minified demo and push it to gh-pages branch

Credits

  • Erik Möller for the requestAnimationFrame shim
  • Modernizr for the SVG support test
  • Kirupa for the easing function
  • opsb for some of the math
  • konsumer for build-system & deployment stuff

angular-svg-round-progressbar's People

Contributors

crisbeto avatar konsumer avatar

Watchers

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