An Angular.js Interactive Dial
An visual component for gathering user input when values sit in a range between 0-100. Find a demo here.
Originally a JSFiddle this has now been turned into a ready-to-use Angular.js directive.
Features
- interactive
- animated
- shows previous value
- 2-way data binding (will respond to changes to model and update model accordingly)
Parameters
valueanimate- eithertrueorfalse. Default:falsestartAngle-0-360. Default:0endAngle-0-360. Default:360innerRadius- An integer. Default:60outerRadius- An integer. Default:100clickable- eithertrueorfalse. Default:true
Usage
In order to use in your project you will need to:
- include
dial.jsas one of your source files e.g<script src="js/dial.js"> - include
dial.cssfor styling e.g.<link rel="stylesheet" href="css/dial.css" type="text/css"> - include
gmd.dialas a dependency of your Angular app e.g.var app = angular.module('dialExampleApp', ['gmd.dialplot']); - include a dial inside a template
<gmd-dial value="initialValue"></gmd-dial>
Setup Example
Clone the repository
git clone https://github.com/GordyD/ng-dial.git cd ng-dial npm install bower install node app.jsGo to http://localhost:3000 to see example radial plots.