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

zt-gantt

v2.3.0

Published

An open source JavaScript Gantt. This library provides a powerful set of tools and functionalities to create interactive Gantt charts for project management.

Downloads

12

Readme

ztGantt Chart Library Documentation

Introduction

Welcome to the documentation for ztGantt Chart Library. This library provides a powerful set of tools and functionalities to create interactive Gantt charts for project management. This documentation will guide you through the installation process, usage instructions, and available features of the library.

Table of Contents


Installation

To integrate the Gantt Chart Library, adhere to the steps below:

  1. Download the library files from our website or repository.
  2. Integrate the library files (gantt.js and gantt.css) into your project.
  3. Link the library files in your HTML file.
  4. You're now ready to start using the ztGantt Chart Library!

Getting Started

To create a basic Gantt Chart, follow these steps:

Step 1: Add the files:

<script src="gantt.js" ></script>
<link rel="stylesheet" href="gantt.css" type="text/css">

Step 2: Insert the markup:

<div id="gantt_here" style='width:100%; height:100vh;'></div>

Step 3: Invoke the Gantt Chart Library using JavaScript, targeting the container element, and define your tasks, dependencies, and duration.

let element = document.getElementById("gantt_here"); 
let gantt = new ztGantt(element);  
gantt.options.columns = [
  {
    name: "text",
    width: 245,
    min_width: 80,
    max_width: 300,
    tree: true,
    label: "Name",
    resize: true,
    template: (task) => {
      return `<span>${task.parent == 0 ? task.text : task.subject}</span>`;
    },
  },
 ...
];

gantt.options.data = [
  { id: 1, text: "Project 1", parent: 0, progress: 50 },
  {
    id: 2,
    text: "Task #1",
    start_date: "05-05-2023",
    end_date: "05-05-2023",
    parent: 1,
    progress: 60,
  },
  ...
];

gantt.options.scales = [
  {
    unit: "week",
    step: 1,
    format: (t) => {
      return "%d %F";
    },
  },
  {
    unit: "day",
    step: 1,
    format: "%d %D",
  },
];

gantt.options.links = [
  { id: 1, source: 1, target: 2, type: 0 },
  { id: 2, source: 2, target: 3, type: 1 },
  { id: 3, source: 3, target: 4, type: 2 },
  { id: 4, source: 12, target: 15, type: 3 },
];  

gantt.render();

Note: Remember to call gantt.render(); whenever you wish to visualize the updated data.

Live demo

Complete Documentation: ztGantt Documentation


Features

  • Task Linking: Four types - finish-to-start, start-to-start, finish-to-finish, start-to-finish.
  • Drag and Drop: Shift multiple tasks horizontally and vertically.
  • Filtering: Conveniently filter out tasks.
  • Tooltips: Additional insights via tooltips.
  • Grid: Columns in the grid are fully customizable.
  • Customization: Modify the time scale, task edit form, and much more.
  • Task Progress: Update task progress via dragging or manually set the percentage.
  • Exports: Get your charts in PDF, PNG, or Excel formats.
  • Zoom Levels: Multiple timeline views - hour, day, week, month, quarter, and year.
  • Full Screen: View your Gantt in full screen for an immersive experience.
  • Task Management: Expand, collapse, add markers, modify, or delete tasks.
  • Auto Scheduling: Tasks are automatically scheduled.
  • Date Selection: Easily select start and end dates through drag and drop.
  • Mouse Scroll: Scroll timeline using mouse click.
  • Aesthetics: Customize the task colors via a color picker.
  • Localization: Multilingual support to cater to a global audience.
  • Themes: Dark mode for those late-night work sessions.

You can see the full list of features in the documentation

Try it Yourself:: Dive into hands-on examples and truly understand the potential of the library.