@syncfusion/ej2-gantt 22.2.12 → 23.1.36

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.
Files changed (124) hide show
  1. package/CHANGELOG.md +180 -164
  2. package/dist/ej2-gantt.min.js +2 -2
  3. package/dist/ej2-gantt.umd.min.js +2 -2
  4. package/dist/ej2-gantt.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-gantt.es2015.js +846 -242
  6. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  7. package/dist/es6/ej2-gantt.es5.js +884 -264
  8. package/dist/es6/ej2-gantt.es5.js.map +1 -1
  9. package/dist/global/ej2-gantt.min.js +2 -2
  10. package/dist/global/ej2-gantt.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +21 -21
  13. package/src/gantt/actions/cell-edit.js +4 -1
  14. package/src/gantt/actions/critical-path.d.ts +2 -0
  15. package/src/gantt/actions/critical-path.js +79 -59
  16. package/src/gantt/actions/dependency.d.ts +1 -0
  17. package/src/gantt/actions/dependency.js +43 -25
  18. package/src/gantt/actions/dialog-edit.js +27 -7
  19. package/src/gantt/actions/edit.js +15 -8
  20. package/src/gantt/actions/pdf-export.d.ts +4 -1
  21. package/src/gantt/actions/pdf-export.js +36 -3
  22. package/src/gantt/actions/rowdragdrop.js +10 -2
  23. package/src/gantt/actions/selection.js +22 -5
  24. package/src/gantt/actions/taskbar-edit.js +51 -36
  25. package/src/gantt/actions/toolbar.js +8 -0
  26. package/src/gantt/base/date-processor.js +1 -1
  27. package/src/gantt/base/gantt-chart.d.ts +1 -0
  28. package/src/gantt/base/gantt-chart.js +79 -6
  29. package/src/gantt/base/gantt-model.d.ts +7 -0
  30. package/src/gantt/base/gantt.d.ts +6 -0
  31. package/src/gantt/base/gantt.js +73 -11
  32. package/src/gantt/base/interface.d.ts +14 -0
  33. package/src/gantt/base/task-processor.d.ts +4 -4
  34. package/src/gantt/base/task-processor.js +75 -25
  35. package/src/gantt/base/tree-grid.js +19 -10
  36. package/src/gantt/export/export-helper.d.ts +5 -1
  37. package/src/gantt/export/export-helper.js +150 -3
  38. package/src/gantt/export/pdf-base/pdf-grid-table.js +2 -2
  39. package/src/gantt/export/pdf-base/pdf-style/gantt-theme.js +8 -0
  40. package/src/gantt/export/pdf-base/treegrid-layouter.js +3 -1
  41. package/src/gantt/export/pdf-connector-line.js +3 -1
  42. package/src/gantt/export/pdf-gantt.js +6 -0
  43. package/src/gantt/export/pdf-taskbar.d.ts +13 -0
  44. package/src/gantt/export/pdf-taskbar.js +39 -5
  45. package/src/gantt/export/pdf-timeline.js +17 -8
  46. package/src/gantt/export/pdf-treegrid.js +3 -3
  47. package/src/gantt/models/task-fields-model.d.ts +7 -0
  48. package/src/gantt/models/task-fields.d.ts +6 -0
  49. package/src/gantt/models/task-fields.js +3 -0
  50. package/src/gantt/renderer/chart-rows.d.ts +1 -1
  51. package/src/gantt/renderer/chart-rows.js +39 -20
  52. package/src/gantt/renderer/connector-line.js +49 -9
  53. package/src/gantt/renderer/edit-tooltip.js +2 -1
  54. package/src/gantt/renderer/timeline.js +16 -9
  55. package/src/gantt/renderer/tooltip.js +5 -5
  56. package/styles/bootstrap-dark.css +44 -100
  57. package/styles/bootstrap.css +44 -100
  58. package/styles/bootstrap4.css +44 -100
  59. package/styles/bootstrap5-dark.css +44 -100
  60. package/styles/bootstrap5.css +44 -100
  61. package/styles/fabric-dark.css +44 -100
  62. package/styles/fabric.css +44 -100
  63. package/styles/fluent-dark.css +44 -100
  64. package/styles/fluent.css +44 -100
  65. package/styles/gantt/_layout.scss +44 -31
  66. package/styles/gantt/_theme.scss +104 -98
  67. package/styles/gantt/bootstrap-dark.css +44 -100
  68. package/styles/gantt/bootstrap-dark.scss +1 -1
  69. package/styles/gantt/bootstrap.css +44 -100
  70. package/styles/gantt/bootstrap.scss +1 -1
  71. package/styles/gantt/bootstrap4.css +44 -100
  72. package/styles/gantt/bootstrap4.scss +1 -1
  73. package/styles/gantt/bootstrap5-dark.css +44 -100
  74. package/styles/gantt/bootstrap5-dark.scss +1 -1
  75. package/styles/gantt/bootstrap5.css +44 -100
  76. package/styles/gantt/bootstrap5.scss +1 -1
  77. package/styles/gantt/fabric-dark.css +44 -100
  78. package/styles/gantt/fabric-dark.scss +1 -1
  79. package/styles/gantt/fabric.css +44 -100
  80. package/styles/gantt/fabric.scss +1 -1
  81. package/styles/gantt/fluent-dark.css +44 -100
  82. package/styles/gantt/fluent-dark.scss +1 -1
  83. package/styles/gantt/fluent.css +44 -100
  84. package/styles/gantt/fluent.scss +1 -1
  85. package/styles/gantt/highcontrast-light.css +40 -100
  86. package/styles/gantt/highcontrast-light.scss +1 -1
  87. package/styles/gantt/highcontrast.css +44 -100
  88. package/styles/gantt/highcontrast.scss +1 -1
  89. package/styles/gantt/icons/_bootstrap-dark.scss +4 -0
  90. package/styles/gantt/icons/_bootstrap.scss +4 -0
  91. package/styles/gantt/icons/_bootstrap4.scss +4 -0
  92. package/styles/gantt/icons/_bootstrap5.scss +4 -0
  93. package/styles/gantt/icons/_fabric-dark.scss +4 -0
  94. package/styles/gantt/icons/_fabric.scss +4 -0
  95. package/styles/gantt/icons/_fluent.scss +4 -0
  96. package/styles/gantt/icons/_fusionnew.scss +4 -0
  97. package/styles/gantt/icons/_highcontrast.scss +4 -0
  98. package/styles/gantt/icons/_material-dark.scss +4 -0
  99. package/styles/gantt/icons/_material.scss +4 -0
  100. package/styles/gantt/icons/_material3.scss +4 -0
  101. package/styles/gantt/icons/_tailwind-dark.scss +4 -0
  102. package/styles/gantt/icons/_tailwind.scss +4 -0
  103. package/styles/gantt/material-dark.css +44 -101
  104. package/styles/gantt/material-dark.scss +1 -1
  105. package/styles/gantt/material.css +44 -101
  106. package/styles/gantt/material.scss +1 -1
  107. package/styles/gantt/material3-dark.css +45 -102
  108. package/styles/gantt/material3-dark.scss +1 -1
  109. package/styles/gantt/material3.css +45 -102
  110. package/styles/gantt/material3.scss +1 -1
  111. package/styles/gantt/tailwind-dark.css +44 -101
  112. package/styles/gantt/tailwind-dark.scss +1 -1
  113. package/styles/gantt/tailwind.css +44 -101
  114. package/styles/gantt/tailwind.scss +1 -1
  115. package/styles/highcontrast-light.css +40 -100
  116. package/styles/highcontrast.css +44 -100
  117. package/styles/material-dark.css +44 -101
  118. package/styles/material.css +44 -101
  119. package/styles/material3-dark.css +45 -102
  120. package/styles/material3-dark.scss +1 -1
  121. package/styles/material3.css +45 -102
  122. package/styles/material3.scss +1 -1
  123. package/styles/tailwind-dark.css +44 -101
  124. package/styles/tailwind.css +44 -101
@@ -13,8 +13,101 @@ import { pixelToPoint, isScheduledTask } from '../base/utils';
13
13
  */
14
14
  var ExportHelper = /** @class */ (function () {
15
15
  function ExportHelper(parent) {
16
+ this.totalColumnWidth = 0;
17
+ this.beforeSinglePageExport = {};
18
+ this.baselineHeight = 8;
16
19
  this.parent = parent;
17
20
  }
21
+ ExportHelper.prototype.processToFit = function () {
22
+ this.beforeSinglePageExport['zoomingProjectStartDate'] = this.parent.zoomingProjectStartDate;
23
+ this.beforeSinglePageExport['zoomingProjectEndDate'] = this.parent.zoomingProjectEndDate;
24
+ this.beforeSinglePageExport['cloneProjectStartDate'] = this.parent.cloneProjectStartDate;
25
+ this.beforeSinglePageExport['cloneProjectEndDate'] = this.parent.cloneProjectEndDate;
26
+ this.beforeSinglePageExport['customTimelineSettings'] = extend({}, this.parent.timelineModule.customTimelineSettings, null, true);
27
+ this.beforeSinglePageExport['isTimelineRoundOff'] = this.parent.isTimelineRoundOff;
28
+ this.beforeSinglePageExport['topTier'] = this.parent.timelineModule.topTier;
29
+ this.beforeSinglePageExport['topTierCellWidth'] = this.parent.timelineModule.topTierCellWidth;
30
+ this.beforeSinglePageExport['topTierCollection'] = this.parent.timelineModule.topTierCollection;
31
+ this.beforeSinglePageExport['bottomTier'] = this.parent.timelineModule.bottomTier;
32
+ this.beforeSinglePageExport['bottomTierCellWidth'] = this.parent.timelineModule.bottomTierCellWidth;
33
+ this.beforeSinglePageExport['bottomTierCollection'] = this.parent.timelineModule.bottomTierCollection;
34
+ this.beforeSinglePageExport['totalTimelineWidth'] = this.parent.timelineModule.totalTimelineWidth;
35
+ this.beforeSinglePageExport['timelineStartDate'] = this.parent.timelineModule.timelineStartDate;
36
+ this.beforeSinglePageExport['timelineEndDate'] = this.parent.timelineModule.timelineEndDate;
37
+ this.beforeSinglePageExport['timelineRoundOffEndDate'] = this.parent.timelineModule.timelineRoundOffEndDate;
38
+ this.beforeSinglePageExport['perDayWidth'] = this.parent.perDayWidth;
39
+ this.beforeSinglePageExport['updatedConnectorLineCollection'] = extend([], this.parent.updatedConnectorLineCollection, null, true);
40
+ this.parent.timelineModule.isZoomToFit = true;
41
+ this.parent.timelineModule.isZooming = false;
42
+ if (!this.parent.zoomingProjectStartDate) {
43
+ this.parent.zoomingProjectStartDate = this.parent.cloneProjectStartDate;
44
+ this.parent.zoomingProjectEndDate = this.parent.cloneProjectEndDate;
45
+ }
46
+ if (this.parent.zoomingProjectStartDate > this.parent.cloneProjectStartDate) {
47
+ this.parent.cloneProjectStartDate = new Date(this.parent.allowUnscheduledTasks ? this.parent.zoomingProjectStartDate : this.parent.cloneProjectStartDate);
48
+ }
49
+ this.parent.dataOperation.calculateProjectDates();
50
+ var timeDifference = (this.parent.cloneProjectEndDate.getTime() - this.parent.cloneProjectStartDate.getTime());
51
+ var totalDays = (timeDifference / (1000 * 3600 * 24));
52
+ var chartsideWidth;
53
+ var gridWidth;
54
+ if (this.exportProps.fitToWidthSettings.gridWidth) {
55
+ gridWidth = parseInt(this.exportProps.fitToWidthSettings.gridWidth.split('%')[0]);
56
+ }
57
+ if (this.exportProps.fitToWidthSettings.chartWidth) {
58
+ chartsideWidth = parseInt(this.exportProps.fitToWidthSettings.chartWidth.split('%')[0]);
59
+ }
60
+ else {
61
+ if (this.exportProps.fitToWidthSettings.gridWidth) {
62
+ chartsideWidth = 100 - gridWidth;
63
+ }
64
+ else {
65
+ chartsideWidth = 70;
66
+ }
67
+ }
68
+ var pdfwidth = (this.parent.pdfExportModule['pdfPageDimensions'].width * chartsideWidth) / 100;
69
+ var chartWidth = pdfwidth;
70
+ var perDayWidth = chartWidth / totalDays;
71
+ var zoomingLevel;
72
+ var firstValue;
73
+ var secondValue;
74
+ var zoomingCollections = this.parent.zoomingLevels.slice();
75
+ var sortedCollectons = zoomingCollections.sort(function (a, b) {
76
+ return (!a.perDayWidth && !b.perDayWidth ? 0 : (a.perDayWidth < b.perDayWidth) ? 1 : -1);
77
+ });
78
+ if (perDayWidth === 0) { // return when the Gantt chart is not in viewable state.
79
+ return;
80
+ }
81
+ for (var i = 0; i < sortedCollectons.length; i++) {
82
+ firstValue = sortedCollectons[i];
83
+ if (i === sortedCollectons.length - 1) {
84
+ zoomingLevel = sortedCollectons[i];
85
+ break;
86
+ }
87
+ else {
88
+ secondValue = sortedCollectons[i + 1];
89
+ }
90
+ if (perDayWidth >= firstValue.perDayWidth) {
91
+ zoomingLevel = sortedCollectons[i];
92
+ break;
93
+ }
94
+ if (perDayWidth < firstValue.perDayWidth && perDayWidth > secondValue.perDayWidth) {
95
+ zoomingLevel = sortedCollectons[i + 1];
96
+ break;
97
+ }
98
+ }
99
+ var newTimeline = extend({}, {}, zoomingLevel, true);
100
+ this.parent.timelineModule['roundOffDateToZoom'](this.parent.cloneProjectStartDate, true, perDayWidth, newTimeline.bottomTier.unit, zoomingLevel);
101
+ this.parent.timelineModule['roundOffDateToZoom'](this.parent.cloneProjectEndDate, false, perDayWidth, newTimeline.bottomTier.unit, zoomingLevel);
102
+ var numberOfCells = this.parent.timelineModule['calculateNumberOfTimelineCells'](newTimeline);
103
+ var scrollHeight = this.parent.pdfExportModule['pdfPageDimensions'].height; //17 is horizontal scrollbar width
104
+ var contentHeight = this.parent.pdfExportModule['pdfPageDimensions'].height;
105
+ var emptySpace = contentHeight <= scrollHeight ? 0 : 17;
106
+ newTimeline.timelineUnitSize = Math.abs((chartWidth - emptySpace)) / numberOfCells;
107
+ this.parent.timelineModule['changeTimelineSettings'](newTimeline);
108
+ this.parent.timelineModule.isZoomToFit = false;
109
+ this.parent.timelineModule.isZooming = false;
110
+ };
18
111
  /**
19
112
  * @param {IGanttData[]} data .
20
113
  * @param {PdfGantt} gantt .
@@ -36,11 +129,16 @@ var ExportHelper = /** @class */ (function () {
36
129
  this.gantt.style.cellPadding.right = 0;
37
130
  this.ganttStyle = this.gantt.ganttStyle;
38
131
  this.gantt.borderColor = this.ganttStyle.chartGridLineColor;
132
+ this.parent.pdfExportModule.isPdfExport = true;
133
+ if (this.exportProps.fitToWidthSettings && this.exportProps.fitToWidthSettings.isFitToWidth) {
134
+ this.processToFit();
135
+ }
39
136
  this.processHeaderContent();
40
137
  this.processGanttContent();
41
138
  this.processTimeline();
42
139
  this.processTaskbar();
43
140
  this.processPredecessor();
141
+ this.parent.pdfExportModule.isPdfExport = false;
44
142
  };
45
143
  ExportHelper.prototype.processHeaderContent = function () {
46
144
  var _this = this;
@@ -96,7 +194,9 @@ var ExportHelper = /** @class */ (function () {
96
194
  this.renderEmptyGantt();
97
195
  }
98
196
  else {
99
- this.flatData.forEach(function (data) {
197
+ var flatData = void 0;
198
+ flatData = this.flatData;
199
+ flatData.forEach(function (data) {
100
200
  _this.row = _this.gantt.rows.addRow();
101
201
  if (data.hasChildRecords) {
102
202
  _this.gantt.rows.getRow(_this.rowIndex).isParentRow = true;
@@ -105,6 +205,9 @@ var ExportHelper = /** @class */ (function () {
105
205
  else {
106
206
  _this.processRecordRow(data);
107
207
  }
208
+ if (_this.exportProps.fitToWidthSettings && _this.exportProps.fitToWidthSettings.isFitToWidth) {
209
+ _this.row.height = 33.33;
210
+ }
108
211
  _this.rowIndex++;
109
212
  });
110
213
  }
@@ -156,7 +259,7 @@ var ExportHelper = /** @class */ (function () {
156
259
  else {
157
260
  predecessor.connectorLineColor = _this.ganttStyle.connectorLineColor;
158
261
  }
159
- predecessor.connectorLineColor = _this.ganttStyle.connectorLineColor;
262
+ _this.ganttStyle.connectorLineColor = predecessor.connectorLineColor;
160
263
  _this.gantt.predecessorCollection.push(predecessor);
161
264
  });
162
265
  this.parent.pdfExportModule.isPdfExport = false;
@@ -221,7 +324,9 @@ var ExportHelper = /** @class */ (function () {
221
324
  */
222
325
  ExportHelper.prototype.processTaskbar = function () {
223
326
  var _this = this;
224
- this.flatData.forEach(function (data) {
327
+ var flatData;
328
+ flatData = this.flatData;
329
+ flatData.forEach(function (data) {
225
330
  var taskbar = _this.gantt.taskbar.add();
226
331
  var ganttProp = data.ganttProperties;
227
332
  taskbar.left = ganttProp.left;
@@ -252,7 +357,22 @@ var ExportHelper = /** @class */ (function () {
252
357
  taskbar.startDate = ganttProp.startDate;
253
358
  taskbar.endDate = ganttProp.endDate;
254
359
  taskbar.height = _this.parent.chartRowsModule.taskBarHeight;
360
+ if (_this.parent.renderBaseline) {
361
+ var height = void 0;
362
+ if ((taskbar.height + _this.baselineHeight) <= _this.parent.rowHeight) {
363
+ height = taskbar.height;
364
+ }
365
+ else {
366
+ height = taskbar.height - (_this.baselineHeight + 1);
367
+ }
368
+ taskbar.height = height;
369
+ }
370
+ taskbar.baselineTop = _this.parent.chartRowsModule.baselineTop;
255
371
  taskbar.isMilestone = ganttProp.isMilestone;
372
+ taskbar.baselineStartDate = ganttProp.baselineStartDate;
373
+ taskbar.baselineEndDate = ganttProp.baselineEndDate;
374
+ taskbar.baselineLeft = ganttProp.baselineLeft;
375
+ taskbar.baselineWidth = ganttProp.baselineWidth;
256
376
  taskbar.milestoneColor = new PdfColor(_this.ganttStyle.taskbar.milestoneColor);
257
377
  taskbar.isParentTask = data.hasChildRecords;
258
378
  if (ganttProp.isMilestone) {
@@ -283,6 +403,7 @@ var ExportHelper = /** @class */ (function () {
283
403
  taskbar.taskColor = new PdfColor(_this.ganttStyle.taskbar.criticalTaskColor);
284
404
  taskbar.progressColor = new PdfColor(_this.ganttStyle.taskbar.criticalProgressColor);
285
405
  taskbar.taskBorderColor = new PdfColor(_this.ganttStyle.taskbar.criticalTaskBorderColor);
406
+ taskbar.milestoneColor = new PdfColor(_this.ganttStyle.taskbar.criticalTaskColor);
286
407
  }
287
408
  else {
288
409
  taskbar.taskColor = new PdfColor(_this.ganttStyle.taskbar.taskColor);
@@ -290,6 +411,8 @@ var ExportHelper = /** @class */ (function () {
290
411
  taskbar.taskBorderColor = new PdfColor(_this.ganttStyle.taskbar.taskBorderColor);
291
412
  }
292
413
  }
414
+ taskbar.baselineColor = new PdfColor(_this.ganttStyle.taskbar.baselineColor);
415
+ taskbar.baselineBorderColor = new PdfColor(_this.ganttStyle.taskbar.baselineBorderColor);
293
416
  taskbar.gridLineColor = new PdfColor(_this.ganttStyle.chartGridLineColor);
294
417
  _this.gantt.taskbarCollection.push(taskbar);
295
418
  var taskStyle = {};
@@ -298,6 +421,8 @@ var ExportHelper = /** @class */ (function () {
298
421
  taskStyle.taskBorderColor = taskbar.taskBorderColor;
299
422
  taskStyle.progressColor = taskbar.progressColor;
300
423
  taskStyle.milestoneColor = taskbar.milestoneColor;
424
+ taskStyle.baselineColor = taskbar.baselineColor;
425
+ taskStyle.baselineBorderColor = taskbar.baselineBorderColor;
301
426
  var args = {
302
427
  taskbar: taskStyle,
303
428
  data: data
@@ -309,6 +434,8 @@ var ExportHelper = /** @class */ (function () {
309
434
  taskbar.taskBorderColor = args.taskbar.taskBorderColor;
310
435
  taskbar.progressColor = args.taskbar.progressColor;
311
436
  taskbar.milestoneColor = args.taskbar.milestoneColor;
437
+ taskbar.baselineColor = args.taskbar.baselineColor;
438
+ taskbar.baselineBorderColor = args.taskbar.baselineBorderColor;
312
439
  }
313
440
  });
314
441
  };
@@ -456,6 +583,26 @@ var ExportHelper = /** @class */ (function () {
456
583
  var widths = [];
457
584
  var treeColumnIndex = 0;
458
585
  var tWidth = (this.pdfDoc.pageSettings.width - 82);
586
+ if (this.exportProps && this.exportProps.fitToWidthSettings && this.exportProps.fitToWidthSettings.isFitToWidth) {
587
+ var gridWidth = void 0;
588
+ if (this.exportProps.fitToWidthSettings.gridWidth) {
589
+ gridWidth = parseInt(this.exportProps.fitToWidthSettings.gridWidth.split('%')[0]);
590
+ }
591
+ else {
592
+ if (this.exportProps.fitToWidthSettings.chartWidth) {
593
+ var chartWidth = parseInt(this.exportProps.fitToWidthSettings.chartWidth.split('%')[0]);
594
+ gridWidth = 100 - chartWidth;
595
+ }
596
+ else {
597
+ gridWidth = 30;
598
+ }
599
+ }
600
+ var pdfwidth = (this.parent.pdfExportModule['pdfPageDimensions'].width * gridWidth) / 100;
601
+ var perColumnWidth = pdfwidth / this.gantt.columns.columns.length;
602
+ for (var i = 0; i < this.gantt.columns.columns.length; i++) {
603
+ this.gantt.columns.getColumn(i).width = perColumnWidth;
604
+ }
605
+ }
459
606
  if (this.totalColumnWidth > (this.pdfDoc.pageSettings.width - 82)) {
460
607
  this.gantt.style.allowHorizontalOverflow = true;
461
608
  }
@@ -196,11 +196,11 @@ var PdfTreeGridCell = /** @class */ (function () {
196
196
  if (this.finishedDrawingCell) {
197
197
  temp = (this.remainingString === '') ? this.remainingString : this.value;
198
198
  /* eslint-disable-next-line */
199
- graphics.drawString(temp, font, textPen, textBrush, (innerLayoutArea.x + leftAdjustment), innerLayoutArea.y, (innerLayoutArea.width - leftAdjustment - padding), (innerLayoutArea.height - padding), this.style.format);
199
+ graphics.drawString(temp, font, textPen, textBrush, (innerLayoutArea.x + leftAdjustment), this.isHeaderCell ? innerLayoutArea.y - 16 : innerLayoutArea.y, (innerLayoutArea.width - leftAdjustment - padding), (innerLayoutArea.height - padding), this.style.format);
200
200
  }
201
201
  else {
202
202
  /* eslint-disable-next-line */
203
- graphics.drawString(this.remainingString, font, textPen, textBrush, (innerLayoutArea.x + leftAdjustment), innerLayoutArea.y, this.style.format);
203
+ graphics.drawString(this.remainingString, font, textPen, textBrush, (innerLayoutArea.x + leftAdjustment), this.isHeaderCell ? innerLayoutArea.y - 16 : innerLayoutArea.y, this.style.format);
204
204
  }
205
205
  result = graphics.stringLayoutResult;
206
206
  }
@@ -55,6 +55,8 @@ var PdfGanttTheme = /** @class */ (function () {
55
55
  ganttStyle.taskbar.progressColor = new PdfColor(33, 82, 125);
56
56
  ganttStyle.taskbar.criticalTaskColor = new PdfColor(255, 139, 139);
57
57
  ganttStyle.taskbar.criticalProgressColor = new PdfColor(255, 85, 85);
58
+ ganttStyle.taskbar.baselineColor = new PdfColor(240, 173, 78);
59
+ ganttStyle.taskbar.baselineBorderColor = new PdfColor(240, 173, 78);
58
60
  ganttStyle.criticalConnectorLineColor = new PdfColor(255, 85, 85);
59
61
  ganttStyle.taskbar.criticalTaskBorderColor = new PdfColor(255, 85, 85);
60
62
  ganttStyle.taskbar.parentTaskColor = new PdfColor(119, 119, 119);
@@ -75,6 +77,8 @@ var PdfGanttTheme = /** @class */ (function () {
75
77
  ganttStyle.taskbar.progressColor = new PdfColor(0, 86, 179);
76
78
  ganttStyle.taskbar.criticalTaskColor = new PdfColor(255, 139, 139);
77
79
  ganttStyle.taskbar.criticalProgressColor = new PdfColor(255, 85, 85);
80
+ ganttStyle.taskbar.baselineColor = new PdfColor(255, 193, 7);
81
+ ganttStyle.taskbar.baselineBorderColor = new PdfColor(255, 193, 7);
78
82
  ganttStyle.criticalConnectorLineColor = new PdfColor(255, 85, 85);
79
83
  ganttStyle.taskbar.criticalTaskBorderColor = new PdfColor(255, 85, 85);
80
84
  ganttStyle.taskbar.parentTaskColor = new PdfColor(108, 117, 125);
@@ -97,6 +101,8 @@ var PdfGanttTheme = /** @class */ (function () {
97
101
  ganttStyle.taskbar.progressColor = new PdfColor(0, 91, 163);
98
102
  ganttStyle.taskbar.criticalTaskColor = new PdfColor(255, 139, 139);
99
103
  ganttStyle.taskbar.criticalProgressColor = new PdfColor(255, 85, 85);
104
+ ganttStyle.taskbar.baselineColor = new PdfColor(216, 59, 1);
105
+ ganttStyle.taskbar.baselineBorderColor = new PdfColor(216, 59, 1);
100
106
  ganttStyle.criticalConnectorLineColor = new PdfColor(255, 85, 85);
101
107
  ganttStyle.taskbar.criticalTaskBorderColor = new PdfColor(255, 85, 85);
102
108
  ganttStyle.taskbar.parentTaskColor = new PdfColor(118, 118, 118);
@@ -117,6 +123,8 @@ var PdfGanttTheme = /** @class */ (function () {
117
123
  ganttStyle.taskbar.progressColor = new PdfColor(63, 81, 181);
118
124
  ganttStyle.taskbar.criticalTaskColor = new PdfColor(255, 139, 139);
119
125
  ganttStyle.taskbar.criticalProgressColor = new PdfColor(255, 85, 85);
126
+ ganttStyle.taskbar.baselineColor = new PdfColor(193, 87, 0);
127
+ ganttStyle.taskbar.baselineBorderColor = new PdfColor(193, 87, 0);
120
128
  ganttStyle.criticalConnectorLineColor = new PdfColor(255, 85, 85);
121
129
  ganttStyle.taskbar.criticalTaskBorderColor = new PdfColor(255, 85, 85);
122
130
  ganttStyle.taskbar.parentTaskColor = new PdfColor(132, 132, 132);
@@ -16,6 +16,7 @@ import { PdfBorders, TemporaryDictionary } from './index';
16
16
  import { PdfHorizontalOverflowType } from '../../base/interface';
17
17
  import { ElementLayouter, PdfLayoutResult, PdfLayoutFormat, SizeF, PointF, RectangleF, RowLayoutResult, PdfLayoutType, PdfLayoutBreakType } from '@syncfusion/ej2-pdf-export';
18
18
  import { PdfStringFormat } from '@syncfusion/ej2-pdf-export';
19
+ import { pointToPixel } from '../../base/utils';
19
20
  /**
20
21
  *
21
22
  */
@@ -83,7 +84,7 @@ var PdfTreeGridLayouter = /** @class */ (function (_super) {
83
84
  var startColumn = 0;
84
85
  var endColumn = 0;
85
86
  var cellWidths = 0;
86
- var availableWidth = this.currentGraphics.clientSize.width - this.currentBounds.x;
87
+ var availableWidth = pointToPixel(this.currentGraphics.clientSize.width) - this.currentBounds.x;
87
88
  for (var i = 0; i < this.treegrid.columns.count; i++) {
88
89
  cellWidths += this.treegrid.columns.getColumn(i).width;
89
90
  if (cellWidths >= availableWidth) {
@@ -311,6 +312,7 @@ var PdfTreeGridLayouter = /** @class */ (function (_super) {
311
312
  var size = new SizeF(column.width, height);
312
313
  if (cell.columnSpan > 1) {
313
314
  size = new SizeF(cell.width, height);
315
+ i += cell.columnSpan;
314
316
  }
315
317
  if (!this.checkIfDefaultFormat(column.format) && this.checkIfDefaultFormat(cell.style.format)) {
316
318
  cell.style.format = column.format;
@@ -163,7 +163,9 @@ var PdfGanttPredecessor = /** @class */ (function () {
163
163
  }
164
164
  break;
165
165
  }
166
- var midPoint = Math.round((this.parent.rowHeight - 1) / 2.0);
166
+ var midPointforTaskbar = Math.round((this.parent.rowHeight - 1) / 2.0);
167
+ var midPointforBaseline = Math.round((this.parent.rowHeight - 10) / 2.0);
168
+ var midPoint = this.parent.renderBaseline ? midPointforBaseline : midPointforTaskbar;
167
169
  midPoint = pixelToPoint(midPoint);
168
170
  /* eslint-disable-next-line */
169
171
  var point1, point2, point3, point4, point5, point6;
@@ -221,6 +221,7 @@ var PdfGantt = /** @class */ (function (_super) {
221
221
  var pageData;
222
222
  this.headerDetails.forEach(function (detail, index) {
223
223
  var page = _this.result.page.section.getPages()[_this.startPageIndex];
224
+ page['contentWidth'] = pointToPixel(_this.headerDetails[index].endPoint - _this.headerDetails[index].startPoint);
224
225
  _this.chartHeader.drawTimeline(page, _this.startPoint, detail);
225
226
  taskbarPoint.y = taskbarPoint.y + pixelToPoint(_this.parent.timelineModule.isSingleTier ? 45 : 60); // headerHeight
226
227
  pageStartX = taskbarPoint.x;
@@ -231,6 +232,11 @@ var PdfGantt = /** @class */ (function (_super) {
231
232
  var task = _this.taskbarCollection[i];
232
233
  var rowHeight = _this.rows.getRow(i + 1).height;
233
234
  var pdfPage = _this.result.page.section.getPages()[_this.startPageIndex];
235
+ var graphics = pdfPage.graphics;
236
+ var pen = new PdfPen(new PdfColor(206, 206, 206));
237
+ if (page['contentWidth'] && (_this.parent.gridLines == "Both" || _this.parent.gridLines == "Horizontal")) {
238
+ graphics.drawRectangle(pen, pageStartX, taskbarPoint.y, page['contentWidth'] + 0.5, rowHeight);
239
+ }
234
240
  /* eslint-disable-next-line */
235
241
  var isNextPage = task.drawTaskbar(pdfPage, taskbarPoint, detail, cumulativeWidth, rowHeight, _this.taskbarCollection[i]);
236
242
  if (isNextPage) {
@@ -14,6 +14,16 @@ export declare class PdfGanttTaskbarCollection {
14
14
  isAutoSchedule?: boolean;
15
15
  /** Defines the task is milestone or not. */
16
16
  isMilestone?: boolean;
17
+ /** Defines the task baselinestartdate. */
18
+ baselineStartDate?: Date;
19
+ /** Defines the task baselineenddate. */
20
+ baselineEndDate?: Date;
21
+ /** Defines the task baselineleft. */
22
+ baselineLeft?: number;
23
+ /** Defines the task baselinewidth. */
24
+ baselineWidth?: number;
25
+ /** Defines the task baselineHeight . */
26
+ baselineHeight: number;
17
27
  /** Defines the left of task.
18
28
  *
19
29
  * @hidden
@@ -58,6 +68,9 @@ export declare class PdfGanttTaskbarCollection {
58
68
  gridLineColor: PdfColor;
59
69
  progressFontColor: PdfColor;
60
70
  taskColor: PdfColor;
71
+ baselineColor: PdfColor;
72
+ baselineBorderColor: PdfColor;
73
+ baselineTop: number;
61
74
  labelColor: PdfColor;
62
75
  taskBorderColor: PdfColor;
63
76
  progressColor: PdfColor;
@@ -9,14 +9,16 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- import { PointF, PdfStringLayouter, PdfPen, PdfSolidBrush, RectangleF, SizeF, PdfStandardFont, PdfFontStyle, PdfStringFormat, PdfVerticalAlignment, PdfTextAlignment, PdfWordWrapType } from '@syncfusion/ej2-pdf-export';
13
- import { pixelToPoint } from '../base/utils';
12
+ import { PointF, PdfColor, PdfStringLayouter, PdfPen, PdfSolidBrush, RectangleF, SizeF, PdfStandardFont, PdfFontStyle, PdfStringFormat, PdfVerticalAlignment, PdfTextAlignment, PdfWordWrapType } from '@syncfusion/ej2-pdf-export';
13
+ import { pixelToPoint, pointToPixel } from '../base/utils';
14
14
  import { isNullOrUndefined } from '@syncfusion/ej2-base';
15
15
  /**
16
16
  * @hidden
17
17
  */
18
18
  var PdfGanttTaskbarCollection = /** @class */ (function () {
19
19
  function PdfGanttTaskbarCollection(parent) {
20
+ /** Defines the task baselineHeight . */
21
+ this.baselineHeight = 8;
20
22
  /**
21
23
  * @private
22
24
  */
@@ -63,6 +65,7 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
63
65
  //code for while current pdf page is exceed
64
66
  if (yPoint > pageSize.height) {
65
67
  page = this.GetNextPage(page);
68
+ page['contentWidth'] = pointToPixel(detail.endPoint - detail.startPoint);
66
69
  taskGraphics = page.graphics;
67
70
  startPoint.y = 0;
68
71
  if (this.parent.pdfExportModule.gantt.enableHeader) {
@@ -70,6 +73,11 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
70
73
  startPoint.y = pixelToPoint(this.parent.timelineModule.isSingleTier ? 45 : 60);
71
74
  }
72
75
  isNextPage = true;
76
+ var graphics = page.graphics;
77
+ var pen = new PdfPen(new PdfColor(206, 206, 206));
78
+ if (page['contentWidth'] && (this.parent.gridLines == "Both" || this.parent.gridLines == "Horizontal")) {
79
+ graphics.drawRectangle(pen, startPoint.x, startPoint.y, page['contentWidth'] + 0.5, rowHeight);
80
+ }
73
81
  }
74
82
  this.drawLeftLabel(page, startPoint, detail, cumulativeWidth);
75
83
  //Draw Taskbar
@@ -93,9 +101,13 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
93
101
  if (!taskbar.isMilestone) {
94
102
  var taskbarPen = new PdfPen(taskbar.taskBorderColor);
95
103
  var taskBrush = new PdfSolidBrush(taskbar.taskColor);
104
+ var baselinePen = new PdfPen(taskbar.baselineBorderColor);
105
+ var baselineBrush = new PdfSolidBrush(taskbar.baselineColor);
96
106
  var progressPen = new PdfPen(taskbar.progressColor);
97
107
  var progressBrush = new PdfSolidBrush(taskbar.progressColor);
98
- var adjustHeight = pixelToPoint((this.parent.rowHeight - this.height) / 2.0);
108
+ var adjustHeightforTaskbar = pixelToPoint((this.parent.rowHeight - this.height) / 2.0);
109
+ var adjustHeightforBaseline = pixelToPoint((this.parent.rowHeight - this.height) / 4.5);
110
+ var adjustHeight = this.parent.renderBaseline ? adjustHeightforBaseline : adjustHeightforTaskbar;
99
111
  pageIndex = page.section.indexOf(page);
100
112
  var startDate = isNullOrUndefined(this.unscheduleStarteDate) ? this.startDate : this.unscheduleStarteDate;
101
113
  var endDate = isNullOrUndefined(this.unscheduleEndDate) ? this.endDate : this.unscheduleEndDate;
@@ -109,6 +121,9 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
109
121
  this.drawUnscheduledTask(taskGraphics, startPoint, cumulativeWidth, adjustHeight);
110
122
  }
111
123
  else {
124
+ if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
125
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), pixelToPoint(this.baselineWidth), pixelToPoint(this.baselineHeight));
126
+ }
112
127
  taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
113
128
  if (this.isScheduledTask) {
114
129
  taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(taskbar.progressWidth), pixelToPoint(taskbar.height));
@@ -140,6 +155,9 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
140
155
  this.drawUnscheduledTask(taskGraphics, startPoint, cumulativeWidth, adjustHeight);
141
156
  }
142
157
  else {
158
+ if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
159
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), pixelToPoint(this.baselineWidth), pixelToPoint(this.baselineHeight));
160
+ }
143
161
  taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(renderWidth), pixelToPoint(taskbar.height));
144
162
  taskbar.width = taskbar.width - renderWidth;
145
163
  if (this.isScheduledTask) {
@@ -171,6 +189,9 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
171
189
  this.taskStartPoint = __assign({}, startPoint);
172
190
  this.isStartPoint = true;
173
191
  }
192
+ if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
193
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), pixelToPoint(this.baselineWidth), pixelToPoint(this.baselineHeight));
194
+ }
174
195
  taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(taskbar.left + 0.5), startPoint.y + adjustHeight, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
175
196
  if (this.isScheduledTask) {
176
197
  taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(taskbar.left + 0.5), startPoint.y + adjustHeight, pixelToPoint(taskbar.progressWidth), pixelToPoint(taskbar.height));
@@ -192,6 +213,9 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
192
213
  this.taskStartPoint = __assign({}, startPoint);
193
214
  this.isStartPoint = true;
194
215
  }
216
+ if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
217
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), pixelToPoint(this.baselineWidth), pixelToPoint(this.baselineHeight));
218
+ }
195
219
  taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(taskbar.left) + 0.5, startPoint.y + adjustHeight, pixelToPoint(detail.totalWidth), pixelToPoint(taskbar.height));
196
220
  if (this.isScheduledTask) {
197
221
  var progressBoundsWidth = 0;
@@ -217,6 +241,9 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
217
241
  }
218
242
  else {
219
243
  this.drawMilestone(page, startPoint, detail, cumulativeWidth);
244
+ if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
245
+ this.drawMilestone(page, startPoint, detail, cumulativeWidth);
246
+ }
220
247
  }
221
248
  this.drawRightLabel(page, startPoint, detail, cumulativeWidth);
222
249
  return isNextPage;
@@ -375,13 +402,20 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
375
402
  var pageIndex = page.section.indexOf(page);
376
403
  this.taskStartPoint = __assign({}, startPoint);
377
404
  var milestonePen = new PdfPen(this.milestoneColor);
378
- var adjustHeight = pixelToPoint(((this.parent.rowHeight - this.height) / 2.0));
405
+ var adjustHeightforBaselineMilesone = pixelToPoint(((this.parent.rowHeight - this.height) / 3.0));
406
+ var adjustHeightforMilesone = pixelToPoint(((this.parent.rowHeight - this.height) / 2.0));
407
+ var adjustHeight = this.parent.renderBaseline ? adjustHeightforBaselineMilesone : adjustHeightforMilesone;
379
408
  var milestoneBrush = new PdfSolidBrush(this.milestoneColor);
409
+ var baselinePen = new PdfPen(this.baselineBorderColor);
410
+ var baselineBrush = new PdfSolidBrush(this.baselineColor);
380
411
  taskGraphics.save(); //saving graphics state
381
- var height = Math.floor(this.parent.chartRowsModule.taskBarHeight * 0.6);
412
+ var height = Math.floor(this.parent.chartRowsModule.taskBarHeight * 0.8);
382
413
  /* eslint-disable-next-line */
383
414
  taskGraphics.translateTransform(startPoint.x + pixelToPoint(this.left - cumulativeWidth), startPoint.y + adjustHeight - (this.parent.chartRowsModule.taskBarHeight * 0.7) / 2);
384
415
  taskGraphics.rotateTransform(45); //apply rotation
416
+ if (this.parent.renderBaseline && this.baselineStartDate && this.baselineEndDate) {
417
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, 2, 2, pixelToPoint(height), pixelToPoint(height));
418
+ }
385
419
  taskGraphics.drawRectangle(milestonePen, milestoneBrush, 0, 0, pixelToPoint(height), pixelToPoint(height));
386
420
  taskGraphics.restore(); //restoring graphics state
387
421
  this.endPage = this.startPage = pageIndex;
@@ -1,6 +1,6 @@
1
1
  import { PointF, PdfColor, PdfPen, PdfSolidBrush, PdfStandardFont, PdfStringFormat, PdfVerticalAlignment, PdfTextAlignment, PdfWordWrapType } from '@syncfusion/ej2-pdf-export';
2
2
  import { extend, isNullOrUndefined } from '@syncfusion/ej2-base';
3
- import { pixelToPoint } from '../base/utils';
3
+ import { pixelToPoint, pointToPixel } from '../base/utils';
4
4
  /**
5
5
  */
6
6
  var PdfTimeline = /** @class */ (function () {
@@ -23,7 +23,7 @@ var PdfTimeline = /** @class */ (function () {
23
23
  * @returns {void}
24
24
  */
25
25
  PdfTimeline.prototype.drawTimeline = function (page, startPoint, detail) {
26
- var remainWidth = Math.floor(detail.totalWidth);
26
+ var remainWidth = pointToPixel(Math.floor(detail.totalWidth));
27
27
  var renderWidth = 0;
28
28
  this.topTierPoint.x = startPoint.x;
29
29
  this.topTierPoint.y = startPoint.y;
@@ -51,7 +51,7 @@ var PdfTimeline = /** @class */ (function () {
51
51
  //Primary header Event Arguments
52
52
  /* eslint-disable-next-line */
53
53
  this.triggerQueryTimelinecell(page, this.topTierPoint.x, this.topTierPoint.y, this.topTierHeight, renderWidth, pHeader.value, true);
54
- this.topTierPoint.x += pixelToPoint(renderWidth);
54
+ this.topTierPoint.x += renderWidth;
55
55
  remainWidth -= renderWidth;
56
56
  if (isCompleted) {
57
57
  this.topTierIndex++;
@@ -77,7 +77,7 @@ var PdfTimeline = /** @class */ (function () {
77
77
  //Secondary header Event Arguments
78
78
  /* eslint-disable-next-line */
79
79
  this.triggerQueryTimelinecell(page, this.bottomTierPoint.x, this.bottomTierPoint.y, this.bottomTierHeight, width, secondHeader.value, false);
80
- this.bottomTierPoint.x = this.bottomTierPoint.x + pixelToPoint(width);
80
+ this.bottomTierPoint.x = this.bottomTierPoint.x + width;
81
81
  remainWidth -= width;
82
82
  secondHeader.completedWidth = width;
83
83
  if (isCompleted) {
@@ -108,7 +108,7 @@ var PdfTimeline = /** @class */ (function () {
108
108
  //Primary header Event Arguments
109
109
  /* eslint-disable-next-line */
110
110
  this.triggerQueryTimelinecell(page, this.topTierPoint.x, this.topTierPoint.y, this.topTierHeight, pHeader.completedWidth, pHeader.value, true);
111
- this.topTierPoint.x += pixelToPoint(pHeader.completedWidth);
111
+ this.topTierPoint.x += pHeader.completedWidth;
112
112
  }
113
113
  }
114
114
  }
@@ -121,7 +121,7 @@ var PdfTimeline = /** @class */ (function () {
121
121
  //Secondary header Event Arguments
122
122
  /* eslint-disable-next-line */
123
123
  this.triggerQueryTimelinecell(page, this.bottomTierPoint.x, this.bottomTierPoint.y, this.bottomTierHeight, secondHeader.width, secondHeader.value, false);
124
- this.bottomTierPoint.x = this.bottomTierPoint.x + pixelToPoint(secondHeader.width);
124
+ this.bottomTierPoint.x = this.bottomTierPoint.x + secondHeader.width;
125
125
  }
126
126
  }
127
127
  }
@@ -168,7 +168,10 @@ var PdfTimeline = /** @class */ (function () {
168
168
  var e = eventArgs.timelineCell;
169
169
  var rectPen = new PdfPen(eventArgs.timelineCell.borderColor);
170
170
  var rectBrush = new PdfSolidBrush(eventArgs.timelineCell.backgroundColor);
171
- graphics.drawRectangle(rectPen, rectBrush, x, y, pixelToPoint(width), pixelToPoint(height));
171
+ graphics.drawRectangle(rectPen, rectBrush, x, y, width, pixelToPoint(height));
172
+ if (!isTopTier && (this.parent.gridLines == "Both" || this.parent.gridLines == "Vertical")) {
173
+ graphics.drawRectangle(rectPen, rectBrush, x, y + pixelToPoint(height), width, page.getClientSize().height);
174
+ }
172
175
  var font = new PdfStandardFont(ganttStyle.fontFamily, e.fontSize, e.fontStyle);
173
176
  if (ganttStyle.font) {
174
177
  font = ganttStyle.font;
@@ -177,7 +180,13 @@ var PdfTimeline = /** @class */ (function () {
177
180
  var pLeft = ganttStyle.timeline.padding ? eventArgs.timelineCell.padding.left : 0;
178
181
  var pTop = ganttStyle.timeline.padding ? eventArgs.timelineCell.padding.top : 0;
179
182
  /* eslint-disable-next-line */
180
- graphics.drawString(eventArgs.value, font, null, textBrush, x + pLeft, y + pTop, pixelToPoint(width), pixelToPoint(height), e.format);
183
+ if (isTopTier) {
184
+ x = x + pLeft + 4;
185
+ }
186
+ else {
187
+ x = x + pLeft;
188
+ }
189
+ graphics.drawString(eventArgs.value, font, null, textBrush, x, y + pTop, pixelToPoint(width), pixelToPoint(height), e.format);
181
190
  };
182
191
  return PdfTimeline;
183
192
  }());
@@ -267,12 +267,15 @@ var PdfTreeGrid = /** @class */ (function (_super) {
267
267
  colSpan = cell.columnSpan;
268
268
  currentCellIndex = j;
269
269
  cell.isCellMergeStart = true;
270
+ var totalColumnWidth = this.columns.columns[currentCellIndex].width;
270
271
  //Set Column merges.
271
272
  while (colSpan > 1) {
272
273
  currentCellIndex++;
273
274
  row.cells.getCell(currentCellIndex).isCellMergeContinue = true;
274
275
  colSpan--;
276
+ totalColumnWidth += this.columns.columns[currentCellIndex].width;
275
277
  }
278
+ cell.width = totalColumnWidth;
276
279
  }
277
280
  else if (cell.columnSpan === 1 && cell.rowSpan > 1) {
278
281
  rowSpan = cell.rowSpan;
@@ -337,15 +340,12 @@ var PdfTreeGrid = /** @class */ (function (_super) {
337
340
  colSpan = cell.columnSpan;
338
341
  currentCellIndex = j;
339
342
  cell.isCellMergeStart = true;
340
- var totalColumnWidth = this.columns.columns[currentCellIndex].width;
341
343
  //set Column merges.
342
344
  while (colSpan > 1) {
343
345
  currentCellIndex++;
344
346
  row.cells.getCell(currentCellIndex).isCellMergeContinue = true;
345
347
  colSpan--;
346
- totalColumnWidth += this.columns.columns[currentCellIndex].width;
347
348
  }
348
- cell.width = totalColumnWidth;
349
349
  }
350
350
  else if (cell.columnSpan === 1 && cell.rowSpan > 1) {
351
351
  rowSpan = cell.rowSpan;
@@ -26,6 +26,13 @@ export interface TaskFieldsModel {
26
26
  */
27
27
  parentID?: string;
28
28
 
29
+ /**
30
+ * Gets or sets a field name of data object in data source that specifies whether the current record has child records.
31
+ *
32
+ * @default null
33
+ */
34
+ hasChildMapping?: string;
35
+
29
36
  /**
30
37
  * To map start date of task from data source.
31
38
  *
@@ -21,6 +21,12 @@ export declare class TaskFields extends ChildProperty<TaskFields> {
21
21
  * @default null
22
22
  */
23
23
  parentID: string;
24
+ /**
25
+ * Gets or sets a field name of data object in data source that specifies whether the current record has child records.
26
+ *
27
+ * @default null
28
+ */
29
+ hasChildMapping: string;
24
30
  /**
25
31
  * To map start date of task from data source.
26
32
  *