javascriptgantt 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.github/workflows/npm-publish-github-packages.yml +27 -0
- package/LICENSE +21 -0
- package/docs/Gantt-Chart-Documentation.pdf +0 -0
- package/index.html +1112 -0
- package/package.json +33 -0
- package/readme.md +158 -0
- package/src/assets/images/links.gif +0 -0
- package/src/assets/images/popup.gif +0 -0
- package/src/assets/images/taskColor.gif +0 -0
- package/src/assets/images/theme.gif +0 -0
- package/src/assets/images/zt-gantt-screenshot.png +0 -0
- package/src/assets/images/ztGanttLogo.png +0 -0
- package/src/assets/zt-tour/zt-tour.css +227 -0
- package/src/assets/zt-tour/zt-tour.js +1095 -0
- package/src/gantt.css +1157 -0
- package/src/gantt.js +9642 -0
- package/src/theme/dark.css +100 -0
- package/style.css +216 -0
package/package.json
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
{
|
2
|
+
"name": "javascriptgantt",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"description": "An open source JavaScript Gantt. This library provides a powerful set of tools and functionalities to create interactive Gantt charts for project management.",
|
5
|
+
"main": "src/gantt.js",
|
6
|
+
"scripts": {
|
7
|
+
"lint": "eslint ."
|
8
|
+
},
|
9
|
+
"repository": {
|
10
|
+
"type": "git",
|
11
|
+
"url": "git+https://github.com/Sunilsolankiji/jsgantt"
|
12
|
+
},
|
13
|
+
"keywords": [
|
14
|
+
"gantt",
|
15
|
+
"chart",
|
16
|
+
"gantt chart",
|
17
|
+
"scheduler",
|
18
|
+
"timeline",
|
19
|
+
"jsganttchart",
|
20
|
+
"jsgantt"
|
21
|
+
],
|
22
|
+
"author": "Sunil Solanki",
|
23
|
+
"license": "MIT",
|
24
|
+
"bugs": {
|
25
|
+
"url": "https://github.com/Sunilsolankiji/jsgantt/issues"
|
26
|
+
},
|
27
|
+
"homepage": "https://github.com/Sunilsolankiji/jsgantt#readme",
|
28
|
+
"devDependencies": {
|
29
|
+
"@eslint/js": "^9.6.0",
|
30
|
+
"eslint": "^9.6.0",
|
31
|
+
"globals": "^15.8.0"
|
32
|
+
}
|
33
|
+
}
|
package/readme.md
ADDED
@@ -0,0 +1,158 @@
|
|
1
|
+
# jsGantt Chart Library Documentation
|
2
|
+
|
3
|
+
|
4
|
+
## Introduction
|
5
|
+
Welcome to the documentation for [jsGantt](https://zehntech.github.io/zt-gantt/) 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.
|
6
|
+
|
7
|
+
|
8
|
+
## Table of Contents
|
9
|
+
- [Installation](#installation)
|
10
|
+
- [Getting Started](#getting-started)
|
11
|
+
- [Features](#features)
|
12
|
+
|
13
|
+
---
|
14
|
+
|
15
|
+
<a name="installation"></a>
|
16
|
+
## Installation
|
17
|
+
|
18
|
+
To integrate the Gantt Chart Library, adhere to the steps below:
|
19
|
+
|
20
|
+
1. Download the library files from our website or repository.
|
21
|
+
2. Integrate the library files (`gantt.js` and `gantt.css`) into your project.
|
22
|
+
3. Link the library files in your HTML file.
|
23
|
+
4. You're now ready to start using the jsGantt Chart Library!
|
24
|
+
|
25
|
+
<a href="https://zehntech.github.io/zt-gantt/">
|
26
|
+
<img src="./src/assets/images/zt-gantt-screenshot.png">
|
27
|
+
</a>
|
28
|
+
|
29
|
+
---
|
30
|
+
|
31
|
+
<a name="getting-started"></a>
|
32
|
+
## Getting Started ##
|
33
|
+
To create a basic Gantt Chart, follow these steps:
|
34
|
+
|
35
|
+
**Step 1:** Add the files:
|
36
|
+
~~~html
|
37
|
+
<script src="gantt.js" ></script>
|
38
|
+
<link rel="stylesheet" href="gantt.css" type="text/css">
|
39
|
+
~~~
|
40
|
+
|
41
|
+
**Step 2:** Insert the markup:
|
42
|
+
~~~html
|
43
|
+
<div id="gantt_here" style='width:100%; height:100vh;'></div>
|
44
|
+
~~~
|
45
|
+
|
46
|
+
**Step 3:** Invoke the Gantt Chart Library using JavaScript, targeting the container element, and define your tasks, dependencies, and duration.
|
47
|
+
|
48
|
+
~~~js
|
49
|
+
let element = document.getElementById("gantt_here");
|
50
|
+
let gantt = new jsGantt(element);
|
51
|
+
gantt.options.columns = [
|
52
|
+
{
|
53
|
+
name: "text",
|
54
|
+
width: 245,
|
55
|
+
min_width: 80,
|
56
|
+
max_width: 300,
|
57
|
+
tree: true,
|
58
|
+
label: "Name",
|
59
|
+
resize: true,
|
60
|
+
template: (task) => {
|
61
|
+
return `<span>${task.parent == 0 ? task.text : task.subject}</span>`;
|
62
|
+
},
|
63
|
+
},
|
64
|
+
...
|
65
|
+
];
|
66
|
+
|
67
|
+
gantt.options.data = [
|
68
|
+
{ id: 1, text: "Project 1", parent: 0, progress: 50 },
|
69
|
+
{
|
70
|
+
id: 2,
|
71
|
+
text: "Task #1",
|
72
|
+
start_date: "05-05-2023",
|
73
|
+
end_date: "05-05-2023",
|
74
|
+
parent: 1,
|
75
|
+
progress: 60,
|
76
|
+
},
|
77
|
+
...
|
78
|
+
];
|
79
|
+
|
80
|
+
gantt.options.scales = [
|
81
|
+
{
|
82
|
+
unit: "week",
|
83
|
+
step: 1,
|
84
|
+
format: (t) => {
|
85
|
+
return "%d %F";
|
86
|
+
},
|
87
|
+
},
|
88
|
+
{
|
89
|
+
unit: "day",
|
90
|
+
step: 1,
|
91
|
+
format: "%d %D",
|
92
|
+
},
|
93
|
+
];
|
94
|
+
|
95
|
+
gantt.options.links = [
|
96
|
+
{ id: 1, source: 1, target: 2, type: 0 },
|
97
|
+
{ id: 2, source: 2, target: 3, type: 1 },
|
98
|
+
{ id: 3, source: 3, target: 4, type: 2 },
|
99
|
+
{ id: 4, source: 12, target: 15, type: 3 },
|
100
|
+
];
|
101
|
+
|
102
|
+
gantt.render();
|
103
|
+
~~~
|
104
|
+
|
105
|
+
**Note:** Remember to call `gantt.render();` whenever you wish to visualize the updated data.
|
106
|
+
|
107
|
+
[Live demo](https://zehntech.github.io/zt-gantt/)
|
108
|
+
|
109
|
+
**Complete Documentation:** [jsGantt Documentation](./docs/Gantt-Chart-Documentation.pdf)
|
110
|
+
|
111
|
+
---
|
112
|
+
|
113
|
+
<a name="features"></a>
|
114
|
+
## Features
|
115
|
+
|
116
|
+
* **Task Linking:** Four types - finish-to-start, start-to-start, finish-to-finish, start-to-finish.
|
117
|
+
|
118
|
+
<a href="https://zehntech.github.io/zt-gantt/">
|
119
|
+
<img src="./src/assets/images/links.gif">
|
120
|
+
</a>
|
121
|
+
|
122
|
+
* **Drag and Drop:** Shift multiple tasks horizontally and vertically.
|
123
|
+
* **Filtering:** Conveniently filter out tasks.
|
124
|
+
* **Tooltips:** Additional insights via tooltips.
|
125
|
+
* **Grid:** Columns in the grid are fully customizable.
|
126
|
+
* **Customization:** Modify the time scale, task edit form, and much more.
|
127
|
+
|
128
|
+
<a href="https://zehntech.github.io/zt-gantt/">
|
129
|
+
<img src="./src/assets/images/popup.gif">
|
130
|
+
</a>
|
131
|
+
|
132
|
+
* **Task Progress:** Update task progress via dragging or manually set the percentage.
|
133
|
+
* **Exports:** Get your charts in PDF, PNG, or Excel formats.
|
134
|
+
* **Zoom Levels:** Multiple timeline views - hour, day, week, month, quarter, and year.
|
135
|
+
* **Full Screen:** View your Gantt in full screen for an immersive experience.
|
136
|
+
* **Task Management:** Expand, collapse, add markers, modify, or delete tasks.
|
137
|
+
* **Auto Scheduling:** Tasks are automatically scheduled.
|
138
|
+
* **Date Selection:** Easily select start and end dates through drag and drop.
|
139
|
+
* **Mouse Scroll:** Scroll timeline using mouse click.
|
140
|
+
* **Aesthetics:** Customize the task colors via a color picker.
|
141
|
+
|
142
|
+
<a href="https://zehntech.github.io/zt-gantt/">
|
143
|
+
<img src="./src/assets/images/taskColor.gif">
|
144
|
+
</a>
|
145
|
+
|
146
|
+
* **Localization:** Multilingual support to cater to a global audience.
|
147
|
+
* **Themes:** Dark mode for those late-night work sessions.
|
148
|
+
|
149
|
+
<a href="https://zehntech.github.io/zt-gantt/">
|
150
|
+
<img src="./src/assets/images/theme.gif">
|
151
|
+
</a>
|
152
|
+
|
153
|
+
You can see the full list of features in the [documentation](./docs/Gantt-Chart-Documentation.pdf)
|
154
|
+
|
155
|
+
|
156
|
+
[Try it Yourself:](https://stackblitz.com/edit/js-bdaa47?file=index.js): Dive into hands-on examples and truly understand the potential of the library.
|
157
|
+
|
158
|
+
---
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,227 @@
|
|
1
|
+
.zt-tour-popup * {
|
2
|
+
font-family: Helvetica Neue, Inter, ui-sans-serif, "Apple Color Emoji",
|
3
|
+
Helvetica, Arial, sans-serif;
|
4
|
+
color: var(--text-color);
|
5
|
+
}
|
6
|
+
|
7
|
+
.zt-tour-popup {
|
8
|
+
all: unset;
|
9
|
+
box-sizing: border-box;
|
10
|
+
color: var(--text-color);
|
11
|
+
margin: 0;
|
12
|
+
border-radius: 5px;
|
13
|
+
min-width: 250px;
|
14
|
+
max-width: 300px;
|
15
|
+
box-shadow: 0 1px 10px #0006;
|
16
|
+
z-index: 1000000000;
|
17
|
+
position: fixed;
|
18
|
+
top: 0;
|
19
|
+
right: 0;
|
20
|
+
background-color: var(--bg-color);
|
21
|
+
}
|
22
|
+
|
23
|
+
.zt-tour-popup-close-btn {
|
24
|
+
all: unset;
|
25
|
+
position: absolute;
|
26
|
+
top: 5px;
|
27
|
+
right: 5px;
|
28
|
+
height: 24px;
|
29
|
+
width: 24px;
|
30
|
+
cursor: pointer;
|
31
|
+
font-size: 24px;
|
32
|
+
font-weight: 500;
|
33
|
+
color: #ffffff;
|
34
|
+
text-align: center;
|
35
|
+
transition: color;
|
36
|
+
transition-duration: 0.3s;
|
37
|
+
z-index: 1;
|
38
|
+
}
|
39
|
+
|
40
|
+
.zt-tour-popup-close-btn:hover {
|
41
|
+
color: #000;
|
42
|
+
}
|
43
|
+
|
44
|
+
.zt-tour-popup-description {
|
45
|
+
margin-bottom: 0;
|
46
|
+
font-size: 14px;
|
47
|
+
font-weight: 400;
|
48
|
+
padding: 5px;
|
49
|
+
}
|
50
|
+
|
51
|
+
.zt-tour-popup-footer {
|
52
|
+
margin-top: 15px;
|
53
|
+
text-align: right;
|
54
|
+
zoom: 1;
|
55
|
+
display: flex;
|
56
|
+
align-items: center;
|
57
|
+
justify-content: space-between;
|
58
|
+
padding: 10px;
|
59
|
+
}
|
60
|
+
|
61
|
+
.zt-tour-popup-navigation-btns {
|
62
|
+
display: flex;
|
63
|
+
flex-grow: 1;
|
64
|
+
justify-content: flex-end;
|
65
|
+
}
|
66
|
+
|
67
|
+
.zt-tour-popup-footer button {
|
68
|
+
font-size: 12px;
|
69
|
+
cursor: pointer;
|
70
|
+
padding: 10px 20px;
|
71
|
+
background-color: var(--index-primary-color);
|
72
|
+
color: #fff;
|
73
|
+
border-radius: 3px;
|
74
|
+
border: transparent;
|
75
|
+
cursor: pointer;
|
76
|
+
transition: all 0.3s ease-in-out;
|
77
|
+
margin-left: 10px;
|
78
|
+
}
|
79
|
+
|
80
|
+
.zt-tour-popup-footer button:hover {
|
81
|
+
background-color: var(--index-primary-hover-color);
|
82
|
+
}
|
83
|
+
|
84
|
+
.zt-tour-popup-footer button:disabled {
|
85
|
+
opacity: 0.5;
|
86
|
+
pointer-events: none;
|
87
|
+
}
|
88
|
+
|
89
|
+
.zt-tour-popup-footer .zt-tour-popup-btn-disabled {
|
90
|
+
opacity: 0.5;
|
91
|
+
pointer-events: none;
|
92
|
+
}
|
93
|
+
|
94
|
+
.zt-tour-popup-arrow {
|
95
|
+
content: "";
|
96
|
+
position: absolute;
|
97
|
+
border: 5px solid #408be1;
|
98
|
+
}
|
99
|
+
|
100
|
+
.zt-tour-popup-arrow-side-left {
|
101
|
+
left: 100%;
|
102
|
+
border-right-color: transparent;
|
103
|
+
border-bottom-color: transparent;
|
104
|
+
border-top-color: transparent;
|
105
|
+
}
|
106
|
+
|
107
|
+
.zt-tour-popup-arrow-side-right {
|
108
|
+
right: 100%;
|
109
|
+
border-left-color: transparent;
|
110
|
+
border-bottom-color: transparent;
|
111
|
+
border-top-color: transparent;
|
112
|
+
}
|
113
|
+
|
114
|
+
.zt-tour-popup-arrow-side-top {
|
115
|
+
top: 100%;
|
116
|
+
border-right-color: transparent;
|
117
|
+
border-bottom-color: transparent;
|
118
|
+
border-left-color: transparent;
|
119
|
+
}
|
120
|
+
|
121
|
+
.zt-tour-popup-arrow-side-bottom {
|
122
|
+
bottom: 100%;
|
123
|
+
border-left-color: transparent;
|
124
|
+
border-top-color: transparent;
|
125
|
+
border-right-color: transparent;
|
126
|
+
}
|
127
|
+
|
128
|
+
.zt-tour-popup-arrow-side-left.zt-tour-popup-arrow-align-start,
|
129
|
+
.zt-tour-popup-arrow-side-right.zt-tour-popup-arrow-align-start {
|
130
|
+
top: 15px;
|
131
|
+
}
|
132
|
+
|
133
|
+
.zt-tour-popup-arrow-side-bottom.zt-tour-popup-arrow-align-start,
|
134
|
+
.zt-tour-popup-arrow-side-top.zt-tour-popup-arrow-align-start {
|
135
|
+
left: 15px;
|
136
|
+
}
|
137
|
+
|
138
|
+
.zt-tour-popup-arrow-align-end.zt-tour-popup-arrow-side-left,
|
139
|
+
.zt-tour-popup-arrow-align-end.zt-tour-popup-arrow-side-right {
|
140
|
+
bottom: 15px;
|
141
|
+
}
|
142
|
+
|
143
|
+
.zt-tour-popup-arrow-side-bottom.zt-tour-popup-arrow-align-end,
|
144
|
+
.zt-tour-popup-arrow-side-top.zt-tour-popup-arrow-align-end {
|
145
|
+
right: 15px;
|
146
|
+
}
|
147
|
+
|
148
|
+
.zt-tour-popup-arrow-side-left.zt-tour-popup-arrow-align-center,
|
149
|
+
.zt-tour-popup-arrow-side-right.zt-tour-popup-arrow-align-center {
|
150
|
+
top: 50%;
|
151
|
+
margin-top: -5px;
|
152
|
+
}
|
153
|
+
|
154
|
+
.zt-tour-popup-arrow-side-bottom.zt-tour-popup-arrow-align-center,
|
155
|
+
.zt-tour-popup-arrow-side-top.zt-tour-popup-arrow-align-center {
|
156
|
+
left: 50%;
|
157
|
+
margin-left: -5px;
|
158
|
+
}
|
159
|
+
|
160
|
+
.zt-tour-popup-arrow-side-over.zt-tour-popup-arrow-align-over {
|
161
|
+
display: none;
|
162
|
+
}
|
163
|
+
|
164
|
+
.zt-tour-d-none {
|
165
|
+
display: none;
|
166
|
+
}
|
167
|
+
|
168
|
+
.zt-tour-popup-title {
|
169
|
+
font-size: 18px;
|
170
|
+
font-weight: 700;
|
171
|
+
display: block;
|
172
|
+
position: relative;
|
173
|
+
margin: 0;
|
174
|
+
padding: 10px;
|
175
|
+
background-color: var(--index-primary-color);
|
176
|
+
color: #fff;
|
177
|
+
border-radius: 5px 5px 0 0;
|
178
|
+
}
|
179
|
+
|
180
|
+
.zt-tour-popup-description {
|
181
|
+
margin-bottom: 0;
|
182
|
+
font-size: 14px;
|
183
|
+
line-height: 1.5;
|
184
|
+
font-weight: 400;
|
185
|
+
zoom: 1;
|
186
|
+
color: var(--text-color);
|
187
|
+
padding: 10px;
|
188
|
+
}
|
189
|
+
|
190
|
+
.zt-tour-hint,
|
191
|
+
.zt-tour-announcement {
|
192
|
+
position: absolute;
|
193
|
+
background-color: #fff;
|
194
|
+
box-shadow: 0 0 17px rgba(0, 0, 0, 0.24);
|
195
|
+
padding: 12px 18px;
|
196
|
+
border-radius: 5px;
|
197
|
+
max-width: 400px;
|
198
|
+
z-index: 10001010;
|
199
|
+
animation-name: fadein;
|
200
|
+
animation-duration: 0.2s;
|
201
|
+
}
|
202
|
+
|
203
|
+
.zt-tour-hint-backdrop,
|
204
|
+
.zt-tour-announcement-backdrop {
|
205
|
+
background-color: transparent;
|
206
|
+
position: fixed;
|
207
|
+
top: 0;
|
208
|
+
left: 0;
|
209
|
+
height: 100vh;
|
210
|
+
width: 100vw;
|
211
|
+
z-index: 1000109;
|
212
|
+
}
|
213
|
+
|
214
|
+
@keyframes fadein {
|
215
|
+
0% {
|
216
|
+
opacity: 0;
|
217
|
+
scale: 0.5;
|
218
|
+
}
|
219
|
+
50% {
|
220
|
+
opacity: 0.8;
|
221
|
+
scale: 0.8;
|
222
|
+
}
|
223
|
+
100% {
|
224
|
+
opacity: 1;
|
225
|
+
scale: 1;
|
226
|
+
}
|
227
|
+
}
|