Git Product home page Git Product logo

v-for-velascodmy23 / jsgantt-improved Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jsganttimproved/jsgantt-improved

0.0 0.0 0.0 4.47 MB

Javascript Gantt: fully featured gantt chart component built entirely with JS and CSS. No images or external libs required.

Home Page: https://jsganttimproved.github.io/jsgantt-improved

License: Other

JavaScript 0.35% TypeScript 88.78% CSS 8.68% HTML 2.20%

jsgantt-improved's Introduction

Build Status

A fully featured gantt chart component built entirely in Javascript, CSS and AJAX. It is lightweight and there is no need of external libraries or additional images.

Demo Image

Start using with including the files jsgantt.js and jsgantt.css that are inside dist/ folder.

Or install and use in JS

npm install jsgantt-improved

Import in your JS import {JSGantt} from 'jsgantt-improved';

See the FULL DOCUMENTATION for more details in all features.

For Angular use the component ng-gantt

For React use the component react-jsgantt

For Vue , see this example: https://stackblitz.com/edit/vue-jsgantt

For .NET , see this example: .NET Documentation

Example

You can view a Solo live example at:

Or use a live coding example at Codenpen:

Easy to Use

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

<div style="position:relative" class="gantt" id="GanttChartDIV"></div>

<script>

var g = new JSGantt.GanttChart(document.getElementById('GanttChartDIV'), 'day');

g.setOptions({
  vCaptionType: 'Complete',  // Set to Show Caption : None,Caption,Resource,Duration,Complete,     
  vQuarterColWidth: 36,
  vDateTaskDisplayFormat: 'day dd month yyyy', // Shown in tool tip box
  vDayMajorDateDisplayFormat: 'mon yyyy - Week ww',// Set format to dates in the "Major" header of the "Day" view
  vWeekMinorDateDisplayFormat: 'dd mon', // Set format to display dates in the "Minor" header of the "Week" view
  vLang: 'en',
  vShowTaskInfoLink: 1, // Show link in tool tip (0/1)
  vShowEndWeekDate: 0,  // Show/Hide the date for the last day of the week in header for daily
  vAdditionalHeaders: { // Add data columns to your table
      category: {
        title: 'Category'
      },
      sector: {
        title: 'Sector'
      }
    },
  vUseSingleCell: 10000, // Set the threshold cell per table row (Helps performance for large data.
  vFormatArr: ['Day', 'Week', 'Month', 'Quarter'], // Even with setUseSingleCell using Hour format on such a large chart can cause issues in some browsers,
  
});

// Load from a Json url
JSGantt.parseJSON('./fixes/data.json', g);

// Or Adding  Manually
g.AddTaskItemObject({
  pID: 1,
  pName: "Define Chart <strong>API</strong>",
  pStart: "2017-02-25",
  pEnd: "2017-03-17",
  pPlanStart: "2017-04-01",
  pPlanEnd: "2017-04-15 12:00",
  pClass: "ggroupblack",
  pLink: "",
  pMile: 0,
  pRes: "Brian",
  pComp: 0,
  pGroup: 0,
  pParent: 0,
  pOpen: 1,
  pDepend: "",
  pCaption: "",
  pCost: 1000,
  pNotes: "Some Notes text",
  category: "My Category",
  sector: "Finance"
});

g.Draw();

</script>

Features

  • Tasks & Collapsible Task Groups
  • Dependencies and Highlight when hover a task
  • Edit data in gantt table with list of responsible
  • Task Completion
  • Table with Additional Columns
  • Task Styling or as HTML tags
  • Milestones
  • Resources
  • Costs
  • Plan Start and End Dates
  • Gantt with Planned vs Executed
  • Dynamic Loading of Tasks
  • Dynamic change of format: Hour, Day, Week, Month, Quarter
  • Load Gantt from JSON and XML
    • From external files (including experimental support for MS Project XML files)
    • From JavaScript Strings
  • Support for Internationalization
    • Chinese (cn)
    • Czech (cs)
    • Dutch (Standard)
    • selected>English (en)
    • French (fr)
    • German (de)
    • Hungarian (hu)
    • Indonesian (id)
    • Italian (it)
    • Japanese (ja)
    • Portuguese (pt)
    • Russian (ru)
    • Spanish (es)
    • Swedish (sv)
    • Turkish (tr)

Documentation

See the Documentation wiki page or the included docs/index.html file for instructions on use.

Project based on https://code.google.com/p/jsgantt/.

Want to Collaborate?

Its easy to get it set:

  • Clone this repo
  • Install lib dependencies: npm i
  • Install global dependencies: npm i -g browserify nodemon onchange tsc
  • Compile final js to be used on demo: npm run dist
  • Run the demo with a live example: npm start.
  • You can check the demo gantt that we use for testing features at: http://127.0.0.1:8080/docs/demo.html
  • Use npm run watch or do your change in src and restart this command refresh the changes.

For testing:

  • Install global dependencies: npm i -g webdriver-manager
  • Install selenium webdriver: npm run webdriver, it will install something like node_modules/webdriver-manager/selenium/chromedriver_88.0.4324.96.zip

node node_modules/protractor/bin/webdriver-manager update apt install chromium

apt install chromium-bsu

  • Use npm run test with e2e tests.
  • Or use npm run watch:test to keep watching the tests

For new release:

  • Increment the version number on package.json
  • Run npm run publishnpm

Or help us donating...

jsgantt-improved's People

Contributors

mariohmol avatar nidu avatar jonathanlassen avatar eduardomourar avatar lbost avatar rickcardoso avatar connyn avatar joules457 avatar bitflower avatar andreabonadei avatar arytkonen avatar ardakilic avatar calvintts avatar grypho avatar dflaven avatar etzrv avatar fandys avatar dolik-rce avatar jimmycheng avatar nickyg56 avatar qar avatar rvbe avatar saihemanthgithub avatar sgjoshi avatar teguhrianto avatar uzeltinger avatar vasiliy13 avatar viniciusrc15 avatar yeheshuah avatar agarciacalvo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.