{"id":13445701,"url":"https://github.com/hustcc/gantt-for-react","last_synced_at":"2025-09-25T12:55:16.951Z","repository":{"id":41113852,"uuid":"81907406","full_name":"hustcc/gantt-for-react","owner":"hustcc","description":":herb: Frappe Gantt components for React wrapper. 一个简单的甘特图 React 组件封装。","archived":false,"fork":false,"pushed_at":"2021-01-17T10:03:19.000Z","size":349,"stargazers_count":310,"open_issues_count":11,"forks_count":75,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-10-17T16:04:04.669Z","etag":null,"topics":["frappe-gantt","gantt","gantt-chart","ganttjs","javascript-gantt","project-management","react-gantt"],"latest_commit_sha":null,"homepage":"https://git.hust.cc/gantt-for-react","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hustcc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-14T05:09:59.000Z","updated_at":"2024-08-27T07:21:22.000Z","dependencies_parsed_at":"2022-09-01T04:31:05.790Z","dependency_job_id":null,"html_url":"https://github.com/hustcc/gantt-for-react","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustcc%2Fgantt-for-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustcc%2Fgantt-for-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustcc%2Fgantt-for-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hustcc%2Fgantt-for-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hustcc","download_url":"https://codeload.github.com/hustcc/gantt-for-react/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247280262,"owners_count":20912967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["frappe-gantt","gantt","gantt-chart","ganttjs","javascript-gantt","project-management","react-gantt"],"created_at":"2024-07-31T05:00:38.098Z","updated_at":"2025-09-25T12:55:11.902Z","avatar_url":"https://github.com/hustcc.png","language":"JavaScript","funding_links":[],"categories":["Libraries","UI Components","JavaScript"],"sub_categories":["Gantt","Data Visualization"],"readme":"# gantt-for-react\n\n\u003e [Frappe Gantt](https://github.com/frappe/gantt) component for React wrapper.\n\n[![Build Status](https://travis-ci.org/hustcc/gantt-for-react.svg?branch=master)](https://travis-ci.org/hustcc/gantt-for-react)\n[![npm](https://img.shields.io/npm/v/gantt-for-react.svg)](https://www.npmjs.com/package/gantt-for-react)\n[![npm](https://img.shields.io/npm/dt/gantt-for-react.svg)](https://www.npmjs.com/package/gantt-for-react)\n[![npm](https://img.shields.io/npm/l/gantt-for-react.svg)](https://www.npmjs.com/package/gantt-for-react)\n\n\n# 1. Install\n\n```sh\nnpm install --save gantt-for-react\n```\n\n\n# 2. Usage\n\nOnline demo see [https://git.hust.cc/gantt-for-react/](https://git.hust.cc/gantt-for-react/).\n\n```jsx\nimport React from 'react';\nimport ReactGantt from 'gantt-for-react';\n\n\u003cReactGantt\n  tasks={this.getTasks()}\n  viewMode={this.state.viewMode}\n  onClick={this._func}\n  onDateChange={this._func}\n  onProgressChange={this._func}\n  onViewChange={this._func}\n  customPopupHtml={this._html_func}\n/\u003e\n```\n\nOr you can see the code [here](demo/Gantt.jsx#L74).\n\n\n# 3. Component props\n\n - **`tasks`** (required, array)\n\nThe tasks array need to be show with gantt graph. task is an object with format: **{ id, name, start, end, progress, dependencies, custom_class }**.\n\n - **`viewMode`** (required, string)\n\nThe view mode of gantt. Can be **Quarter Day, Half Day, Day, Week, Month**.\n\n - **`customPopupHtml`** (optional, func)\n\nThe popo html function, can be a function that returns html or a simple html string.\n\nAnd **4 event function props**: `onClick`, `onDateChange`, `onProgressChange`, `onViewChange`. Document can see [here](https://frappe.github.io/gantt/).\n\n\n# 4. Screenshot\n\n![screenshot](demo/screenshot.png)\n\n\n# 5. LICENSE\n\nMIT @[hustcc](https://github.com/hustcc)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhustcc%2Fgantt-for-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhustcc%2Fgantt-for-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhustcc%2Fgantt-for-react/lists"}