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 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 | `440` | Task sidebar container width |
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)`