|
1 |
| -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. |
| 1 | +[](https://travis-ci.com/jsGanttImproved/jsgantt-improved) |
2 | 2 |
|
3 |
| -You can view a live example at https://jsGanttImproved.github.io/jsgantt-improved |
4 | 3 |
|
5 |
| -Features include: |
| 4 | +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. |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | +Start using with including the files `jsgantt.js` and `jsgantt.css` that are inside `docs/` folder. |
| 11 | + |
| 12 | +Or install and use in JS |
| 13 | + |
| 14 | +`npm install jsgantt-improved` |
| 15 | + |
| 16 | +Import in your JS `import {JSGantt} from 'jsgantt-improved';` |
| 17 | + |
| 18 | +For **Angular** use the component [ng-gantt](https://github.com/mariohmol/ng-gantt) |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | +## Example |
| 24 | + |
| 25 | +Take a look at this Landing Page with docs and live examples: |
| 26 | + |
| 27 | +* https://jsganttimproved.github.io/jsgantt-improved/docs |
| 28 | + |
| 29 | +You can view a Solo live example at: |
| 30 | + |
| 31 | +https://jsganttimproved.github.io/jsgantt-improved/docs/demo.html |
| 32 | + |
| 33 | + |
| 34 | +## Easy to Use |
| 35 | + |
| 36 | +```html |
| 37 | +<link href="jsgantt.css" rel="stylesheet" type="text/css"/> |
| 38 | +<script src="jsgantt.js" type="text/javascript"></script> |
| 39 | + |
| 40 | +<div style="position:relative" class="gantt" id="GanttChartDIV"></div> |
| 41 | + |
| 42 | +<script> |
| 43 | +
|
| 44 | +var g = new JSGantt.GanttChart(document.getElementById('GanttChartDIV'), 'day'); |
| 45 | +
|
| 46 | +g.setOptions({ |
| 47 | + vCaptionType: 'Complete', // Set to Show Caption : None,Caption,Resource,Duration,Complete, |
| 48 | + vQuarterColWidth: 36, |
| 49 | + vDateTaskDisplayFormat: 'day dd month yyyy', // Shown in tool tip box |
| 50 | + vDayMajorDateDisplayFormat: 'mon yyyy - Week ww',// Set format to dates in the "Major" header of the "Day" view |
| 51 | + vWeekMinorDateDisplayFormat: 'dd mon', // Set format to display dates in the "Minor" header of the "Week" view |
| 52 | + vLang: 'en', |
| 53 | + vShowTaskInfoLink: 1, // Show link in tool tip (0/1) |
| 54 | + vShowEndWeekDate: 0, // Show/Hide the date for the last day of the week in header for daily |
| 55 | + vUseSingleCell: 10000, // Set the threshold cell per table row (Helps performance for large data. |
| 56 | + vFormatArr: ['Day', 'Week', 'Month', 'Quarter'], // Even with setUseSingleCell using Hour format on such a large chart can cause issues in some browsers |
| 57 | +}); |
| 58 | +
|
| 59 | +// Load from a Json url |
| 60 | +JSGantt.parseJSON('./fixes/data.json', g); |
| 61 | +
|
| 62 | +// Or Adding Manually |
| 63 | +g.AddTaskItemObject({ |
| 64 | + "pID": 1, |
| 65 | + "pName": "Define Chart <strong>API</strong>", |
| 66 | + "pStart": "2017-02-25", |
| 67 | + "pEnd": "2017-03-17", |
| 68 | + "pPlanStart": "2017-04-01", |
| 69 | + "pPlanEnd": "2017-04-15 12:00", |
| 70 | + "pClass": "ggroupblack", |
| 71 | + "pLink": "", |
| 72 | + "pMile": 0, |
| 73 | + "pRes": "Brian", |
| 74 | + "pComp": 0, |
| 75 | + "pGroup": 1, |
| 76 | + "pParent": 0, |
| 77 | + "pOpen": 1, |
| 78 | + "pDepend": "", |
| 79 | + "pCaption": "", |
| 80 | + "pCost": 1000, |
| 81 | + "pNotes": "Some Notes text" |
| 82 | +}); |
| 83 | +
|
| 84 | +g.Draw(); |
| 85 | +
|
| 86 | +</script> |
| 87 | +``` |
| 88 | + |
| 89 | +## Features |
| 90 | + |
6 | 91 | * Tasks & Collapsible Task Groups
|
7 | 92 | * Dependencies
|
8 | 93 | * Task Completion
|
9 |
| - * Task Styling |
| 94 | + * Task Styling or as HTML tags |
10 | 95 | * Milestones
|
11 | 96 | * Resources
|
| 97 | + * Costs |
| 98 | + * Plan Start and End Dates |
| 99 | + * Gantt with Planned vs Executed |
12 | 100 | * Dynamic Loading of Tasks
|
13 | 101 | * Dynamic change of format: Hour, Day, Week, Month, Quarter
|
14 |
| - * Load Gantt from XML |
| 102 | + * Load Gantt from XML and JSON |
15 | 103 | * From external files (including experimental support for MS Project XML files)
|
16 | 104 | * From JavaScript Strings
|
17 |
| - * Support for Internationalization (all hard coded strings can be overridden) |
| 105 | + * Support for Internationalization |
| 106 | + |
| 107 | +## Documentation |
| 108 | + |
| 109 | +See the [Documentation](./Documentation.md) wiki page or the included ``docs/index.html`` file for instructions on use. |
| 110 | + |
| 111 | +Project based on https://code.google.com/p/jsgantt/. |
| 112 | + |
| 113 | + |
| 114 | +## Want to Collaborate? |
| 115 | + |
| 116 | +Its easy to get it set: |
18 | 117 |
|
19 |
| -Project forked as I was unable to contact the original maintainers. This work was done to support a personal project that didn't warrant a more heavyweight system (e.g. the dojo toolkit gantt chart features). |
| 118 | +* Clone this repo |
| 119 | +* Install lib dependencies: `npm i` |
| 120 | +* Install global dependencies: `npm i -g browserify nodemon` |
| 121 | +* Run the demo, This will start a `localhost:8080` with a live example: `npm start`. |
| 122 | +* Use `npm run watch:dist` or do your change in `src` and restart this command refresh the changes. |
20 | 123 |
|
21 |
| -See the [Documentation](https://github.com/jsGanttImproved/jsgantt-improved/wiki/Documentation) wiki page or the included ``index.html`` file for instructions on use. |
| 124 | +For testing use `npm run test` with e2e tests. |
0 commit comments