All Projects → hawkgs → ng2-gauge

hawkgs / ng2-gauge

Licence: MIT license
⏲ Gauge component for Angular

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to ng2-gauge

Gaugeslider
Highly customizable GaugeSlider designed for a Smart Home app. Featured at Medium.
Stars: ✭ 89 (+71.15%)
Mutual labels:  gauge
React D3 Speedometer
✨ ⚛️ React Speedometer component using d3.js 🌈 🎨
Stars: ✭ 162 (+211.54%)
Mutual labels:  gauge
gobench
A benchmark framework based on Golang
Stars: ✭ 50 (-3.85%)
Mutual labels:  gauge
Angular Gauge
A reusable gauge directive for Angular 1.x apps and dashboards
Stars: ✭ 96 (+84.62%)
Mutual labels:  gauge
React Circular Input
React components for easily composing a circular range input
Stars: ✭ 141 (+171.15%)
Mutual labels:  gauge
Lmgaugeview
LMGaugeView is a simple and customizable gauge control for iOS.
Stars: ✭ 224 (+330.77%)
Mutual labels:  gauge
Speedview
Dynamic Speedometer and Gauge for Android. amazing, powerful, and multi shape ⚡️
Stars: ✭ 1,035 (+1890.38%)
Mutual labels:  gauge
rockiot-ui
Webcomponent for IoT Dashboards, HTML Gauges and more
Stars: ✭ 42 (-19.23%)
Mutual labels:  gauge
Ngx Gauge
A highly customizable Gauge component for Angular 9+ apps and dashboards
Stars: ✭ 158 (+203.85%)
Mutual labels:  gauge
react-canvas-gauges
React Canvas Gauges Component based on Canvas gauges
Stars: ✭ 25 (-51.92%)
Mutual labels:  gauge
Canvas Gauges
HTML5 Canvas Gauge. Tiny implementation of highly configurable gauge using pure JavaScript and HTML5 canvas. No dependencies. Suitable for IoT devices because of minimum code base.
Stars: ✭ 1,443 (+2675%)
Mutual labels:  gauge
Gps Overlay On Video
Telemetry (GPS) data overlay on videos
Stars: ✭ 136 (+161.54%)
Mutual labels:  gauge
MaxSoft-IntelliAPI
First-ever code-free and lightweight cross platform API and database test automation tool.
Stars: ✭ 14 (-73.08%)
Mutual labels:  gauge
Hs Gauge
Lean Haskell Benchmarking
Stars: ✭ 91 (+75%)
Mutual labels:  gauge
GaugeProgressView
Tired of boring Android progress views? This one is amazing!
Stars: ✭ 17 (-67.31%)
Mutual labels:  gauge
Gauge Js
JavaScript language plugin for Gauge
Stars: ✭ 77 (+48.08%)
Mutual labels:  gauge
Svg Gauge
Minimalistic, animated SVG gauge. Zero dependencies
Stars: ✭ 188 (+261.54%)
Mutual labels:  gauge
gauge-csharp
Csharp runner for Gauge
Stars: ✭ 34 (-34.62%)
Mutual labels:  gauge
ArduinoWeatherOS
Arduino Uno, 433MhzRx and OS WMR86 Weather Station
Stars: ✭ 69 (+32.69%)
Mutual labels:  gauge
awesome-testing
Software Testing for QA.
Stars: ✭ 48 (-7.69%)
Mutual labels:  gauge

ng2-gauge

Gauge component for Angular

ng2-gauge

Suitable for building virtual dashboards (initially designed for that).

Build Status

v1.2.0 | CHANGELOG

Installation

npm install ng2-gauge --save

How to?

You should import the GaugeModule to your desired module:

import { NgModule } from '@angular/core';
import { Ng2GaugeModule } from 'ng2-gauge';

@NgModule({
    imports : [CommonModule, Ng2GaugeModule, ...],
})
export class SharedModule {}

Then you can simply use the component in your template:

import { Component } from '@angular/core';

@Component({
  selector: 'app-my-component',
  template: `
    <nga-ng2-gauge
      [max]="9000"
      [input]="input"
    </nga-ng2-gauge>`
})
export class MyComponent {
  input: number;
}

Options

The component provides a list of the following options:

  • max: number (required) - The maximal value of the gauge. It is suggested to use a number that is divisible by 100, 1000 and so on.
  • input: number (required) - The current value of the gauge.
  • unit: string - The unit of the gauge (i.e. mph, psi, etc.)
  • size: number (in pixels; default 400) - Size/width of the gauge.
  • start: number (in degrees; default 225) - The start/beginning of the scale
  • end: number (in degrees; default 135) - The end of the scale
  • showDigital: boolean - Displays the current value as number inside the gauge
  • lightTheme: boolean - Switches to the light theme
  • light: number - Shows a red light when the specified limit is reached
  • sectors: Sectors[] - Defines the coloring of specified sectors
  • factor: number (Not recommended) - Changes the scale factor
  • config: GaugeConfig (Not recommended) - Alters the default configuration; This may lead to unexpected behavior; GaugeConfig

Sectors

Sectors are used for marking parts of the arc with a different color.

Example:

const max = 9000;
const sectors = [{
  from: 6500,
  to: 8000,
  color: 'orange'
}, {
  from: 8000,
  to: 9000,
  color: 'red'
}];

Styling

The component provides two themes - light (default) and dark. Yet, you can easily alter the CSS through the parent component in order to fit your needs. The font used for the gauge is Orbitron (Google Fonts).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].