0.0.5 • Published 4 years ago
data-tab-board v0.0.5
data-tab-board
React data-tab-board
Screenshot
Browsers support
IE / Edge | Firefox | Chrome | Safari | Opera |
---|---|---|---|---|
IE 8 + ✔ | Firefox 31.0+ ✔ | Chrome 31.0+ ✔ | Safari 7.0+ ✔ | Opera 30.0+ ✔ |
Install
Usage
var Board = require('data-tab-board');
var React = require('react');
var ReactDOM = require('react-dom');
ReactDOM.render(<Board title='' dataSource={[]} />, container);
Examples
npm start
and then go to
http://localhost:8000
Online examples: github-pages or vercel
API
Props
name | type | default | description | |
---|---|---|---|---|
style? | React.CSSProperties | {} | custom container style | |
title? | string | '' | custom title style | |
description? | string | '' | custom charts description | |
active | number | string | 1 | active tab |
dateType | number | string | 按天:1 |按小时 :2 default: 1 | |
dataSource | {value:'', type: '', date: ''}[] | [] | chart data | |
showExport? | boolean | true | 是否显示导出 | |
rangeValue | Moment, Moment | moment | dateType:1 时开始结束时间 | |
onTabChange? | function | void | handle tab change | |
onDatesChange | function | void | handle dates change when dateType=1 | |
onDateChange | function | void | handle dates change when dateType=2 | |
onDateOpenChange | function | void | handle date panel open callback | |
onDateTypeChange | function | void | handle date type change callback | |
onExport? | function | void | handle export |
Development
npm install
npm start
Test Case
npm test
npm run chrome-test
Coverage
npm run coverage
License
data-tab-board
is released under the MIT license.