1.0.10 • Published 6 years ago

react-svg-gauge v1.0.10

Weekly downloads
3,051
License
MIT
Repository
github
Last release
6 years ago

React SVG Gauge

Simple SVG Gauge component, inspired by JustGage

Demo

Sample Gauge

https://reggino.github.io/react-svg-gauge

Sample implementation

import React, { Component } from 'react';
import Gauge from 'react-svg-gauge';

export default class App extends Component {
	render() {
		return (
			<div>
				<Gauge value={this.state.value} width={400} height={320} label="This is my Gauge" />
			</div>
		);
	}
}

Options

  • label (default: "React SVG Gauge")
  • min (default: 0)
  • max (default: 100)
  • value (default: 40)
  • width (default: : 400)
  • height (default: 320)
  • color (default: '#fe0400')
  • backgroundColor (default: '#edebeb')
  • topLabelStyle (style object)
  • valueLabelStyle (style object)
  • minMaxLabelStyle (style object)
  • valueFormatter (function (number) => string)

Styling can be done via Style-properties, or by applying CSS to SVG Text elements.

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago