# gaugeJS

> 100% native and cool looking animated JavaScript/CoffeeScript gauge

Latest version **1.3.9** (published 2024-10-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install gaugeJS
pnpm add gaugeJS
yarn add gaugeJS
bun add gaugeJS
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.9 |
| Published | 2024-10-23 |
| First published | 2016-07-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 466 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1441 |
| Author | bernii |
| Maintainers | gonzaller, kplindegaard |

## Links

- npm: https://www.npmjs.com/package/gaugeJS
- Repository: https://github.com/bernii/gauge.js
- Homepage: https://github.com/bernii/gauge.js#readme
- Issues: https://github.com/bernii/gauge.js/issues
- npm.io page: https://npm.io/package/gaugeJS

## Recent versions

- 1.3.9 (latest) — 2024-10-23
- 1.3.8 — 2024-02-18
- 1.3.7 — 2019-06-15
- 1.3.6 — 2018-04-02
- 1.3.5 — 2017-07-08
- 1.3.4 — 2017-05-13
- 1.3.3 — 2017-04-09
- 1.3.2 — 2017-02-12
- 1.2.2 — 2016-07-25

## README

gauge.js
========

100% native and cool looking animated JavaScript/CoffeScript gauge.

 * No images, no external CSS - pure canvas
 * No dependencies
 * Highly configurable
 * Resolution independent
 * Animated gauge value changes
 * Works in all major browsers
 * MIT License

## Usage

```javascript
var opts = {
  angle: 0.15, /// The span of the gauge arc
  lineWidth: 0.44, // The line thickness
  pointer: {
    length: 0.9, // Relative to gauge radius
    strokeWidth: 0.035 // The thickness
  },
  colorStart: '#6FADCF',   // Colors
  colorStop: '#8FC0DA',    // just experiment with them
  strokeColor: '#E0E0E0'   // to see which ones work best for you
};
var target = document.getElementById('foo'); // your canvas element
var gauge = new Gauge(target).setOptions(opts); // create sexy gauge!
gauge.maxValue = 3000; // set max gauge value
gauge.setMinValue(0);  // set min value
gauge.set(1250); // set actual value
```

For an interactive demo and a list of all supported options please refer to the [project's homepage](http://bernii.github.io/gauge.js).

## Wrappers

gauge.js can be wrapped to a number of frameworks. Here are some examples:

* **Vue**
  * [vgauge](https://github.com/amroessam/vgauge)
* **React**
  * [react-gaugejs](https://github.com/keanemind/react-gaugejs)

## Build instructions

Build is a two-step process. First, the CoffeeScript source `gauge.coffee` is converted to `gauge.js`. Next, [terser](https://www.npmjs.com/package/terser) produces the minified distribution file `gauge.min.js`.

```bash
# Install development dependencies
npm install
# Run the build
npm run build
```

---
_Source: https://npm.io/package/gaugeJS · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
