mzgantt 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.en.md CHANGED
@@ -1,36 +1,968 @@
1
- # MZGantt甘特图插件npm版
2
1
 
3
- #### Description
4
- MZGantt是一款原生js开发的甘特图插件。支持vue,ts,js等,支持流行的各种前端框架,可以快速引用到我们的web程序或者移动应用中。
2
+ # MZGantt Gantt Chart Plugin
3
+ MZGantt is a native JavaScript Gantt chart plugin. It supports Vue, TypeScript, JavaScript and other popular frontend frameworks, and can be quickly integrated into web applications or mobile apps.
5
4
 
6
- #### Software Architecture
7
- Software architecture description
5
+ ## I. Plugin Features
8
6
 
9
- #### Installation
7
+ * <b>Drag & Drop Editing:</b> Supports drag and drop editing
8
+ * <b>Inline Editing:</b> Supports inline editing functionality
9
+ * <b>Modal Support:</b> Provides task model to work with external modals for task editing
10
10
 
11
- 1. xxxx
12
- 2. xxxx
13
- 3. xxxx
11
+ * <b>Customizable Columns:</b> Supports custom task attribute columns
12
+ * <b>Multi-segment Display:</b> Supports multi-segment display within task rows
13
+ * <b>Calendar Support:</b> Supports custom calendars
14
+ * <b>Image Export:</b> Supports full Gantt chart image export
14
15
 
15
- #### Instructions
16
+ * <b>Big Data Processing:</b> Supports lazy loading for tasks
17
+ * <b>Filter Support:</b> Supports setting conditions for quick filtering
18
+ * <b>Milestone Markers:</b> Supports configuring milestone marker lines
19
+ * <b>Four Task Relationships:</b> Supports drag-and-drop creation and editing of four task relationships (FS, FF, SF, SS)
20
+ * <b>Customizable Tooltips:</b> Supports custom tooltip content and styles
16
21
 
17
- 1. xxxx
18
- 2. xxxx
19
- 3. xxxx
22
+ * <b>Customizable Styles:</b> Supports custom display styles
23
+ * <b>Easy to Use:</b> Direct JS reference or npm installation (supports Vue, TypeScript)
24
+ * <b>Rich Configuration:</b> Provides extensive configuration parameters and interfaces to meet project requirements
20
25
 
21
- #### Contribution
26
+ ## II. Demo
22
27
 
23
- 1. Fork the repository
24
- 2. Create Feat_xxx branch
25
- 3. Commit your code
26
- 4. Create Pull Request
28
+ Demo URL: <https://mzgantt.com/en/demo>
27
29
 
30
+ ## III. How to Use?
28
31
 
29
- #### Gitee Feature
32
+ MZGantt supports two usage methods: JS reference and npm installation.
30
33
 
31
- 1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
32
- 2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
33
- 3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
34
- 4. The most valuable open source project [GVP](https://gitee.com/gvp)
35
- 5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
36
- 6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
34
+ 1. Download
35
+ Before use, download the standard JS version or install via npm.
36
+
37
+ 2. Reference MZGantt Plugin
38
+ Include the following JS packages in the HTML page header:
39
+ * Standard JS reference:
40
+ ```javascript
41
+ <!-- Include jQuery library -->
42
+ <script language="javascript" src="jquery.min.js"></script>
43
+
44
+ <!-- Include Gantt chart plugin -->
45
+ <link rel="stylesheet" type="text/css" href="./gantt/mzgantt.css" />
46
+ <script language="javascript" src="./gantt/mzgantt.js"></script>
47
+ <script language="javascript" src="./gantt/edit.js"></script>
48
+ ```
49
+
50
+ * npm reference:
51
+ ```javascript
52
+ // Import MZGantt packages, include the following packages as needed:
53
+ // 1. Core package: MZGantt (required, includes basic Gantt chart display)
54
+ // 2. Editor package: MZGanttEditor (optional, includes editing functionality)
55
+ // 3. Export package: MZGanttExport (optional, includes image export functionality)
56
+ // 4. Mobile package: MZGanttMobile (optional, includes mobile support)
57
+ import {MZGantt, MZGanttEditor} from '/node_modules/mzgantt';
58
+
59
+ // Get and set license key
60
+ MZGantt.LicenseKey = "Your license key";
61
+ ```
62
+
63
+ 3. Define Gantt Chart Container (div)
64
+ Define a div in the HTML page as the container for displaying the Gantt chart:
65
+ ```html
66
+ <div id="GanttChartDIV" style="width:100%;"></div>
67
+ ```
68
+
69
+ 4. Define Gantt Chart Parameters (can define empty object {}, plugin will use default values)
70
+ This step is optional. When personalized display is needed, set Gantt chart parameters. Some configurable parameters are as follows:
71
+ ```javascript
72
+ var ganttConfig = {
73
+ useFor: "Task", // Set Gantt chart purpose: 'Resource' for resource utilization (e.g., meeting room management), 'Task' for task management (e.g., planning and progress). Default: Task
74
+ ganttStatus: "e", // Set Gantt chart status (e: edit plan, r: read-only)
75
+
76
+ // Column configuration (left table column display configuration, not Gantt data format)
77
+ columns: [
78
+ {name: 'seq', field: "seq", type:"level"},
79
+ {name: 'checkbox', field: "checkbox"},
80
+ {name: 'iconColsVal', field: "iconColsVal", width: 30},
81
+
82
+ // For the following fields, name can be customized and must match corresponding item names in data. field values are built-in fixed values, cannot be reset, and do not support type setting.
83
+ {name: 'name', field: "name", title: "Task Name", width: 150},
84
+ {name: 'resId', field: "resId", title: "Responsible Person", width: 50, options: resourceList},
85
+ {name: 'dur', field: "dur", title: "Duration", width: 60},
86
+ {name: 'planStart', field: "planStart", title: "Plan Start", width: 120, editable: false},
87
+ {name: 'planEnd', field: "planEnd", title: "Plan End", width: 120, colCallBack:custCallbackFunc1},
88
+ {name: 'planDur', field: "planDur", title: "Plan Days", width: 60},
89
+ {name: 'rsltStart', field: "rsltStart", title: "Actual Start", width: 120},
90
+ {name: 'rsltEnd', field: "rsltEnd", title: "Actual End", width: 120},
91
+ {name: 'rsltDur', field: "rsltDur", title: "Actual Days", width: 60},
92
+ {name: 'pctComp', field: "pctComp", title: "Completion", width: 60},
93
+ // {name: 'caption', field: "caption", title: "Label Text"},
94
+
95
+ // Custom columns (field: "custCol"): supports type setting: DropDownList/TextBox
96
+ // Attribute altText: custom column replacement display text
97
+ {name:"yourColName1", field: "custCol", title:"Column 1", type: "TextBox", default: 10, width:50,align:"left"},
98
+ {name:"yourColName2", field: "custCol", title:"Column 2", type: "DropDownList", options:dropDownListData, width:100, align:"left"},
99
+ {name:"yourColName3", field: "custCol", title:"Column 3","width":150,"align":"left", colCallBack:custCallbackFunc2, altText: "View Image"}
100
+ ],
101
+
102
+ // Gantt chart area display control
103
+ showTrack: 1, // 0: Plan Gantt; 1: Actual Gantt. Default: Plan Gantt
104
+ showDuplicate: 0, // Whether to show resource overlap indicator
105
+ showMileStone: 1, // Whether to show milestone: 0: not show
106
+ showDependencies: 1, // Whether to show connection lines (0/1), default: 0 (not show)
107
+ showDayDate: "date", // When day format is set, display weekday or date (day: weekday; date: date). Default: day shows weekday
108
+ showWeekIndex: "", // When day format is set, right header shows week number or first date of week. Y: show week number; others: show date. Default: show date
109
+
110
+ // Data definition class===============================================================================
111
+ weekWorkSetting: // Weekly workday settings (D1: Monday...D0: Sunday. 1: workday, 0: rest day)
112
+ {D1:1, D2:1, D3:1, D4:1, D5:1, D6:0, D0:0},
113
+ holidayList: [ // Set holiday list. When weekends are normally displayed, add dates in the list as holidays, displayed in gray
114
+ '2023-02-09',
115
+ '2023-02-21',
116
+ '2023-03-20'],
117
+ workdayList: ['2023-03-18'], // Set workday list
118
+ mileStoneLines: [ // Milestone configuration
119
+ {date:'2023-11-05',name:'startMS', title:'Project Design Discussion', color:'#FF00BF', thickness: "2px"},
120
+ {date:'2023-11-25',name:'pjMeeting', title:'Code Review', color:'#088A29', thickness: "2px"},
121
+ {date:'today',name:'today', title:'Today', color:'#FF0000', thickness: "2px"}
122
+ ],
123
+
124
+ // Plugin configuration class===============================================================================
125
+ captionType: 'Caption', // Set Gantt chart title (None, Name, Caption, Resource, Duration, Complete, Reserver, Title, Theme). None: do not show title
126
+ captionPosition: 'Right', // Set Gantt chart title position (Over: above Gantt bar; Right: right side of Gantt bar, default: Over)
127
+
128
+ // Display date format and input date format should be unified
129
+ dateFormat: 'yyyy-mm-dd', // Set parameter date format ('mm/dd/yyyy', 'dd/mm/yyyy', 'yyyy-mm-dd','yyyy/mm/dd')
130
+ weekStartDay: 0, // Set first day of week (1: Monday; 0: Sunday), default: 0
131
+
132
+ workingHourRange: ['1','23'], // Set daily working hours in hour format (in hours). Default: 1,23
133
+ hourFormat: 0, // Set hour format (0: hour without :00; 1: hour with :00). Default: 0 shows weekday
134
+
135
+ dragChgDur: "1", // Set drag to change workdays. If showChgDur is set to not show, this option is invalid
136
+ autoCalDur: 1, // Set automatic calculation of workdays (default: not auto-calculate)
137
+
138
+ includeHoliday: "N", // Whether workday calculation includes holidays and weekends: Y: include; N: exclude
139
+ includeToTime: "Y", // Whether Gantt completion time includes the last time point (set to include when start and end times are date type, set to exclude for hours), default: Y
140
+
141
+ durPrecision: 2, // Set duration and workday precision (default: one decimal place)
142
+ fixColsCnt: 3, // Set number of locked columns, default: 0 (no locked columns)
143
+ fixParent: 1, // Fix parent task range (1: does not change with child task drag; 0: changes with child task drag)
144
+ idType: "Snow", // Task ID calculation method (default: 12-digit arbitrary characters; UUID: uuid; Snow: snowflake ID)
145
+
146
+ // Style control class===============================================================================
147
+ // Background color settings
148
+ // planBackground: vPlanBackground, // Set Gantt plan bar background
149
+ // resultBackground: vResultBackground, // Set Gantt actual bar background
150
+ compBackground: '#0000FF', // Set completion background
151
+ // groupBackground: '#00FF00', // Set parent task row background
152
+ holidayBGColor: '#E6E6E6', // Set rest day/holiday background
153
+ currentTimeBackColor: ['h','#FF9797'], // Set current time background (param1: h: show current time via header style; c: show current time via cell style. param2: color value)
154
+ intervalColor: ['#FFFFFF','#F4F4F4'], // Set alternating row background color, default: #FFFFFF,#F4F4F4
155
+ selectedRowColor: '#CAE1FF', // Set selected row background color, default: #CAE1FF
156
+ selectedCellColor: '#2E9AFE', // Set selected cell border color, default: 2E9AFE
157
+ borderColor: '#9E9E9E', // Set Gantt border color, default: #9E9E9E
158
+
159
+ // Gantt bars
160
+ barBorderRadius: 6, // Set Gantt bar border radius, default: 3px
161
+ barBorderWeight: 1, // Set Gantt bar border weight, default: 1px
162
+ barBorderColor: '#9E0000', // Set Gantt bar border color, default: #9E9E9E
163
+ barOpacity: 1, // Set Gantt bar opacity, default: 0.7
164
+ barGridBorderWeight: 1, // Set Gantt bar background border weight, default: 1px
165
+ resultBarStyle: 'mark', // Actual bar style (normal: do not mark dates outside plan, mark: mark dates outside plan; cust: custom segments)
166
+ markResultBarColor: // Actual bar background color when resultBarStyle is mark type
167
+ {beforePlanBGColor: '#00FF00',
168
+ exceedPlanDBColor: '#cc0000'},
169
+ barHeightAdj: 0, // Progress bar height adjustment (default 0px, no adjustment; larger value = higher bar. Can be negative)
170
+ barDistanceAdj: 0, // Distance adjustment between plan and actual progress bars (default 0px, no adjustment; larger value = closer. Can be negative)
171
+
172
+ // Drag handle
173
+ dragHandlerBackColor: '#D8D8D8', // Drag handle background color
174
+
175
+ // lineExpandLen: 0, // Dependency line extension parameter
176
+ dependLineColor: '#228B22', // Connection line color
177
+ dependLineMouseOverColor: '#FE9A2E', // Connection line mouse hover color
178
+ criticalPathBGColor: '#FE9A2E', // Critical path marker color
179
+
180
+ // Width and height settings
181
+ leftSideWidth: 300, // Set left panel width, default: 300px
182
+ contentHeight: 360, // Set Gantt chart height (excluding header), default: 300px. If adjustGanttHeight function is called on page for auto-height, this parameter can be omitted
183
+ rowHeight: 35, // Set row height, default: 35px
184
+
185
+ // Right grid width settings (for different time scales)
186
+ hourColWidth: 20, // Hour scale
187
+ dayColWidth: 20, // Day scale
188
+ monthColWidth: 70, // Month scale
189
+ quarterColWidth: 100 // Quarter scale
190
+ };
191
+
192
+ // Gantt chart parameter configuration
193
+ myGantt.config(ganttConfig);
194
+ ```
195
+
196
+ 5. Get data from backend, or define data
197
+
198
+ ```javascript
199
+ /*
200
+ Gantt chart data object item description:
201
+ I: Built-in fixed data items, cannot customize other names
202
+ 1. id // (Required) String Node ID (any string or number, must be unique)
203
+ 2. plan // (Optional) Array Plan data
204
+ 3. isExpand // (Optional) Number(0 or 1) Whether to expand display 1: expand/0: collapse
205
+ 4. isGroup // (Optional) Number(0 or 1) Whether to set as parent (group) 1: group/0: leaf node
206
+ 5. preNodes // (Optional) String|Array Predecessor nodes, use comma to separate multiple predecessor nodes
207
+ 6. parentId // (Optional) String Parent node ID (when current row is top-level node, this value must be set to empty "")
208
+ 7. isMS // (Optional) Number(0 or 1) Whether milestone
209
+ 8. caption // (Optional) String Title
210
+ 9. planBarColor // (Optional) String Gantt plan background (color value)
211
+
212
+ II: The following data items can use custom names and must match the name in column definitions
213
+ 10. name // (Required) String Name (can be task name, resource name, etc.)
214
+ 11. iconColsVal // (Optional) Array Icon column (can be multiple icons separated by comma)
215
+ 12. rsltStart // (Optional) String Date Actual start
216
+ 13. rsltEnd // (Optional) String Date Actual end
217
+ 14. rsltDur // (Optional) Number Actual workdays
218
+ 15. resId // (Optional) String Resource/Responsible person
219
+ 16. pctComp // (Optional) Number Completion (0 ~ 100 percentage)
220
+ 17. seq // (Optional) Decimal Sort number
221
+ 18. yourColName // (Optional) String Custom column value, key needs to match custom column name
222
+ */
223
+
224
+ // Gantt chart data
225
+ let ganttData= [
226
+ {
227
+ "id": 1,
228
+ "seq": 1000,
229
+ "iconColsVal": [],
230
+ "name": "Unit A Construction Period",
231
+ "plan": [{}],
232
+ "rsltStart": "",
233
+ "rsltEnd": "",
234
+ "rsltDur": 1,
235
+ "planBarColor": "",
236
+ "isMS": 0,
237
+ "resId": "1",
238
+ "pctComp": 0,
239
+ "isGroup": 1,
240
+ "parentId": "",
241
+ "isExpand": 1,
242
+ "preNodes": "",
243
+ "caption": "Key Focus",
244
+ "yourColName1": "10",
245
+ "yourColName2": "02",
246
+ "yourColName3": "<img src='./images/stop.png'>",
247
+ }, {
248
+ "id": 11,
249
+ "seq": 2000,
250
+ "iconColsVal": [{
251
+ "src": "./images/stop.png",
252
+ "title": "Stop"
253
+ }
254
+ ],
255
+ "name": "Task Name 1",
256
+ "plan": [{
257
+ "start": "",
258
+ "end": "",
259
+ "dur": "2"
260
+ }
261
+ ],
262
+ "rsltStart": "2023-07-02",
263
+ "rsltEnd": "2023-07-06",
264
+ "rsltDur": 1,
265
+ "planBarColor": "#2EFE9A",
266
+ "isMS": 0,
267
+ "resId": "2",
268
+ "pctComp": 50,
269
+ "isGroup": 0,
270
+ "parentId": 1,
271
+ "isExpand": 1,
272
+ "preNodes": "",
273
+ "caption": "",
274
+ "yourColName1": "1",
275
+ "yourColName2": "02",
276
+ "yourColName3": "",
277
+ "custRsltBars": [
278
+ {
279
+ name: "p1",
280
+ title: "Segment 1",
281
+ start: "2023-07-02",
282
+ end: "2023-07-04",
283
+ style: "background:#2E9AFE;color:#FFFFFF;text-align:left;"
284
+ }, {
285
+ name: "p2",
286
+ title: "Segment 2",
287
+ start: "2023-07-06",
288
+ end: "2023-07-17",
289
+ html: "<span style='height:7px;border-radius:5px 5px;position:absolute;left:5px;top:-1px;background:red;font-size:9px;color:#FFFFFF'>Beautiful</span>",
290
+ style: "background:#FF0000;color:#FFFFFF;text-align:left;"
291
+ },
292
+ ],
293
+ }, {
294
+ "id": 12,
295
+ "seq": 3000,
296
+ "iconColsVal": [],
297
+ "name": "Task Name 2",
298
+ "plan": [{
299
+ "start": "2023-07-06",
300
+ "end": "2023-07-10"
301
+ }
302
+ ],
303
+ "rsltStart": "2023-07-07",
304
+ "rsltEnd": "2023-07-10",
305
+ "rsltDur": 1,
306
+ "planBarColor": "#2EFE9A",
307
+ "isMS": 0,
308
+ "resId": "2",
309
+ "pctComp": 10,
310
+ "isGroup": 0,
311
+ "parentId": 1,
312
+ "isExpand": 1,
313
+ "preNodes": "",
314
+ "caption": "Note 1",
315
+ "yourColName1": "1",
316
+ "yourColName2": "03",
317
+ "yourColName3": "",
318
+ }, {
319
+ "id": 13,
320
+ "seq": 4000,
321
+ "iconColsVal": [{
322
+ "src": "./images/star.png",
323
+ "title": "Star"
324
+ }
325
+ ],
326
+ "name": "Task Name 3",
327
+ "plan": [{
328
+ "start": "2023-07-11",
329
+ "end": "2023-07-15"
330
+ }
331
+ ],
332
+ "rsltStart": "2023-07-11",
333
+ "rsltEnd": "2023-07-14",
334
+ "rsltDur": 1,
335
+ "planBarColor": "#2EFE9A",
336
+ "isMS": 0,
337
+ "resId": "2",
338
+ "pctComp": 20,
339
+ "isGroup": 0,
340
+ "parentId": 1,
341
+ "isExpand": 1,
342
+ "preNodes": 12,
343
+ "caption": "",
344
+ "yourColName1": "50",
345
+ "yourColName2": "01",
346
+ "yourColName3": "",
347
+ }, {
348
+ "id": 14,
349
+ "seq": 5000,
350
+ "iconColsVal": [],
351
+ "name": "Task Name 4",
352
+ "plan": [{
353
+ "start": "",
354
+ "end": "2023-07-17"
355
+ }
356
+ ],
357
+ "rsltStart": "2023-07-16",
358
+ "rsltEnd": "2023-07-17",
359
+ "rsltDur": 1,
360
+ "planBarColor": vPlanBackground,
361
+ "isMS": 0,
362
+ "resId": "2",
363
+ "pctComp": 0,
364
+ "isGroup": 0,
365
+ "parentId": 1,
366
+ "isExpand": 1,
367
+ "preNodes": "",
368
+ "caption": "",
369
+ "yourColName1": "20",
370
+ "yourColName2": "01",
371
+ "yourColName3": "",
372
+ },
373
+ {
374
+ "id": 2,
375
+ "seq": 6000,
376
+ "iconColsVal": [],
377
+ "name": "Unit B Construction Period",
378
+ "plan": [{}
379
+ ],
380
+ "rsltStart": "",
381
+ "rsltEnd": "",
382
+ "rsltDur": 1,
383
+ "planBarColor": "",
384
+ "isMS": 0,
385
+ "resId": "1",
386
+ "pctComp": 0,
387
+ "isGroup": 1,
388
+ "parentId": "",
389
+ "isExpand": 1,
390
+ "preNodes": "",
391
+ "caption": "",
392
+ "yourColName1": "4",
393
+ "yourColName2": "01",
394
+ "yourColName3": "<img src='./images/stop.png'>",
395
+ }, {
396
+ "id": 21,
397
+ "seq": 7000,
398
+ "iconColsVal": [{
399
+ "src": "./images/stop.png",
400
+ "title": "Stop"
401
+ }
402
+ ],
403
+ "name": "Task Name 1",
404
+ "plan": [{
405
+ "start": "2023-07-19",
406
+ "end": "2023-07-29"
407
+ }
408
+ ],
409
+ "rsltStart": "2023-07-26",
410
+ "rsltEnd": "2023-07-29",
411
+ "rsltDur": 1,
412
+ "planBarColor": vPlanBackground,
413
+ "isMS": 0,
414
+ "resId": "2",
415
+ "pctComp": 40,
416
+ "isGroup": 0,
417
+ "parentId": 2,
418
+ "isExpand": 1,
419
+ "preNodes": "",
420
+ "caption": "",
421
+ "yourColName1": "4",
422
+ "yourColName2": "02",
423
+ "yourColName3": "",
424
+ },
425
+ ......
426
+ ];
427
+ ```
428
+
429
+
430
+ 6. Create Gantt Chart Object
431
+
432
+ ```javascript
433
+ // Instantiate Gantt chart object (in Vue, this statement is needed to instantiate the Gantt chart object)
434
+ const myGantt = MZGantt.init();
435
+
436
+ // Start functional modules
437
+ // (1) When using npm package, if editing, export and mobile support are needed, start them here after importing corresponding packages
438
+ // (2) When using standard JS package, the following start commands can be omitted
439
+ // Start Gantt chart editing
440
+ MZGanttEditor.start(myGantt);
441
+ // Start export functionality
442
+ MZGanttExport.start(myGantt);
443
+
444
+ /*
445
+ Create and display Gantt chart
446
+ Parameter 1: (Required) Container div object id
447
+ Parameter 2: (Optional) Time scale type
448
+ Parameter 3: (Optional) Configuration options
449
+ Parameter 4: (Optional) Data
450
+ */
451
+ myGantt.createGantt("GanttChartDIV", "day", ganttConfig, data);
452
+
453
+ // Note: If ganttConfig and data are not set here, you can use configuration method and data binding method separately
454
+ // Gantt chart parameter configuration
455
+ myGantt.config(ganttConfig);
456
+
457
+ // Load data
458
+ myGantt.bindGanttData(data);
459
+
460
+ // Display Gantt chart
461
+ myGantt.drawGantt()
462
+ ```
463
+
464
+ 7. Event Listeners
465
+ MZGantt supports listening to rendering or click events, which can be used to implement special control effects.
466
+
467
+ ```javascript
468
+ // Cell rendering
469
+ myGantt.on("cellRender", function (row, cellObj) {
470
+ // *******************************************************
471
+ // Can control rendering of the following cell types (field) in the left table of Gantt chart:
472
+ // I. Built-in type columns:
473
+ // name Name
474
+ // iconColsVal Icon column
475
+ // resId Resource/Responsible person
476
+ // planStart Plan start
477
+ // planEnd Plan end
478
+ // planDur Plan days
479
+ // rsltStart Actual start
480
+ // rsltEnd Actual end
481
+ // rsltDur Actual workdays
482
+ // pctComp Completion
483
+
484
+ // II. Custom columns
485
+ // yourColName1 Custom column name (name)
486
+ // *******************************************************
487
+
488
+ // Get cell name (rendering object cell)
489
+ var field = cellObj.field;
490
+
491
+ // Define rendering style object
492
+ var cellStyle = {};
493
+
494
+ // Style setting: Task name
495
+ if (field == "name") {
496
+ if (row.plan[0].dur > 5) {
497
+ cellStyle["cellHTML"] = '<span style="color:red;" >' + row.name + '</span>';
498
+ // cell.style.color = "red";
499
+ }
500
+ if (row.plan[0].dur >= 2 && row.plan[0].dur <= 5) {
501
+ cellStyle["cellHTML"] = '<span style="color:green;" >' + row.name + '</span>';
502
+ }
503
+ if (row.plan[0].dur < 2) {
504
+ cellStyle["cellHTML"] = '<span style="color:black;" >' + row.name + '</span>';
505
+ }
506
+ }
507
+
508
+ // Style setting: Responsible person
509
+ if (field == "resId") {
510
+ if (row.name == "Task Name 1") {
511
+ cellStyle["ce11Style"] = 'color:green;font-weight:bold';
512
+ }
513
+ }
514
+
515
+ // // Style setting: Custom column (using custom column name)
516
+ // if (field == "yourColName2") {
517
+ // cellStyle["cellHTML"] = '<input id="tstBtn" type ="button" value="Hide Milestone" onclick="test1">';
518
+ // }
519
+
520
+ return cellStyle;
521
+ });
522
+
523
+ // Progress bar rendering
524
+ myGantt.on("barRender", function (row) {
525
+ // Define rendering style object
526
+ var barStyle = {};
527
+
528
+ if (row.name === "Task Name 2") {
529
+ barStyle["planBarStyle"] = 'background:red;';
530
+ // barStyle["planBarLeftHtml"] = '<img width="20px" height="20px" src="./images/work.svg" />';
531
+ // barStyle["planBarOverHtml"] = '';
532
+ barStyle["planBarRightHtml"] = '<div style="display:block;">Hard Work is Cool</div>';
533
+ }
534
+
535
+ // Return object
536
+ return barStyle;
537
+ });
538
+
539
+ // Click progress bar
540
+ myGantt.on("clickBar", function (row, eventXY, dom) {
541
+ console.log("click: Task: " + row.name + ", Click date: " + eventXY.date);
542
+ });
543
+
544
+ // Right-click progress bar
545
+ myGantt.on("rightClick", function (row, eventXY, dom) {
546
+ console.log("right click: Task: " + row.name + ", Click object id: " + dom.id);
547
+ console.log("Click date: " + eventXY.date);
548
+ });
549
+ ```
550
+
551
+ 8. Multiple Loading Methods
552
+ To improve loading efficiency, the plugin supports multiple loading methods.
553
+ ###### Method 1: Normal Loading (load and render all tasks at once)
554
+ ```javascript
555
+ // Create Gantt chart object and configure
556
+ myGantt.createGantt("GanttChartDIV", "day");
557
+ myGantt.config(ganttConfig);
558
+ // Bind data
559
+ myGantt.bindGanttData(data);
560
+
561
+ // ※ The above three steps can be simplified to:
562
+ myGantt.createGantt("GanttChartDIV", "day", ganttConfig, data);
563
+ ```
564
+
565
+ ###### Method 2: Data Listener Rendering Loading
566
+ ```javascript
567
+ // Configuration parameters
568
+ var ganttConfig = {
569
+ loadType: "listenLoad"
570
+ };
571
+
572
+ // Create Gantt chart object and configure
573
+ myGantt.createGantt("GanttChartDIV", "day");
574
+ myGantt.config(ganttConfig);
575
+
576
+ // Define Gantt chart listener
577
+ var dataListener = myGantt.listener;
578
+
579
+ // Set Gantt chart value, automatically drive plugin to update display
580
+ dataListener.rawGanttData = [
581
+ {
582
+ "id": 1,
583
+ "seq": 1000,
584
+ "iconColsVal": [],
585
+ "name": "Unit A Construction Period",
586
+ "rsltStart": "",
587
+ "rsltEnd": "",
588
+ "rsltDur": 1,
589
+ "planBarColor": "#C0EBE8",
590
+ "linkTo": "http://",
591
+ "isMS": 0,
592
+ "resId": "1",
593
+ "pctComp": 0,
594
+ "isGroup": 1,
595
+ "parentId": "",
596
+ "isExpand": 1,
597
+ "preNodes": "",
598
+ "caption": "Key Focus",
599
+ "plan": [{ "start": "2023-07-05", "end": "2023-07-06", "dur": 10 }]
600
+ }
601
+ ];
602
+
603
+ // No need to execute bindGanttData and drawGantt methods
604
+ ```
605
+
606
+ ###### Method 3: Paginated Rendering (load all data at once, render in pages)
607
+ ```javascript
608
+ // Configuration parameters
609
+ var ganttConfig = {
610
+ loadType: "loadAllToPage",
611
+ pageSize: 20 // Pagination page size
612
+ };
613
+
614
+ // Create Gantt chart object and configure
615
+ myGantt.createGantt("GanttChartDIV", "day");
616
+ myGantt.config(ganttConfig);
617
+
618
+ // Bind data (data displayed page by page)
619
+ myGantt.bindGanttData(data);
620
+ ```
621
+
622
+ ###### Method 4: Paginated Loading Rendering (load and render a certain number of rows each time, load and render page by page)
623
+ ```javascript
624
+ // Pagination loading handler
625
+ // Parameter pageNo is the page data requested by plugin, starting from 1
626
+ function loadPageData(pageNode) {
627
+ // Return Gantt chart data for specified page
628
+ ...
629
+ }
630
+
631
+ // Configuration parameters
632
+ var ganttConfig = {
633
+ loadType: "loadByPage",
634
+ pageSize: 20, // Pagination page size
635
+ loadDataFunc: loadPageData // Pagination loading handler
636
+ };
637
+
638
+ // Create Gantt chart object and configure
639
+ myGantt.createGantt("GanttChartDIV", "day");
640
+ myGantt.config(ganttConfig);
641
+
642
+ // Gantt chart rendering
643
+ myGantt.drawGantt();
644
+ ```
645
+
646
+ ## IV. Gantt Chart Data Row Data Model
647
+ The table below shows the MZGantt Gantt chart data row data model. Before binding data to the Gantt chart, data must be created in this format. Can bind in batch, refer to bindGanttDate method; can also bind single row, mostly used with external modals.
648
+
649
+ <div style="margin-left:30px">
650
+
651
+ |<div style="width:170px">Data Item</div>| <div style="width:260px">Type</div>| <div style="width:290px">Description</div> |
652
+ |----| ----| ----|
653
+ id| (Required) String|ID
654
+ name|(Required) String|Name
655
+ isGroup|(Optional) Number(0 or 1)|Whether group task (parent task), determines if a task can contain child tasks
656
+ iconColsVal| (Optional) Array|Image object (src, title) array
657
+ resId|(Optional) String|Resource ID
658
+ resName|(Optional) String|Resource name
659
+ plan|(Optional) Array|Plan object, contains start, end, dur attributes
660
+ rsltStart|(Optional) String Date|Actual start time
661
+ rsltEnd|(Optional) String Date|Actual end time
662
+ pctComp|(Optional) Number|Completion
663
+ rsltDur|(Optional) Number |Actual input
664
+ planBarColor|(Optional) String| Gantt bar color (plan)
665
+ preNodes| (Optional) String|Array|Predecessor nodes
666
+ parentId|(Optional) String |(Optional) String|Parent task ID
667
+ caption|(Optional) String |Title
668
+ isMS|(Optional) Number(0 or 1)|Whether milestone
669
+ Custom Column 1|(Optional) String|Custom column
670
+ Custom Column 2|(Optional) String|Custom column
671
+ custRsltBars|(Optional) Array|Segmented progress bar (name, title, start, end, html, style) array
672
+
673
+ ```javascript
674
+ // ****************** Modal example reference as follows ******************
675
+ // Step 1: Use modal, construct the following data when modal is confirmed
676
+ var task = {};
677
+
678
+ task.name = "Test Task 1"; // (Required) Task name
679
+ task.isGroup = 0; // (Optional) Whether parent task (group)
680
+ task.iconColsVal = [{"src": "./images/test.jpg","title": "",}]; // (Optional) Icon column value
681
+ task.resId = "01"; // (Optional) Responsible person ID
682
+ task.resName = "Andy Lau"; // (Optional) Responsible person name (optional)
683
+ task.plan = [{"start": "2023-12-20","end": "2023-12-25","dur": 5}]; // (Optional) Plan data
684
+ task.planBarColor = "#FF0000"; // (Optional) Progress bar color
685
+ task.rsltStart = "2023-12-20"; // (Optional) Actual start
686
+ task.rsltEnd = "2023-12-26"; // (Optional) Actual end
687
+ task.pctComp = 90; // (Optional) Completion percentage
688
+ task.rsltDur = 6; // (Optional) Completion amount
689
+ task.preNodes = [{"id":13,"type":"FS","gapDays":1}]; // (Optional) Predecessor tasks (can be multiple)
690
+ task.parentId = ""; // (Optional when saveType is add/append/insert; required when addChild) Parent task
691
+ task.caption = "Test Task 1"; // (Optional) Task title
692
+ task.isMS = 0; // (Optional) Whether milestone task
693
+
694
+ // Step 2: Update task row data
695
+ var ret = MZGantt.updRows(saveType, createTaskModel()); // saveType: add/append/insert/edit/addChild
696
+ if (ret.code == 0) {
697
+ // Close task input box
698
+
699
+ } else {
700
+ // Show error message
701
+ console.log(ret.msg);
702
+ return;
703
+ }
704
+ ```
705
+ </div>
706
+
707
+ ## V. Advanced Features
708
+
709
+ MZGantt supports more advanced features, such as internationalization and multi-language package settings, drag to create and edit task relationships, loading animation configuration, etc.
710
+
711
+ 1. Internationalization and Language Package Settings
712
+ ```javascript
713
+ // Set language package
714
+ // Note: Language type setting must be executed before Gantt chart display method (drawGantt)
715
+ myGantt.setGanttLang("en"); // cn: Chinese; en: English; jp: Japanese;
716
+
717
+ // Character renaming (the following characters can be renamed)
718
+ // count_tab: "No.",
719
+ // reserve_pic: "Reserver",
720
+ // theme: "Theme",
721
+ // loading:"Loading...",
722
+ // click_2_view:"View Image",
723
+ // column_task: "Task Name",
724
+ // column_complete_ratio: "Completion",
725
+ // column_rslt: "Actual Start-End Date",
726
+ // column_start_date: "Plan Start Time",
727
+ // column_end_date: "Plan End Time",
728
+ // column_rslt_start_date: "Actual Start Time",
729
+ // column_rslt_end_date: "Actual End Time",
730
+ // week: "Week",
731
+ // quarter: "Quarter",
732
+ // menu_goto:"Go to Task",
733
+ // menu_goto_today:"Go to Today",
734
+ // select_child:"Select All Child Tasks",
735
+ // menu_FF: "Finish-Finish(FF)",
736
+ // menu_FS: "Finish-Start(FS)",
737
+ // menu_SF: "Start-Finish(SF)",
738
+ // menu_SS: "Start-Start(SS)"
739
+ var labelDefs = {
740
+ "menu_SF":"Start-Finish"}
741
+ ;
742
+
743
+ // Internationalization settings
744
+ myGantt.setMyLabels(labelDefs, "en");
745
+ ```
746
+ 2. Progress Bar Tooltip Customization
747
+ When mouse hovers over progress bar, a tooltip automatically displays task information. You can also customize the tooltip according to requirements.
748
+ ```javascript
749
+ // Set parameters infoBoxItems and infoBoxStyle in Gantt chart configuration
750
+ var ganttConfig = {
751
+ ...
752
+ infoBoxItems: [ // Tooltip item definition
753
+ {
754
+ title: '',value: "name",
755
+ titleStyle: "font-weight: bold;",
756
+ valStyle: "font-weight: bold;"},
757
+ {
758
+ title: 'Formula', expression: "((yourColName1 * yourColName3) + pctComp) + ' days'",
759
+ titleStyle: "font-weight: bold;",
760
+ valStyle: "color: red;"},
761
+ {
762
+ title: 'Formatted String', value: "This is formatted: {planStart}",
763
+ titleStyle: "font-weight: bold;",
764
+ valStyle: "color: red;"},
765
+ {
766
+ title: 'Plan Start', value: "planStart",
767
+ titleStyle: ""},
768
+ {
769
+ title: 'Plan End', value: "planEnd",
770
+ titleStyle: "", },
771
+ {
772
+ title: 'Actual Start', value: "rsltStart",
773
+ titleStyle: ""},
774
+ {
775
+ title: 'Actual End', value: "rsltEnd",
776
+ titleStyle: "", },
777
+ {
778
+ title: 'Title', value: "title",
779
+ titleStyle: "", }
780
+ ],
781
+ infoBoxStyle: // Tooltip style definition
782
+ "BORDER: #cdcdcd 1px solid;background:#FFFFFF;box-shadow: 3px 3px 2px #CDCDCD;border-radius:5px;padding:5px;",
783
+
784
+ ...
785
+ }
786
+ ```
787
+ Tooltip item settings can use any of the following methods:
788
+ 1. Use value
789
+ 2. Use expression
790
+ * Date/string type values: must be quoted, e.g.:
791
+ > expression: "This is actual start date: 'rsltStart'"
792
+ * Numeric type values: write directly in expression, e.g.:
793
+ > expression: "((yourColName1 * yourColName3) + pctComp) + ' days'"
794
+ 3. Use string replacement ({...})
795
+
796
+ 3. Task Relationships
797
+ * <b>Create Task Relationship:</b>
798
+ In edit mode, press mouse on task A progress bar and drag down to task B, release mouse, task relationship modal will pop up, select relationship type, click OK to establish relationship between task A and B.
799
+ * <b>Edit Task Relationship:</b>
800
+ In edit mode, click relationship line, task relationship modal will pop up, modify or delete task relationship.
801
+
802
+ * <b>Gap Time Modification Methods:</b>
803
+ Method 1: Modify and save in relationship modal;
804
+ Method 2: Drag successor task, automatically modify.
805
+
806
+ 4. Loading Animation Settings
807
+ MZGantt supports displaying loading animation. There are two types: plugin initialization loading animation and manual on/off animation, please refer to the following example.
808
+ ```javascript
809
+ // 1. Plugin initialization animation**************************************************
810
+ // 1.1 Standard JS version
811
+ <!-- Import Gantt chart plugin -->
812
+ <link rel="stylesheet" type="text/css" href="../../gantt/mzgantt.css" />
813
+ <script language="javascript">
814
+ // Parameters: show: whether to show plugin initialization animation, default: not show; containerId: display to Gantt chart container dom object id, default: entire window
815
+ window.showInitLoading = {show:true, containerId: "GanttChartDIV"};
816
+ </script>
817
+ <script language="javascript" src="../../gantt/mzgantt.js"></script>
818
+ ...
819
+
820
+ // 1.2 npm version
821
+ // Initialize Gantt chart plugin (parameter explanation same as above)
822
+ var showInitLoadingMsg = {show:true, containerId: "GanttChartDIV"};
823
+ const myGantt = MZGantt.init(showInitLoadingMsg);
824
+ ...
825
+
826
+ // 2. Manual on/off animation****************************************************
827
+ // When manually turning on loading animation, standard JS version and npm version use the same method.
828
+ // Parameter 1: Display switch (true: show; false: close)
829
+ // Parameter 2: Display position dom object ID (default: entire window)
830
+ myGantt.showLoading(true,"GanttChartDIV");
831
+ ```
832
+
833
+ ## VI. Plugin Methods and Events
834
+
835
+ MZGantt provides rich interfaces to operate or control Gantt chart data and features.
836
+ 1. Gantt Chart Display
837
+ |<div style="width:150px">Method</div>|<div style="width:166px">Description</div>|<div style="width:200px">Parameters</div>|
838
+ |----| ----|----|
839
+ |init|Initialize Gantt chart instance|None (when using plugin in Vue, need to execute this method to instantiate plugin)|
840
+ |createGantt| Create Gantt chart object| Parameter 1: (Required) DIV container ID<br>Parameter 2: (Optional) Time scale day/week/month/quarter (default: day)<br>Parameter 3: Configuration options<br>Parameter 4: (Optional) Data|
841
+ |config|Configure Gantt chart|JSON object value, refer to: Gantt chart parameter configuration|
842
+ |bindGanttData| Bind Gantt chart data|Gantt chart JSON data: must conform to MZGantt data model|
843
+ |drawGantt|Display Gantt chart|None|
844
+
845
+ 2. Display Control
846
+ |<div style="width:150px">Method</div>|<div style="width:248px">Description</div>|<div style="width:200px">Parameters</div>|
847
+ |----| ----|----|
848
+ |changeFormat|Change display scale|Display scale: day/week/month/quarter|
849
+ |switchTrack| Switch to show actual|Switch value: true/false|
850
+ |showMileStone|Toggle milestone time marker lines|Switch value: true/false|
851
+ |setMSLine|Dynamically add/modify milestone time marker lines|Milestone definition object (refer to object definition in mileStoneLines)|
852
+ |rmMSLine|Dynamically delete milestone time marker lines|Milestone marker line name (name)|
853
+ |showCriticalPath|Toggle critical path display|Switch value: "1"/"0"|
854
+ |setRowReadonly|Set row read-only condition|Condition judgment function.<br>Example, when setting newly added rows as read-only, code is as follows:<br>`myGantt.setRowReadonly(function(row) {`<br>&nbsp;&nbsp;&nbsp;&nbsp;`return row.operation != "new" && row.operation != "newmodified";`<br>`});`|
855
+ |adjustGanttHeight|Dynamically adjust Gantt chart area height, can achieve Gantt chart height auto-adaptation|Gantt chart area height (pixel value)|
856
+ |setColsVisiable|Dynamically set column visibility|Refer to example for parameters, set colname1 and colname2 invisible:<br>`myGantt.setColsVisiable({colname1: false, colname2: false})`|
857
+ |fitGanttWidth|Dynamically adjust Gantt chart right side time width, make width just fill right progress bar area|None|
858
+ |fitMobile|Make Gantt chart adapt to mobile display (auto landscape)|None|
859
+ |hideGanttBar|Hide/show right Gantt bar area|Switch value: true/false|
860
+
861
+ 3. Get Data
862
+ |<div style="width:150px">Method</div>|<div style="width:360px">Description</div>|<div style="width:240px">Parameters</div>|
863
+ |----| ----|----|
864
+ |getAllRows | Get all row data|None|
865
+ |getUpdatedRows |Get rows with changed values|None|
866
+ |getSelectedRows |Get currently selected rows|None|
867
+ |getAllParentRows | Get all group tasks|None|
868
+ |getChildRows|Get all child task data for specified row|Task ID|
869
+ |getSelectedRowID |Get selected row task ID|None|
870
+ |getSelectedBarID|Get selected progress bar ID (used in resource management)|None|
871
+ |getSelectedRowSeq|Get current selected row index|None|
872
+ |getSelectedRowParent|Get selected row parent task ID|None|
873
+ |getMileStoneLines|Get milestone timeline data|None|
874
+
875
+ 4. Property Settings
876
+ |<div style="width:100px">Method</div>|<div style="width:354px">Description</div>|<div style="width:215px">Parameters</div>|
877
+ |----| ----|----|
878
+ |setBulkMoveType|Synchronous move mode setting|D (Related tasks)<br>P (By responsible person)<br>N (All subsequent tasks)|
879
+ |setGanttStatus|Set Gantt chart edit status|Parameter: status character (r: read-only; e: edit)<br>String type|
880
+ |setColEditable|Dynamically set column editable/read-only|Parameter: key-value object (column name: true/false).<br>Example: {'planStart':false,'planEnd':false}<br>true: editable; false: read-only|
881
+ |setStartEndDate|Set project start and end dates|Parameter 1: Start date. String type<br>Parameter 2: End date. String type<br>Parameter 3: Whether to lock date range (true/false). String type|
882
+ |setToDate|Set Gantt chart display date|Parameter 1: Display target date. String type.<br>Parameter 2: Whether to auto-fit width (true/false)<br>Example: myGantt.setToDate('2025-04-16', true);<br>|
883
+
884
+ 5. Data Editing
885
+ |<div style="width:130px">Method</div>|<div style="width:124px">Description</div>|<div style="width:240px">Parameters</div>
886
+ |----| ----|----|
887
+ |addRow|Add row|Parameter: Add position <br>&nbsp;&nbsp;&nbsp;&nbsp;add: after current row;<br>&nbsp;&nbsp;&nbsp;&nbsp;insert: before current row;<br>&nbsp;&nbsp;&nbsp;&nbsp;append: at end;<br>&nbsp;&nbsp;&nbsp;&nbsp;addChild: add child task|
888
+ |deleteRows|Delete selected rows|None|
889
+ |cloneRows |Clone selected rows|None|
890
+ |updRows|Update row data|Parameter 1: Add position <br>&nbsp;&nbsp;&nbsp;&nbsp;add: after current row;<br>&nbsp;&nbsp;&nbsp;&nbsp;insert: before current row;<br>&nbsp;&nbsp;&nbsp;&nbsp;append: at end;<br>&nbsp;&nbsp;&nbsp;&nbsp;addChild: add child task;<br>&nbsp;&nbsp;&nbsp;&nbsp;edit: modify<br> Parameter 2: Task model data<br> <br>Note:<br>When using inline editing, this method is not needed.<br>This interface is suitable when using external task edit modal, to submit data obtained from external edit modal (Parameter 2).|
891
+ |resetGantt |Reset all task row edit status|None|
892
+ 6. Filter
893
+ |<div style="width:170px">Method</div>| <div style="width:592px">Description</div>
894
+ |----| ----|
895
+ addFilter|Set conditions to filter data. Example:<br>` MZGantt.filterRows((task) =>{return task.duration > 3;},"onlyShow")`
896
+ removefilter|Remove filter, restore data display. Example:<br>`MZGantt.removefilter()`
897
+
898
+ 7. Export Image
899
+ |<div style="width:170px">Method</div>| <div style="width:190px">Description</div>| <div style="width:375px">Parameters</div>
900
+ |----| ----|----|
901
+ exportGanttImg |Save as image|Parameter 1: title height(titleHeight) <br > Parameter 2: title string(titleStr)
902
+
903
+ 8. Event Listeners
904
+ |<div style="width:230px">Event Name</div>| <div style="width:560px">Description</div>|
905
+ |----| ----|
906
+ |cellRender|Cell rendering event.<br>Supports listening to this event, setting custom callback handler. Render cells.<br>Example: ` MZGantt.on("cellRender", function(row, cellObj) {...})`|
907
+ |cellBlur|Cell blur event. Triggered when inline editing cell loses focus. Example:<br>` MZGantt.on("cellBlur", function(row, cellName, oldVal, newVal) {...})`|
908
+ |rowRender|Table row rendering event.<br>Supports listening to this event, setting custom callback handler. Render row styles.<br>Example: ` MZGantt.on("rowRender", function(row, rowStyleObj) {...})`|
909
+ |barRender|Progress bar rendering event.<br>Can dynamically listen to user data, render progress bar styles in real-time.<br>Example: ` MZGantt.on("barRender", function(row, barObj) {...})`|
910
+ |clickBar |Progress bar click event.<br>Example: ` MZGantt.on("clickBar", function(row, eventXY, dom) {...})`|
911
+ |dblClickBar |Progress bar double-click event.<br>Example: ` MZGantt.on("dblClickBar", function(row, barData, dom) {...})`|
912
+ |clickRow |Row click event.<br>Example: ` MZGantt.on("clickRow", function(row, eventXY) {...})`|
913
+ |rightClick/rightClickBar|Progress bar right-click event.<br>Example: ` MZGantt.on("rightClickBar", function(row, eventXY, dom) {...})`|
914
+ |loaded|Loading complete event.<br>Automatically executed after Gantt chart loading completes, can set user's own processing logic as needed.<br>Example: `MZGantt.on("loaded", function(e, data) {...})`|
915
+ |barDragEnd|Progress bar drag end event. Triggered when dragging progress bar is released. Example:<br>` MZGantt.on("barDragEnd", function(row, updRows) {...})`|
916
+ |rowDragEnd|Row drag end event. Triggered when dragging row is released. Example:<br>` MZGantt.on("rowDragEnd", function(row, updRows) {...})`|
917
+
918
+
919
+ ## VII. Common Error Codes
920
+ <div style="margin-left:30px">
921
+
922
+ |<div style="width:230px">Error Code</div>| <div style="width:560px">Description</div>|
923
+ |----|----|
924
+ |0x00010|Before executing createGantt command, Gantt chart container div must be loaded, otherwise this error is shown.|
925
+ |0x00020|Error configuring Gantt chart.|
926
+ |0x00030|Error rendering Gantt chart (drawGantt command).|
927
+ |0x00040|Error rendering milestone marker lines.|
928
+ |0x00050|Exception occurred when binding data. Please refer to <IV. Gantt Chart Data Row Data Model> to create Gantt chart row data.|
929
+ |0x00060|Exception occurred when batch loading task data.|
930
+ |0x00080|Error occurred when clicking cell.|
931
+ |0x00090|Error occurred when clicking progress bar.|
932
+ |0x00100|Plugin initialization exception.|
933
+ </div>
934
+
935
+ ## VIII. Download
936
+ 1. Standard JS Version
937
+ Download Or use following CDN:
938
+ ```
939
+ <link rel="stylesheet" type="text/css" href="https://gcore.jsdelivr.net/npm/mzgantt@1.0.8/cdn/mzgantt.css" />
940
+ <script language="javascript" src="https://gcore.jsdelivr.net/npm/mzgantt@1.0.8/cdn/mzgantt.js"></script>
941
+ <script language="javascript" src="https://gcore.jsdelivr.net/npm/mzgantt@1.0.8/cdn/edit.js"></script>
942
+ <script language="javascript" src="https://gcore.jsdelivr.net/npm/mzgantt@1.0.8/cdn/export.js"></script>
943
+ <script language="javascript" src="https://gcore.jsdelivr.net/npm/mzgantt@1.0.8/cdn/mobile.js"></script>
944
+ ```
945
+
946
+ 2. npm Version (supports Vue, etc.): Install directly using npm command.
947
+ > npm install mzgantt
948
+
949
+ ## IX. Versions
950
+
951
+ MZGantt provides 3 versions to meet different user needs.
952
+
953
+ 1. Free Trial Version
954
+ No authorization required, free to use after download (with some feature limitations), does not affect your development.
955
+
956
+ 2. Personal Version
957
+ Need to obtain personal version license key after download, no feature limitations, can freely use all plugin features.
958
+
959
+ 3. Commercial Version
960
+ Need to obtain commercial version license key after download, no feature limitations and no commercial use restrictions, can freely use all plugin features.
961
+
962
+ ## X. Contact
963
+
964
+ Mobile: +31(0)623010866
965
+ Email:
966
+ - Service 1: info@ndes-global.com
967
+ - Service 2: info@tecjt.com
968
+ - Service 3: hubosoft@foxmail.com