apexgantt 3.0.0 → 3.1.1
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.md +60 -1
- package/apexgantt.es.min.js +17293 -60333
- package/apexgantt.min.js +2 -1410
- package/demo/data-parsing.html +85 -0
- package/index.d.ts +3 -1
- package/lib/gantt.d.ts +19 -2
- package/lib/models/Annotation.d.ts +5 -5
- package/lib/models/ArrowLink.d.ts +28 -0
- package/lib/models/DataManager.d.ts +5 -5
- package/lib/models/DataParser.d.ts +57 -0
- package/lib/models/Options.d.ts +5 -3
- package/lib/models/SplitView.d.ts +29 -0
- package/lib/models/StateManager.d.ts +20 -0
- package/lib/models/Tasks.d.ts +19 -12
- package/lib/models/TimeLine.d.ts +1 -0
- package/lib/styles/Gantt.style.d.ts +1 -1
- package/lib/styles/Tasks.style.d.ts +1 -1
- package/lib/styles/Timeline.style.d.ts +1 -1
- package/lib/util/bar.util.d.ts +0 -3
- package/lib/util/ganttExport.d.ts +1 -1
- package/lib/util/task.util.d.ts +2 -3
- package/package.json +1 -2
- package/html2canvas-D1hTQM0b.js +0 -29
- package/html2canvas-DY15eh9-.js +0 -25
- package/index-BWP5PfTm.js +0 -37542
- package/index-BvOcbiui.js +0 -28716
- package/index.es-CkiCpPKL.js +0 -5742
- package/index.es-DQCDSqMd.js +0 -9442
- package/purify.es-IAoVk_s_.js +0 -538
- package/purify.es-V92tbb_N.js +0 -991
package/README.md
CHANGED
|
@@ -75,7 +75,7 @@ The layout can be configured by either setting the properties in the table below
|
|
|
75
75
|
| enableTaskResize | `true` | Enable/disable gantt export options |
|
|
76
76
|
| headerBackground | `#f3f3f3` | Background color for header |
|
|
77
77
|
| inputDateFormat | `MM-DD-YYYY` | Input date format |
|
|
78
|
-
| tasksContainerWidth | `
|
|
78
|
+
| tasksContainerWidth | `425` | Task sidebar container width |
|
|
79
79
|
| tooltipId | `apexgantt-tooltip-container` | The tooltip HTML element id |
|
|
80
80
|
| tooltipTemplate | `tooltipTemplate` | The HTML template for tooltip |
|
|
81
81
|
| tooltipBorderColor | `#BCBCBC` | The border color of tooltip |
|
|
@@ -185,6 +185,65 @@ Each tasks should be in below format
|
|
|
185
185
|
];
|
|
186
186
|
```
|
|
187
187
|
|
|
188
|
+
## Data Parsing
|
|
189
|
+
|
|
190
|
+
Map your existing data structure to ApexGantt format without manual transformation.
|
|
191
|
+
|
|
192
|
+
```javascript
|
|
193
|
+
const apiData = [
|
|
194
|
+
{
|
|
195
|
+
task_id: 'T1',
|
|
196
|
+
task_name: 'Design Phase',
|
|
197
|
+
start_date: '01-01-2024',
|
|
198
|
+
end_date: '01-15-2024',
|
|
199
|
+
completion: 75,
|
|
200
|
+
},
|
|
201
|
+
];
|
|
202
|
+
|
|
203
|
+
const gantt = new ApexGantt(document.getElementById('gantt'), {
|
|
204
|
+
series: apiData,
|
|
205
|
+
parsing: {
|
|
206
|
+
id: 'task_id',
|
|
207
|
+
name: 'task_name',
|
|
208
|
+
startTime: 'start_date',
|
|
209
|
+
endTime: 'end_date',
|
|
210
|
+
progress: 'completion',
|
|
211
|
+
},
|
|
212
|
+
});
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Nested Objects & Transforms
|
|
216
|
+
|
|
217
|
+
Use dot notation for nested properties and inline transforms for data conversion:
|
|
218
|
+
|
|
219
|
+
```javascript
|
|
220
|
+
const nestedData = [
|
|
221
|
+
{
|
|
222
|
+
project: {
|
|
223
|
+
task: {id: 'T1', title: 'Design'},
|
|
224
|
+
dates: {start: '01-01-2024', end: '01-15-2024'},
|
|
225
|
+
status: {completion: 0.75},
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
];
|
|
229
|
+
|
|
230
|
+
const gantt = new ApexGantt(document.getElementById('gantt'), {
|
|
231
|
+
series: nestedData,
|
|
232
|
+
parsing: {
|
|
233
|
+
id: 'project.task.id',
|
|
234
|
+
name: 'project.task.title',
|
|
235
|
+
startTime: 'project.dates.start',
|
|
236
|
+
endTime: 'project.dates.end',
|
|
237
|
+
progress: {
|
|
238
|
+
key: 'project.status.completion',
|
|
239
|
+
transform: (value) => value * 100, // convert to percentage
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
});
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
**Supported fields:** `id`, `name`, `startTime`, `endTime`, `progress`, `type`, `parentId`, `dependency`, `barBackgroundColor`, `rowBackgroundColor`, `collapsed`
|
|
246
|
+
|
|
188
247
|
## 📘 Public API
|
|
189
248
|
|
|
190
249
|
### 1. `update(options)`
|