React color-statistics
![]() IE / Edge |
![]() Firefox |
![]() Chrome |
![]() Safari |
![]() Opera |
---|---|---|---|---|
IE 8 + ✔ | Firefox 31.0+ ✔ | Chrome 31.0+ ✔ | Safari 7.0+ ✔ | Opera 30.0+ ✔ |
var Statistics = require('color-statistics');
var React = require('react');
var ReactDOM = require('react-dom');
ReactDOM.render(
<Statistics title='' align='left' type='success' tip={<span>Statistics</span>} />,
container,
);
npm start
and then go to
http://localhost:9001
Online examples: github-pages or vercel
name | type | default | description |
---|---|---|---|
style? | React.CSSProperties | {} | custom container style |
titleStyle? | React.CSSProperties | {} | custom title style |
numberStyle? | React.CSSProperties | {} | custom number style |
tipStyle? | React.CSSProperties | {} | custom tip style |
type | string | 'primary' | one of ['primary', 'success', 'warning', 'info'] |
align | string | 'right' | one of ['left','right','top','bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight'] |
showTip | boolean | string | true | show tip icon or not |
tip | string | ReactNode | '' | tips info |
number | string | number | number |
npm install
npm start
npm test
npm run chrome-test
npm run coverage
color-statistics
is released under the MIT license.