0.1.2 • Published 7 years ago

react-horizontal-gauge v0.1.2

Weekly downloads
113
License
MIT
Repository
github
Last release
7 years ago

react-horizontal-gauge

Horizontal SVG gauge component for React, inspired by react-linear-gauge

Install

npm install react-horizontal-gauge --save

Usage

import React, { Component } from 'react';
import HorizontalGauge from 'react-horizontal-gauge';

class View extends Component {
  render() {
    return (
      <div>
        ...
        <HorizontalGauge ticks={gaugeTicks} height={70} width={500} min={0} max={10} value={7.3}/>
        ...
      </div>
    );
  }
});

Props

proptypedefaultnotes
minnumber0
maxnumber100
valuenumber0
widthnumber500pixels
heightnumber80pixels
ticksarray{label: '0', value: 0}, {label: '50', value: 50}, {label: '100', value: 100}

License

MIT