Giter VIP home page Giter VIP logo

gantt-for-react's Introduction

gantt-for-react

Frappe Gantt components for React wrapper.

Build Status npm npm npm

1. install

npm install gantt-for-react

2. usage

Online demo see http://git.hust.cc/gantt-for-react/.

import React from 'react';
import ReactGantt from 'gantt-for-react';

<ReactGantt 
	tasks={this.getTasks()} 
	viewMode={this.state.viewMode}
	scrollOffsets={this.state.scrollOffsets}

    onClick={this._func} 
	onDateChange={this._func}
	onProgressChange={this._func}
	onViewChange={this._func} 
	customPopupHtml={this._html_func} />

Or you can see the code here.

3. component props

  • tasks (required, array)

The tasks array need to be show with gantt graph. task is an object with format: { id, name, start, end, progress, dependencies, custom_class }.

  • viewMode (required, string)

The view mode of gantt. Can be Quarter Day, Half Day, Day, Week, Month.

  • scrollOffsets (optional, object)

The default scroll offset for different view modes with object format: { viewMode : integer }. ViewMode can be Quarter Day, Half Day, Day, Week, Month.

  • customPopupHtml (optional, func)

The popo html function, can be a function that returns html or a simple html string.

And 4 event function props: onClick, onDateChange, onProgressChange, onViewChange. Document can see here.

4. screenshot

screenshot

5. LICENSE

MIT @hustcc

gantt-for-react's People

Contributors

hustcc avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.