New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gantt-task-react

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gantt-task-react

Interactive Gantt Chart for React with TypeScript.

  • 0.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14K
increased by6.97%
Maintainers
1
Weekly downloads
 
Created
Source

gantt-task-react

Interactive Gantt Chart for React with TypeScript.

example

Live Demo

Install

npm install gantt-task-react

How to use it

import { Gantt, Task, EventOption, StylingOption, ViewMode, DisplayOption } from 'gantt-task-react';
let tasks: Task[] = [
    {
      start: new Date(2020, 1, 1),
      end: new Date(2020, 1, 2),
      name: 'Idea',
      id: 'Task 0',
      progress: 45,
      isDisabled: true,
      styles: { progressColor: '#ffbb54', progressSelectedColor: '#ff9e0d' },
    },
    ...
];
<Gantt tasks={tasks} />

You may handle actions

<Gantt
  tasks={tasks}
  viewMode={view}
  onDateChange={onTaskChange}
  onTaskDelete={onTaskDelete}
  onProgressChange={onProgressChange}
  onDoubleClick={onDblClick}
/>

How to run example

cd ./example
npm install
npm start

Gantt Configuration

GanttProps

Parameter NameTypeRequiredDescription
tasksTaskYesTasks array.
EventOptioninterfaceNoSpecifies gantt events.
DisplayOptioninterfaceNoSpecifies view type and display timeline language.
StylingOptioninterfaceNoSpecifies chart and global tasks styles

EventOption

Parameter NameTypeRequiredDescription
onDoubleClick(task: Task) => anyNoSpecifies the function to be executed on the bar`s onDoubleClick event.
onTaskDelete(task: Task) => void/PromiseNoSpecifies the function to be executed on the bar`s on Delete button press event.
onDateChange(task: Task) => void/PromiseNoSpecifies the function to be executed when drag bar`s event on timeline has finished.
onProgressChange(task: Task) => void/PromiseNoSpecifies the function to be executed when drag bar`s progress event has finished.
timeStepnumberNoA time step value for onDateChange. Specify in milliseconds.

DisplayOption

Parameter NameTypeRequiredDescription
viewModeenumNoSpecifies the time scale. Quarter Day, Half Day, Day, Week(ISO-8601, 1st day is Monday), Month.
localestringNoSpecifies the month name language. Able formats: ISO 639-2, Java Locale.

Work in progress

FAQs

Package last updated on 05 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc