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

garganttua

v1.3.7

Published

simple gantt charts based on css grid

Downloads

15

Readme

Garganttua

     /  _____/_____ _______  _________    _____/  |__/  |_ __ _______
    /   \  ___\__  \\_  __ \/ ___\__  \  /    \   __\   __\  |  \__  \
    \    \_\  \/ __ \|  | \/ /_/  > __ \|   |  \  |  |  | |  |  // __ \_
     \______  (____  /__|  \___  (____  /___|  /__|  |__| |____/(____  /
            \/     \/     /_____/     \/     \/                      \/

A simplified Gantt-Chart representation tool for the browser, leveraging the power of CSS-grid \o/

Usage

In the demo directory you find some examples on how to use this library. The recommended way is to use the library to load a JSON file from the server, containing all tasks to display in the Gantt-chart.

<script src="../dist/iife/garganttua.js" type="module" async></script>
<garganttua-gantt-chart src="./data.json" start="2020-12-01" end="2021-03-15" groups="collapsable"></garganttua-gantt-chart>

Element Config

The garganttua-gantt-chart custom element has some attributes you have to provide as configuration:

  • src - Required. See "JSON data reference" for the format.
  • start - Required. this reflects the start of the window for the Gantt chart. Tasks will be arranged related to the start and end date of the chart
  • end - Required. this reflects the end of the window for the Gantt chart. Tasks will be arranged related to the start and end date of the chart
  • groups - add "collapsable" as groups attribute if you want to have the sub groups hidden initially. Toggle Buttons to toggle the visibility are attached automatically.

JSON data reference

The type definitions can be found in lib/task-list.ts. But the data structure of the provided JSON data is very easy: (An extensive example can be seen in demo/data.json)

tasks.json

[
  {
    type: "task", // simple task
    description: "some string", // some short task description
    start?: "2021-01-01", // date formatted as ISO date string: yyyy-mm-dd
    end?: "2021-01-15", // date formatted as ISO date string: yyyy-mm-dd
    content?: "SGVsbG8gV29ybGQh" // b64 encoded HTML or text,
    state?: string, // adds state classes to the task schedules, so they can be styled
    link?: string // adds a link to the task description
  },
  ...
  {
    type: "group"
    description: "some string"
    tasks: [ ... ] // a group has some tasks or also new groups
  }
]

Properties

type

Development

npm i
npm start
open http://localhost:8080/demo