npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-gantt

v2.1.8

Published

Gantt chart react component

Downloads

1,248

Readme

react-gantt

npm npm GitHub stars

Gantt chart react component

Please ★ this repo if you found it useful ★ ★ ★

Submit your ReactGantt use cases and I will feature them in the in the used by section

Features

  • Multiple steps
  • Custom styles
  • Dynamic bounds

Demo

See a demo

Installation

npm install --save react-gantt

Dependencies

Usage

import ReactGantt, { GanttRow } from 'react-gantt';

class Demo extends Component {
  render() {
    return (
      <ReactGantt
        templates={{
          myTasks: {
            title: 'My Tasks',
            steps: [
              {
                name: 'Task Phase One',
                color: '#0099FF'
              },
              {
                name: 'Task Phase Two',
                color: '#FF9900'
              }
            ]
          }
        }}
        leftBound={moment().set({hour: 0, date: 30, month: 5, year: 2016}).toDate()}
        rightBound={moment().set({hour: 0, date: 29, month: 8, year: 2016}).toDate()}
      >
        <GanttRow
          title="Task 1"
          templateName="myTasks"
          steps={[
            moment().set({hour: 0, date: 1, month: 6, year: 2016}).toDate(),
            moment().set({hour: 0, date: 4, month: 8, year: 2016}).toDate(),
            moment().set({hour: 0, date: 17, month: 8, year: 2016}).toDate()
          ]}
        />
        <GanttRow
          title="Task 1"
          templateName="myTasks"
          steps={[
            moment().set({hour: 0, date: 27, month: 2, year: 2016}).toDate(),
            moment().set({hour: 0, date: 9, month: 7, year: 2016}).toDate(),
            moment().set({hour: 0, date: 22, month: 7, year: 2016}).toDate()
          ]}
        />
      </ReactGantt>
    );
  }
}

Props

ReactGantt

| Prop Name | Type | Behavior | |---------------|-----------|--------------------| | children | GanttRow | Gantt Rows initialized by you| | dateFormat | String | String format to display dates | | dayFormat | String | Format used when timeline is in 'day' window | | debug | Boolean | Includes extra detailed outputs to show calculated values | | hourFormat | String | Format used when timeline is in 'hourly' window | | leftBound | Object | Date representation of the chart 'beginning' (left-most) date | | minuteFormat | String | Format used when timeline is in 'minute' window | | monthFormat | String | Format used when timeline is in 'monthly' window | | rightBound | Object | Date representation of chart's ending (right-most) date | | secondFormat | String | Format used when timeline is in 'seconds' window | | style | Object | CSS object for chart customization | | templates | Object | Object with keys representing potential states and values for state title and style | | timeFormat | String | Is this used? | | timelineStyle | Object | Object for styles to be used in timeline component, namely the allowed width between ticks | | weekFormat | String | Format used when timeline is in 'weekly' window | | yearFormat | String | Format used when timeline is in 'yearly' window |

GanttTimeline

| Prop Name | Type | Behavior | |---------------|-----------|--------------------| | style | Object | Customize the calculated appearance of the timeline. In pixels: tickWidth, paddingLeft, minWidth | | rows | Array | The parent's GanttRows (is this deprecated?) | | scalingFactor | Number | Allows customization of the calculated # of ticks |

GanttRow

| Prop Name | Type | Behavior | |---------------|-----------|--------------------| | barStyle | Object | Style object for gantt bar | | popupStyle | Object | Style object for popup modal | | markerStyle | Object | Style object for cursor | | steps | Array | Array of steps that bar passes through (needs to exceed the templates steps by 1? Why?) | | templateName | String | Template name to load style and step titles | | title | String | Title to be displayed alongside bar |

GanttBar

| Prop Name | Type | Behavior | |---------------|-----------|--------------------| | style | Object | CSS object for bar styles | | steps | Array | Array of steps that bar passes through (needs to exceed the templates steps by 1? Why?) | | templateName | String | Template name to load style and step titles |

GanttPopup

| Prop Name | Type | Behavior | |---------------|-----------|--------------------| | style | Object | CSS Object for popup style | | markerTime | Object | Time object represnting cursor position on parent GanttBar | | activeStep | Object | Object representing current step cursor is hovering on parent GanttBar | | title | String | Title (same as parent Gantt bar) | | titleStyle | Object | Style for title displayed on pop up |

Support

Submit an issue

Screenshots

react-gantt

Contributing

Review the guidelines for contributing

License

MIT License

Jam Risser © 2018

Changelog

Review the changelog

Credits

Used By

  • ModernGreek - The next generation of fraternity and sorority apparel
  • yerbaBuena - a superpowered approach to electronic medical records
  • TaskCluster - task execution framework that supports Mozilla's continuous integration and release processes

Support on Liberapay

A ridiculous amount of coffee ☕ ☕ ☕ was consumed in the process of building this project.

Add some fuel if you'd like to keep me going!

Liberapay receiving Liberapay patrons