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 🙏

© 2025 – Pkg Stats / Ryan Hefner

codersquad-ganttjs

v1.0.10

Published

A simple, modern, interactive gantt library for the web

Readme

A modern, configurable, Gantt library for the web.

Hero Image

Gantt JS

Gantt JS is an actively maintained and extended fork of the fantastic Frappe Gantt. It keeps the familiar API while adding a host of modern features and quality-of-life improvements.

Gantt charts are bar charts that visually illustrate a project's tasks, schedule, and dependencies. With Frappe Gantt, you can build beautiful, customizable, Gantt charts with ease.

You can use it anywhere from hobby projects to tracking the goals of your team at the worksplace.

ERPNext uses Frappe Gantt.

Motivation

We needed a Gantt View for ERPNext. Surprisingly, we couldn't find a visually appealing Gantt library that was open source - so we decided to build it. Initially, the design was heavily inspired by Google Gantt and DHTMLX.

Key Features

  • Customisable Views – Day, Hour, Week, Month, Year or any custom view definition.
  • Ignore Periods & Holiday Highlighting – Weekends or any dates can be ignored in calculations and highlighted with custom colours/labels.
  • Expected Progress Overlay – Automatically draws an extra bar that shows where the task should be today.
  • Thumbnails on Tasks – Display an avatar or any image inside the bar.
  • Custom Suffix Nodes – Render custom HTML/icons at the right end of a bar (e.g., status indicator or menu button).
  • Snap & Drag – Snap moves/resizes to any interval and optionally move downstream dependencies automatically.
  • Infinite Horizontal Scrolling – The timeline expands as the user scrolls.
  • Today Button & Current-day Highlight – Jump straight to "today" and keep the current date visually marked.
  • View-Mode Selector – Built-in dropdown for switching view modes at runtime.
  • Fine-grained Grid Lines Control – Show vertical, horizontal, both, or no grid lines.
  • Full Theming & Multi-lingual Support – Change colours/sizes via CSS variables and render in any language.

Usage

Install with:

npm install codersquad-ganttjs

Include it in your HTML:

<script src="frappe-gantt.umd.js"></script>
<link rel="stylesheet" href="frappe-gantt.css" />

Start using Gantt:

let tasks = [
  {
    id: '1',
    name: 'Redesign website',
    start: '2016-12-28',
    end: '2016-12-31',
    progress: 20
  },
  ...
]
let gantt = new Gantt("#gantt", tasks);

Configuration

Frappe Gantt offers a wide range of options to customize your chart.

| Option | Description | Possible Values | Default | | ------------------------ | ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- | | arrow_curve | Curve radius of arrows connecting dependencies. | Any positive integer. | 5 | | auto_move_label | Move task labels when user scrolls horizontally. | true, false | false | | bar_corner_radius | Radius of the task bar corners (in pixels). | Any positive integer. | 3 | | bar_height | Height of task bars (in pixels). | Any positive integer. | 30 | | container_height | Height of the container. | auto - dynamic container height to fit all tasks - or any positive integer (for pixels). | auto | | column_width | Width of each column in the timeline. | Any positive integer. | 45 | | date_format | Format for displaying dates. | Any valid JS date format string. | YYYY-MM-DD | | upper_header_height | Height of the upper header in the timeline (in pixels). | Any positive integer. | 45 | | lower_header_height | Height of the lower header in the timeline (in pixels). | Any positive integer. | 30 | | snap_at | Snap tasks at particular intervel while resizing or dragging. | Any interval (see below) | 1d | | infinite_padding | Whether to extend timeline infinitely when user scrolls. | true, false | true | | holidays | Highlighted holidays on the timeline. | Object mapping CSS colors to holiday types. Types can either be a) 'weekend', or b) array of strings or date objects or objects in the format {date: ..., label: ...} | { 'var(--g-weekend-highlight-color)': 'weekend' } | | ignore | Ignored areas in the rendering | weekend or Array of strings or date objects (weekend can be present to the array also). | [] | | language | Language for localization. | ISO 639-1 codes like en, fr, es. | en | | lines | Determines which grid lines to display. | none for no lines, vertical for only vertical lines, horizontal for only horizontal lines, both for complete grid. | both | | move_dependencies | Whether moving a task automatically moves its dependencies. | true, false | true | | padding | Padding around task bars (in pixels). | Any positive integer. | 18 | | popup_on | Event to trigger the popup display. | click or hover | click | | readonly_progress | Disables editing task progress. | true, false | false | | readonly_dates | Disables editing task dates. | true, false | false | | readonly | Disables all editing features. | true, false | false | | scroll_to | Determines the starting point when chart is rendered. | today, start, end, or a date string. | today | | show_expected_progress | Shows expected progress for tasks. | true, false | false | | today_button | Adds a button to navigate to today's date. | true, false | true | | view_mode | The initial view mode of the Gantt chart. | Day, Week, Month, Year. | Day | | view_mode_select | Allows selecting the view mode from a dropdown. | true, false | false |

Apart from these ones, two options - popup and view_modes (plural, not singular) - are available. They have "sub"-APIs, and thus are listed separately.

View Mode Configuration

The view_modes option determines all the available view modes for the chart. It should be an array of objects.

Each object can have the following properties:

  • name (string) - the name of view mode.
  • padding (interval) - the time above.
  • step - the interval of each column
  • lower_text (date format string or function) - the format for text in lower header. Blank string for none. The function takes in currentDate, previousDate, and lang, and should return a string.
  • upper_text (date format string or function) - the format for text in upper header. Blank string for none. The function takes in currentDate, previousDate, and lang, and should return a string.
  • upper_text_frequency (number) - how often the upper text has a value. Utilized in internal calculation to improve performance.
  • thick_line (function) - takes in currentDate, returns Boolean determining whether the line for that date should be thicker than the others.

Three other options allow you to override general configuration for this view mode alone:

  • date_format
  • column_width
  • snap_at For details, see the above table.

Popup Configuration

popup is a function. If it returns

  • false, there will be no popup.
  • undefined, the popup will be rendered based on manipulation within the function
  • a HTML string, the popup will be that string.

The function receives one object as an argument, containing:

  • task - the task as an object
  • chart - the entire Gantt chart
  • get_title, get_subtitle, get_details (functions) - get the relevant section as a HTML node.
  • set_title, set_subtitle, set_details (functions) - take in the HTML of the relevant section
  • add_action (function) - accepts two parameters, html and func - respectively determining the HTML of the action and the callback when the action is pressed.

API

Frappe Gantt exposes a few helpful methods for you to interact with the chart:

| Name | Description | Parameters | | ------------------- | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | .update_options | Re-renders the chart after updating specific options. | new_options - object containing new options. | | .change_view_mode | Updates the view mode. | view_mode - Name of view mode or view mode object (see above) and maintain_pos - whether to go back to current scroll position after rerendering, defaults to false. | | .scroll_current | Scrolls to the current date | No parameters. | | .update_task | Re-renders a specific task bar alone | task_id - id of task and new_details - object containing the task properties to be updated. |

Development Setup

If you want to contribute enhancements or fixes:

  1. Clone this repo.
  2. cd into project directory.
  3. Run pnpm i to install dependencies.
  4. pnpm run build to build files - or pnpm run build-dev to build and watch for changes.
  5. Open index.html in your browser.
  6. Make your code changes and test them.