Git Product home page Git Product logo

angular-dialgauge's Introduction

angular-dialgauge

AngularJS directive for a dial gauge. This uses SVG and will automatically size to the parent. Therefore the parent should have a size.

The following options are possible. These can either be set as separate configuration items, or a configuration object called config can be set to provide a single configuration object.

Option Description
rotate Sets the rotation of the gauge
angle Sets the total angle of the active part of the gauge
scaleMin Sets the minimum value
scaleMax Sets the maximum value
lineCap Sets the endcap for the bar line (round, butt, square)
barWidth Sets the width of the bar
barColor Sets the color of the bar
barAngle Sets the angle of the indicator if a knob style is desired
trackColor Sets the color of the track behind the bar
scaleOffset
scaleMajorColor Sets the color to be used for the minor ticks in the scale
scaleMajorWidth Sets the width of the line for the minor ticks in the scale
scaleMajorLength Sets the length of the line for the minor ticks in the scale
scaleMajorSteps Sets the number of major steps
scaleMinorColor Sets the color to be used for the minor ticks in the scale
scaleMinorWidth Sets the width of the line for the minor ticks in the scale
scaleMinorLength Sets the length of the line for the minor ticks in the scale
scaleMinorSteps Sets the number of minor steps
dialWidth
borderWidth Sets the width of the border
borderOffset Sets the number of pixels between the border and the scale
borderColor Sets the border color used to create a circle around the outside of the gauge
units Sets the text to be used for the units

The following CSS classes can be used for the text -:

Class Description
dialgauge-title Styles the title caption
dialgauge-value Styles the value (number)
dialgauge-unit Styles the unit

For example -:

.dialgauge-unit {
  font-size:14px;
  font-weight:100;
  fill: grey;
  stroke: grey;
}

.dialgauge-value {
  font-size:20px;
  font-weight:200;
  fill: white;
  stroke: white;
}

Installation

Use bower

bower install angular-dialgauge --save

Add the angular-dialgauge.js file to your application and ensure you register the directive by adding ngDialGauge to your app.

License

Licensed under MIT license.

angular-dialgauge's People

Contributors

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