@tulaoda/rc-jsgantt
v1.1.0
Published
React JS Gantt
Downloads
2
Readme
@tulaoda/rc-jsgantt
React JS Gantt
Install
npm install --save @tulaoda/rc-jsgantt
Usage
import * as React from 'react'
import JSGantt from '@tulaoda/rc-jsgantt'
class Example extends React.Component {
constructor(props) {
super(props)
this.data = [
{
pID: 1,
pName: 'Define Chart API v1',
pStart: '',
pEnd: '',
pClass: 'black',
pGroup: 1,
pParent: 0
},
{
pID: 12,
pName: 'Task Objects',
pStart: '',
pEnd: '',
pClass: 'black',
pGroup: 1,
pParent: 1
},
{
pID: 121,
pName: 'Constructor Proc ',
pStart: '2020-02-21',
pEnd: '2020-03-09',
pClass: 'blue',
pGroup: 0,
pParent: 12,
toolTipsInfo: [{ key: '工作', value: '测试一下' }]
}
]
this.editorOptions = {
vEditable: true //是否可编辑
}
}
//挂载实例
onInit = (editor) => {
console.log('editor', editor)
}
onChange = (task) => {
console.log('task', task)
}
render() {
return (
<JSGanttComponent
data={this.data}
options={this.editorOptions}
onInit={this.onInit}
onChange={this.onChange}
/>
)
}
}
Developer Guide
Fork this project and following the instructions below:
npm i -g rollup
npm install
cd example
npm install
to run the demo npm start in the root folder, and npm start in the example folder the site will be at: localhost:3000
License
MIT © tulaoda