Horizontal SVG gauge component for React, inspired by react-linear-gauge
npm install react-horizontal-gauge --save
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>
);
}
});
prop | type | default | notes |
---|---|---|---|
min | number | 0 | |
max | number | 100 | |
value | number | 0 | |
width | number | 500 | pixels |
height | number | 80 | pixels |
ticks | array | [{label: '0', value: 0}, {label: '50', value: 50}, {label: '100', value: 100}] |
MIT