@syncfusion/ej2-gantt 23.2.7 → 24.1.41

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 (112) hide show
  1. package/CHANGELOG.md +0 -10
  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 +2939 -324
  6. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  7. package/dist/es6/ej2-gantt.es5.js +2993 -358
  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 +7 -3
  14. package/src/gantt/actions/chart-scroll.d.ts +9 -1
  15. package/src/gantt/actions/chart-scroll.js +111 -3
  16. package/src/gantt/actions/connector-line-edit.js +8 -1
  17. package/src/gantt/actions/context-menu.js +2 -2
  18. package/src/gantt/actions/day-markers.d.ts +2 -1
  19. package/src/gantt/actions/dependency.js +2 -2
  20. package/src/gantt/actions/dialog-edit.d.ts +24 -0
  21. package/src/gantt/actions/dialog-edit.js +383 -1
  22. package/src/gantt/actions/edit.js +68 -21
  23. package/src/gantt/actions/keyboard.js +5 -1
  24. package/src/gantt/actions/pdf-export.js +12 -4
  25. package/src/gantt/actions/rowdragdrop.js +20 -9
  26. package/src/gantt/actions/selection.js +6 -3
  27. package/src/gantt/actions/taskbar-edit.d.ts +14 -0
  28. package/src/gantt/actions/taskbar-edit.js +517 -82
  29. package/src/gantt/actions/toolbar.js +4 -1
  30. package/src/gantt/base/css-constants.d.ts +2 -0
  31. package/src/gantt/base/css-constants.js +2 -0
  32. package/src/gantt/base/enum.d.ts +22 -0
  33. package/src/gantt/base/gantt-chart.js +63 -21
  34. package/src/gantt/base/gantt-model.d.ts +9 -1
  35. package/src/gantt/base/gantt.d.ts +11 -1
  36. package/src/gantt/base/gantt.js +46 -18
  37. package/src/gantt/base/interface.d.ts +135 -3
  38. package/src/gantt/base/splitter.js +6 -0
  39. package/src/gantt/base/task-processor.d.ts +1 -1
  40. package/src/gantt/base/task-processor.js +37 -9
  41. package/src/gantt/export/export-helper.d.ts +12 -0
  42. package/src/gantt/export/export-helper.js +316 -9
  43. package/src/gantt/export/pdf-base/pdf-grid-table.js +14 -1
  44. package/src/gantt/export/pdf-base/pdf-style/gantt-theme.js +36 -0
  45. package/src/gantt/export/pdf-connector-line.js +137 -32
  46. package/src/gantt/export/pdf-event-marker.d.ts +10 -0
  47. package/src/gantt/export/pdf-event-marker.js +57 -0
  48. package/src/gantt/export/pdf-gantt.d.ts +2 -0
  49. package/src/gantt/export/pdf-gantt.js +30 -10
  50. package/src/gantt/export/pdf-taskbar.d.ts +23 -2
  51. package/src/gantt/export/pdf-taskbar.js +771 -43
  52. package/src/gantt/export/pdf-timeline.d.ts +9 -0
  53. package/src/gantt/export/pdf-timeline.js +98 -20
  54. package/src/gantt/models/column.d.ts +12 -0
  55. package/src/gantt/renderer/chart-rows.d.ts +1 -1
  56. package/src/gantt/renderer/chart-rows.js +29 -16
  57. package/src/gantt/renderer/connector-line.js +8 -5
  58. package/src/gantt/renderer/edit-tooltip.js +3 -0
  59. package/src/gantt/renderer/event-marker.js +4 -1
  60. package/src/gantt/renderer/nonworking-day.js +18 -5
  61. package/src/gantt/renderer/timeline.d.ts +9 -0
  62. package/src/gantt/renderer/timeline.js +164 -21
  63. package/styles/bootstrap-dark.css +77 -16
  64. package/styles/bootstrap.css +78 -17
  65. package/styles/bootstrap4.css +78 -17
  66. package/styles/bootstrap5-dark.css +78 -17
  67. package/styles/bootstrap5.css +78 -17
  68. package/styles/fabric-dark.css +78 -17
  69. package/styles/fabric.css +78 -17
  70. package/styles/fluent-dark.css +78 -17
  71. package/styles/fluent.css +78 -17
  72. package/styles/gantt/_bootstrap-dark-definition.scss +7 -2
  73. package/styles/gantt/_bootstrap-definition.scss +7 -2
  74. package/styles/gantt/_bootstrap4-definition.scss +7 -2
  75. package/styles/gantt/_bootstrap5-definition.scss +7 -2
  76. package/styles/gantt/_fabric-dark-definition.scss +7 -2
  77. package/styles/gantt/_fabric-definition.scss +7 -2
  78. package/styles/gantt/_fluent-definition.scss +7 -2
  79. package/styles/gantt/_fusionnew-definition.scss +6 -2
  80. package/styles/gantt/_highcontrast-definition.scss +7 -2
  81. package/styles/gantt/_highcontrast-light-definition.scss +7 -2
  82. package/styles/gantt/_layout.scss +92 -20
  83. package/styles/gantt/_material-dark-definition.scss +7 -2
  84. package/styles/gantt/_material-definition.scss +7 -2
  85. package/styles/gantt/_material3-definition.scss +7 -2
  86. package/styles/gantt/_tailwind-definition.scss +6 -1
  87. package/styles/gantt/_theme.scss +11 -0
  88. package/styles/gantt/bootstrap-dark.css +77 -16
  89. package/styles/gantt/bootstrap.css +78 -17
  90. package/styles/gantt/bootstrap4.css +78 -17
  91. package/styles/gantt/bootstrap5-dark.css +78 -17
  92. package/styles/gantt/bootstrap5.css +78 -17
  93. package/styles/gantt/fabric-dark.css +78 -17
  94. package/styles/gantt/fabric.css +78 -17
  95. package/styles/gantt/fluent-dark.css +78 -17
  96. package/styles/gantt/fluent.css +78 -17
  97. package/styles/gantt/highcontrast-light.css +78 -17
  98. package/styles/gantt/highcontrast.css +78 -17
  99. package/styles/gantt/material-dark.css +78 -17
  100. package/styles/gantt/material.css +78 -17
  101. package/styles/gantt/material3-dark.css +77 -16
  102. package/styles/gantt/material3.css +77 -16
  103. package/styles/gantt/tailwind-dark.css +78 -17
  104. package/styles/gantt/tailwind.css +78 -17
  105. package/styles/highcontrast-light.css +78 -17
  106. package/styles/highcontrast.css +78 -17
  107. package/styles/material-dark.css +78 -17
  108. package/styles/material.css +78 -17
  109. package/styles/material3-dark.css +77 -16
  110. package/styles/material3.css +77 -16
  111. package/styles/tailwind-dark.css +78 -17
  112. package/styles/tailwind.css +78 -17
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- import { PointF, PdfColor, PdfStringLayouter, PdfPen, PdfSolidBrush, RectangleF, SizeF, PdfStandardFont, PdfFontStyle, PdfStringFormat, PdfVerticalAlignment, PdfTextAlignment, PdfWordWrapType } from '@syncfusion/ej2-pdf-export';
12
+ import { PointF, PdfColor, PdfStringLayouter, PdfPen, PdfSolidBrush, RectangleF, SizeF, PdfStandardFont, PdfFontStyle, PdfFontFamily, PdfStringFormat, PdfVerticalAlignment, PdfTextAlignment, PdfWordWrapType, PdfDashStyle, PdfPath, PdfBitmap, PdfBrushes, PdfLinearGradientBrush } from '@syncfusion/ej2-pdf-export';
13
13
  import { pixelToPoint, pointToPixel } from '../base/utils';
14
14
  import { isNullOrUndefined } from '@syncfusion/ej2-base';
15
15
  /**
@@ -19,6 +19,8 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
19
19
  function PdfGanttTaskbarCollection(parent) {
20
20
  /** Defines the task baselineHeight . */
21
21
  this.baselineHeight = 8;
22
+ this.segment = [];
23
+ this.segmentCollection = [];
22
24
  /**
23
25
  * @private
24
26
  */
@@ -51,13 +53,18 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
51
53
  }
52
54
  return nextPage;
53
55
  };
56
+ PdfGanttTaskbarCollection.prototype.isAutoFit = function () {
57
+ return ((this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
58
+ this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) || this.parent.timelineModule.isZoomedToFit) ? true : false;
59
+ };
54
60
  /**
55
61
  * Draw the taskbar, chart back ground
56
62
  *
57
63
  * @private
58
64
  */
59
65
  /* eslint-disable */
60
- PdfGanttTaskbarCollection.prototype.drawTaskbar = function (page, startPoint, detail, cumulativeWidth, rowHeight, taskbar) {
66
+ PdfGanttTaskbarCollection.prototype.drawTaskbar = function (page, startPoint, detail, cumulativeWidth, rowHeight, taskbar, lineWidth) {
67
+ var _this = this;
61
68
  var taskGraphics = page.graphics;
62
69
  var isNextPage = false;
63
70
  var pageSize = page.getClientSize();
@@ -65,8 +72,7 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
65
72
  //code for while current pdf page is exceed
66
73
  if (yPoint > pageSize.height) {
67
74
  page = this.GetNextPage(page);
68
- page['contentWidth'] = (this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
69
- this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) ? pointToPixel(detail.endPoint - detail.startPoint) : detail.endPoint - detail.startPoint;
75
+ page['contentWidth'] = (this.isAutoFit()) ? pointToPixel(detail.endPoint - detail.startPoint) : detail.endPoint - detail.startPoint;
70
76
  taskGraphics = page.graphics;
71
77
  startPoint.y = 0;
72
78
  if (this.parent.pdfExportModule.gantt.enableHeader) {
@@ -77,7 +83,7 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
77
83
  var graphics = page.graphics;
78
84
  var pen = new PdfPen(new PdfColor(206, 206, 206));
79
85
  if (page['contentWidth'] && (this.parent.gridLines == "Both" || this.parent.gridLines == "Horizontal")) {
80
- graphics.drawRectangle(pen, startPoint.x, startPoint.y, page['contentWidth'] + 0.5, rowHeight);
86
+ graphics.drawRectangle(pen, startPoint.x, startPoint.y, this.isAutoFit() && this.parent.timelineModule.bottomTier !== "Day" ? page['contentWidth'] + 0.5 : lineWidth, rowHeight);
81
87
  }
82
88
  }
83
89
  this.drawLeftLabel(page, startPoint, detail, cumulativeWidth);
@@ -100,42 +106,191 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
100
106
  }
101
107
  var pageIndex = -1;
102
108
  if (!taskbar.isMilestone) {
103
- var taskbarPen = new PdfPen(taskbar.taskBorderColor);
104
- var taskBrush = new PdfSolidBrush(taskbar.taskColor);
109
+ var taskbarPen_1 = new PdfPen(taskbar.taskBorderColor);
110
+ var taskBrush_1 = new PdfSolidBrush(taskbar.taskColor);
105
111
  var baselinePen = new PdfPen(taskbar.baselineBorderColor);
112
+ var manualParentBorderPen = new PdfPen(taskbar.manualParentBorder);
113
+ var manualChildBorderPen = new PdfPen(taskbar.manualChildBorder);
106
114
  var baselineBrush = new PdfSolidBrush(taskbar.baselineColor);
107
- var progressPen = new PdfPen(taskbar.progressColor);
108
- var progressBrush = new PdfSolidBrush(taskbar.progressColor);
115
+ var manualTaskbarPen = new PdfPen(taskbar.manuallineColor);
116
+ var manualParentPen = new PdfPen(taskbar.manualParentProgress);
117
+ var manualline = new PdfPen(taskbar.manuallineColor);
118
+ var manuallineBrush = new PdfSolidBrush(taskbar.manuallineColor);
119
+ var splitline = new PdfPen(taskbar.splitLineBackground);
120
+ var manualBrush = new PdfSolidBrush(taskbar.manualParentBackground);
121
+ var manualChildBrush = new PdfSolidBrush(taskbar.manualChildBackground);
122
+ var manualChildProgressBrush = new PdfSolidBrush(taskbar.manualChildProgress);
123
+ var manualProgressBrush = new PdfSolidBrush(taskbar.manualParentProgress);
124
+ var progressPen_1 = new PdfPen(taskbar.progressColor);
125
+ var progressBrush_1 = new PdfSolidBrush(taskbar.progressColor);
109
126
  var adjustHeightforTaskbar = pixelToPoint((this.parent.rowHeight - this.height) / 2.0);
110
127
  var adjustHeightforBaseline = pixelToPoint((this.parent.rowHeight - this.height) / 4.5);
111
- var adjustHeight = this.parent.renderBaseline ? adjustHeightforBaseline : adjustHeightforTaskbar;
128
+ var adjustHeight_1 = this.parent.renderBaseline ? adjustHeightforBaseline : adjustHeightforTaskbar;
112
129
  pageIndex = page.section.indexOf(page);
113
130
  var startDate = isNullOrUndefined(this.unscheduleStarteDate) ? this.startDate : this.unscheduleStarteDate;
114
131
  var endDate = isNullOrUndefined(this.unscheduleEndDate) ? this.endDate : this.unscheduleEndDate;
132
+ var imageSize_1 = 10;
115
133
  //Task start and end date both are in the range of header split up start and end date
116
134
  if (detail.startDate <= startDate && endDate <= detail.endDate) {
117
135
  if (!this.isStartPoint) {
118
136
  this.taskStartPoint = __assign({}, startPoint);
119
137
  this.isStartPoint = true;
120
138
  }
121
- if (!this.isScheduledTask && this.unscheduledTaskBy !== 'duration') {
122
- this.drawUnscheduledTask(taskGraphics, startPoint, cumulativeWidth, adjustHeight);
139
+ if (!isNullOrUndefined(taskbar.indicators) && taskbar.indicators.length > 0) {
140
+ taskbar.indicators.map(function (items, index) {
141
+ var currendate = _this.parent.dateValidationModule.getDateFromFormat(items.date, true);
142
+ if (detail.startDate <= currendate && currendate <= detail.endDate) {
143
+ var leftValue = _this.parent.chartRowsModule.getIndicatorleft(items.date);
144
+ if (!isNullOrUndefined(items.base64)) {
145
+ var image = new PdfBitmap(items.base64);
146
+ if (_this.isAutoFit()) {
147
+ taskGraphics.drawImage(image, startPoint.x + (leftValue - cumulativeWidth) + 0.5 + 10, startPoint.y + adjustHeight_1, imageSize_1, imageSize_1);
148
+ taskGraphics.drawString(items.name, new PdfStandardFont(PdfFontFamily.Helvetica, 10), null, PdfBrushes.Black, startPoint.x + (leftValue - cumulativeWidth) + 0.5 + 10 + imageSize_1, startPoint.y + adjustHeight_1, null);
149
+ }
150
+ else {
151
+ taskGraphics.drawImage(image, startPoint.x + pixelToPoint(leftValue - cumulativeWidth) + 0.5 + 10, startPoint.y + adjustHeight_1, imageSize_1, imageSize_1);
152
+ taskGraphics.drawString(items.name, new PdfStandardFont(PdfFontFamily.Helvetica, 10), null, PdfBrushes.Black, startPoint.x + pixelToPoint(leftValue - cumulativeWidth) + 0.5 + 10 + imageSize_1, startPoint.y + adjustHeight_1, null);
153
+ }
154
+ }
155
+ }
156
+ });
157
+ }
158
+ if (!this.isScheduledTask && this.unscheduledTaskBy === 'duration') {
159
+ var brush1 = void 0;
160
+ var brush2 = void 0;
161
+ if (this.isAutoFit()) {
162
+ brush1 = new PdfLinearGradientBrush(new PointF(startPoint.x + (this.left - cumulativeWidth) + 0.5 + (taskbar.width) / 2, 0), new PointF(startPoint.x + (this.left - cumulativeWidth), 0), new PdfColor(taskbar.unscheduledTaskBarColor), new PdfColor(255, 255, 255));
163
+ taskGraphics.drawRectangle(brush1, startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, (taskbar.width), pixelToPoint(taskbar.height));
164
+ brush2 = new PdfLinearGradientBrush(new PointF(startPoint.x + (this.left - cumulativeWidth) + 0.5 + (taskbar.width), 0), new PointF(startPoint.x + (this.left - cumulativeWidth) + (taskbar.width) / 2, 0), new PdfColor(255, 255, 255), new PdfColor(taskbar.unscheduledTaskBarColor));
165
+ //Draw rectangle to fill linear gradient color
166
+ taskGraphics.drawRectangle(brush2, startPoint.x + (this.left - cumulativeWidth) + 0.5 + (taskbar.width) / 2, startPoint.y + adjustHeight_1, (taskbar.width) / 2, pixelToPoint(taskbar.height));
167
+ }
168
+ else {
169
+ brush1 = new PdfLinearGradientBrush(new PointF(startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5 + pixelToPoint(taskbar.width) / 2, 0), new PointF(startPoint.x + pixelToPoint(this.left - cumulativeWidth), 0), new PdfColor(taskbar.unscheduledTaskBarColor), new PdfColor(255, 255, 255));
170
+ taskGraphics.drawRectangle(brush1, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
171
+ brush2 = new PdfLinearGradientBrush(new PointF(startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5 + pixelToPoint(taskbar.width), 0), new PointF(startPoint.x + pixelToPoint(this.left - cumulativeWidth) + pixelToPoint(taskbar.width) / 2, 0), new PdfColor(255, 255, 255), new PdfColor(taskbar.unscheduledTaskBarColor));
172
+ //Draw rectangle to fill linear gradient color
173
+ taskGraphics.drawRectangle(brush2, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5 + pixelToPoint(taskbar.width) / 2, startPoint.y + adjustHeight_1, pixelToPoint(taskbar.width) / 2, pixelToPoint(taskbar.height));
174
+ }
175
+ }
176
+ else if (!this.isScheduledTask && this.unscheduledTaskBy === "endDate") {
177
+ this.drawUnscheduledTask(taskGraphics, startPoint, cumulativeWidth, adjustHeight_1);
178
+ }
179
+ else if (!this.isScheduledTask && this.unscheduledTaskBy !== 'duration') {
180
+ this.drawUnscheduledTask(taskGraphics, startPoint, cumulativeWidth, adjustHeight_1);
123
181
  }
124
182
  else {
125
183
  if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
126
- 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));
184
+ if (this.isAutoFit()) {
185
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + (taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height + 3), (this.baselineWidth), pixelToPoint(this.baselineHeight));
186
+ }
187
+ else {
188
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height + 3), pixelToPoint(this.baselineWidth), pixelToPoint(this.baselineHeight));
189
+ }
190
+ }
191
+ if (taskbar.isSpliterTask) {
192
+ splitline.dashStyle = PdfDashStyle.Dot;
193
+ if (this.isAutoFit()) {
194
+ taskGraphics.drawLine(splitline, new PointF(startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height / 2)), new PointF((taskbar.width) + startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height / 2)));
195
+ }
196
+ else {
197
+ taskGraphics.drawLine(splitline, new PointF(startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height / 2)), new PointF(pixelToPoint(taskbar.width) + startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height / 2)));
198
+ }
199
+ taskbar.segment.map(function (data) {
200
+ if (_this.isAutoFit()) {
201
+ taskGraphics.drawRectangle(taskbarPen_1, taskBrush_1, startPoint.x + (_this.left + data.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, (data.width), pixelToPoint(taskbar.height));
202
+ }
203
+ else {
204
+ taskGraphics.drawRectangle(taskbarPen_1, taskBrush_1, startPoint.x + pixelToPoint(_this.left + data.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, pixelToPoint(data.width), pixelToPoint(taskbar.height));
205
+ }
206
+ });
207
+ }
208
+ else if (!taskbar.isAutoSchedule && taskbar.isParentTask) {
209
+ taskGraphics.save();
210
+ var path = new PdfPath();
211
+ path.addEllipse(0, 0, 5, 5);
212
+ if (this.isAutoFit()) {
213
+ taskGraphics.translateTransform(startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 - 2);
214
+ }
215
+ else {
216
+ taskGraphics.translateTransform(startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 - 2);
217
+ }
218
+ taskGraphics.drawPath(manualTaskbarPen, manuallineBrush, path);
219
+ taskGraphics.restore();
220
+ var path1 = new PdfPath();
221
+ path1.addEllipse(0, 0, 5, 5);
222
+ taskGraphics.save();
223
+ if (this.isAutoFit()) {
224
+ taskGraphics.translateTransform(startPoint.x + (this.left - cumulativeWidth) + 0.5 + (this.width), startPoint.y + adjustHeight_1 - 2);
225
+ }
226
+ else {
227
+ taskGraphics.translateTransform(startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5 + pixelToPoint(this.width), startPoint.y + adjustHeight_1 - 2);
228
+ }
229
+ taskGraphics.drawPath(manualTaskbarPen, manuallineBrush, path1);
230
+ taskGraphics.restore();
231
+ manualline.dashStyle = PdfDashStyle.Solid;
232
+ if (this.isAutoFit()) {
233
+ taskGraphics.drawLine(manualline, new PointF(startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1), new PointF((taskbar.width) + startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1));
234
+ }
235
+ else {
236
+ taskGraphics.drawLine(manualline, new PointF(startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1), new PointF(pixelToPoint(taskbar.width) + startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1));
237
+ }
238
+ }
239
+ else if (!taskbar.isAutoSchedule && !taskbar.isParentTask) {
240
+ taskGraphics.save();
241
+ taskGraphics.setTransparency(0.87);
242
+ if (this.isAutoFit()) {
243
+ taskGraphics.drawRectangle(manualChildBorderPen, manualChildBrush, startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, (taskbar.width), pixelToPoint(taskbar.height));
244
+ }
245
+ else {
246
+ taskGraphics.drawRectangle(manualChildBorderPen, manualChildBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
247
+ }
248
+ taskGraphics.restore();
249
+ if (this.isAutoFit()) {
250
+ taskGraphics.drawRectangle(null, manualChildProgressBrush, startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, (taskbar.progressWidth), pixelToPoint(this.height));
251
+ }
252
+ else {
253
+ taskGraphics.drawRectangle(null, manualChildProgressBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, pixelToPoint(taskbar.progressWidth), pixelToPoint(this.height));
254
+ }
255
+ }
256
+ else {
257
+ if (this.isAutoFit()) {
258
+ taskGraphics.drawRectangle(taskbarPen_1, taskBrush_1, startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, (taskbar.width), pixelToPoint(taskbar.height));
259
+ }
260
+ else {
261
+ taskGraphics.drawRectangle(taskbarPen_1, taskBrush_1, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
262
+ }
127
263
  }
128
- taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
129
- if (this.isScheduledTask) {
130
- taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(taskbar.progressWidth), pixelToPoint(taskbar.height));
264
+ if (this.isScheduledTask && taskbar.isAutoSchedule && !taskbar.isSpliterTask) {
265
+ if (this.isAutoFit()) {
266
+ taskGraphics.drawRectangle(progressPen_1, progressBrush_1, startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, (taskbar.progressWidth), pixelToPoint(taskbar.height));
267
+ }
268
+ else {
269
+ taskGraphics.drawRectangle(progressPen_1, progressBrush_1, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, pixelToPoint(taskbar.progressWidth), pixelToPoint(taskbar.height));
270
+ }
131
271
  if (!isNullOrUndefined(this.parent.labelSettings.taskLabel) && !isNullOrUndefined(this.taskLabel)) {
132
272
  updatedWidth = this.progressWidth;
133
273
  if (isLabelString) {
134
274
  updatedWidth = this.width;
135
275
  }
136
- taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth), startPoint.y + adjustHeight, pixelToPoint(updatedWidth), pixelToPoint(this.height), progressFormat);
276
+ if (this.isAutoFit()) {
277
+ taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + (this.left - cumulativeWidth), startPoint.y + adjustHeight_1, (updatedWidth), pixelToPoint(this.height), progressFormat);
278
+ }
279
+ else {
280
+ taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth), startPoint.y + adjustHeight_1, pixelToPoint(updatedWidth), pixelToPoint(this.height), progressFormat);
281
+ }
137
282
  }
138
283
  }
284
+ else if (taskbar.isSpliterTask) {
285
+ taskbar.segment.map(function (data) {
286
+ if (_this.isAutoFit()) {
287
+ taskGraphics.drawRectangle(progressPen_1, progressBrush_1, startPoint.x + (_this.left + data.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, (data.progressWidth), pixelToPoint(taskbar.height));
288
+ }
289
+ else {
290
+ taskGraphics.drawRectangle(progressPen_1, progressBrush_1, startPoint.x + pixelToPoint(_this.left + data.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, pixelToPoint(data.progressWidth), pixelToPoint(taskbar.height));
291
+ }
292
+ });
293
+ }
139
294
  }
140
295
  this.isCompleted = true;
141
296
  this.startPage = pageIndex;
@@ -147,37 +302,232 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
147
302
  this.taskStartPoint = __assign({}, startPoint);
148
303
  this.isStartPoint = true;
149
304
  }
150
- var renderWidth = 0;
305
+ if (!isNullOrUndefined(taskbar.indicators) && taskbar.indicators.length > 0) {
306
+ taskbar.indicators.map(function (items, index) {
307
+ var currendate = _this.parent.dateValidationModule.getDateFromFormat(items.date, true);
308
+ if (detail.startDate <= currendate && currendate <= detail.endDate) {
309
+ var leftValue = _this.parent.chartRowsModule.getIndicatorleft(items.date);
310
+ if (!isNullOrUndefined(items.base64)) {
311
+ var image = new PdfBitmap(items.base64);
312
+ if (_this.isAutoFit()) {
313
+ taskGraphics.drawImage(image, startPoint.x + (leftValue - cumulativeWidth) + 0.5 + 10, startPoint.y + adjustHeight_1, imageSize_1, imageSize_1);
314
+ taskGraphics.drawString(items.name, new PdfStandardFont(PdfFontFamily.Helvetica, 10), null, PdfBrushes.Black, startPoint.x + (leftValue - cumulativeWidth) + 0.5 + 10 + imageSize_1, startPoint.y + adjustHeight_1, null);
315
+ }
316
+ else {
317
+ taskGraphics.drawImage(image, startPoint.x + pixelToPoint(leftValue - cumulativeWidth) + 0.5 + 10, startPoint.y + adjustHeight_1, imageSize_1, imageSize_1);
318
+ taskGraphics.drawString(items.name, new PdfStandardFont(PdfFontFamily.Helvetica, 10), null, PdfBrushes.Black, startPoint.x + pixelToPoint(leftValue - cumulativeWidth) + 0.5 + 10 + imageSize_1, startPoint.y + adjustHeight_1, null);
319
+ }
320
+ }
321
+ }
322
+ });
323
+ }
324
+ var renderWidth_1 = 0;
325
+ var splitRenderwidth_1 = 0;
151
326
  if (!isLabelString) {
152
327
  this.width = this.width - (detail.totalWidth - (this.left - cumulativeWidth));
153
328
  }
154
- renderWidth = (detail.totalWidth - (this.left - cumulativeWidth));
155
- if (!this.isScheduledTask && this.unscheduledTaskBy !== 'duration') {
156
- this.drawUnscheduledTask(taskGraphics, startPoint, cumulativeWidth, adjustHeight);
329
+ renderWidth_1 = (detail.totalWidth - (this.left - cumulativeWidth));
330
+ splitRenderwidth_1 = renderWidth_1;
331
+ if (!this.isScheduledTask && this.unscheduledTaskBy === 'duration') {
332
+ var brush1 = void 0;
333
+ var brush2 = void 0;
334
+ if (this.isAutoFit()) {
335
+ brush1 = new PdfLinearGradientBrush(new PointF(startPoint.x + (this.left - cumulativeWidth) + 0.5 + (renderWidth_1) / 2, 0), new PointF(startPoint.x + (this.left - cumulativeWidth), 0), new PdfColor(taskbar.unscheduledTaskBarColor), new PdfColor(255, 255, 255));
336
+ taskGraphics.drawRectangle(brush1, startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, (renderWidth_1), pixelToPoint(taskbar.height));
337
+ brush2 = new PdfLinearGradientBrush(new PointF(startPoint.x + (this.left - cumulativeWidth) + 0.5 + (renderWidth_1), 0), new PointF(startPoint.x + (this.left - cumulativeWidth) + (renderWidth_1) / 2, 0), new PdfColor(255, 255, 255), new PdfColor(taskbar.unscheduledTaskBarColor));
338
+ taskGraphics.drawRectangle(brush2, startPoint.x + (this.left - cumulativeWidth) + 0.5 + (renderWidth_1) / 2, startPoint.y + adjustHeight_1, (renderWidth_1) / 2, pixelToPoint(taskbar.height));
339
+ }
340
+ else {
341
+ brush1 = new PdfLinearGradientBrush(new PointF(startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5 + pixelToPoint(renderWidth_1) / 2, 0), new PointF(startPoint.x + pixelToPoint(this.left - cumulativeWidth), 0), new PdfColor(taskbar.unscheduledTaskBarColor), new PdfColor(255, 255, 255));
342
+ taskGraphics.drawRectangle(brush1, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, pixelToPoint(renderWidth_1), pixelToPoint(taskbar.height));
343
+ brush2 = new PdfLinearGradientBrush(new PointF(startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5 + pixelToPoint(renderWidth_1), 0), new PointF(startPoint.x + pixelToPoint(this.left - cumulativeWidth) + pixelToPoint(renderWidth_1) / 2, 0), new PdfColor(255, 255, 255), new PdfColor(taskbar.unscheduledTaskBarColor));
344
+ taskGraphics.drawRectangle(brush2, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5 + pixelToPoint(renderWidth_1) / 2, startPoint.y + adjustHeight_1, pixelToPoint(renderWidth_1) / 2, pixelToPoint(taskbar.height));
345
+ }
346
+ }
347
+ else if (!this.isScheduledTask && this.unscheduledTaskBy !== 'duration') {
348
+ this.drawUnscheduledTask(taskGraphics, startPoint, cumulativeWidth, adjustHeight_1);
349
+ }
350
+ else if (!taskbar.isAutoSchedule && taskbar.isParentTask) {
351
+ taskGraphics.save();
352
+ var path = new PdfPath();
353
+ path.addEllipse(0, 0, 5, 5);
354
+ if (this.isAutoFit()) {
355
+ taskGraphics.translateTransform(startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 - 2);
356
+ }
357
+ else {
358
+ taskGraphics.translateTransform(startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 - 2);
359
+ }
360
+ taskGraphics.drawPath(manualTaskbarPen, manuallineBrush, path);
361
+ taskGraphics.restore();
362
+ manualline.dashStyle = PdfDashStyle.Solid;
363
+ if (this.isAutoFit()) {
364
+ taskGraphics.drawLine(manualline, new PointF(startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1), new PointF((renderWidth_1) + startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1));
365
+ }
366
+ else {
367
+ taskGraphics.drawLine(manualline, new PointF(startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1), new PointF(pixelToPoint(renderWidth_1) + startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1));
368
+ }
369
+ }
370
+ else if (!taskbar.isAutoSchedule && !taskbar.isParentTask) {
371
+ if (this.isAutoFit()) {
372
+ taskGraphics.drawRectangle(manualChildBorderPen, null, startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, (renderWidth_1), pixelToPoint(taskbar.height));
373
+ }
374
+ else {
375
+ taskGraphics.drawRectangle(manualChildBorderPen, null, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, pixelToPoint(renderWidth_1), pixelToPoint(taskbar.height));
376
+ }
377
+ taskGraphics.save();
378
+ taskGraphics.setTransparency(0.87);
379
+ if (this.isAutoFit()) {
380
+ taskGraphics.drawRectangle(null, manualChildBrush, startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, (renderWidth_1), pixelToPoint(taskbar.height));
381
+ }
382
+ else {
383
+ taskGraphics.drawRectangle(null, manualChildBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, pixelToPoint(renderWidth_1), pixelToPoint(taskbar.height));
384
+ }
385
+ taskGraphics.restore();
386
+ if (this.isAutoFit()) {
387
+ taskGraphics.drawRectangle(null, manualChildProgressBrush, startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, (taskbar.progressWidth), pixelToPoint(taskbar.height));
388
+ }
389
+ else {
390
+ taskGraphics.drawRectangle(null, manualChildProgressBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, pixelToPoint(taskbar.progressWidth), pixelToPoint(taskbar.height));
391
+ }
392
+ }
393
+ else if (!this.isScheduledTask && this.unscheduledTaskBy !== 'duration') {
394
+ this.drawUnscheduledTask(taskGraphics, startPoint, cumulativeWidth, adjustHeight_1);
395
+ }
396
+ else if (!this.isScheduledTask && this.unscheduledTaskBy === "endDate") {
397
+ this.drawUnscheduledTask(taskGraphics, startPoint, cumulativeWidth, adjustHeight_1);
157
398
  }
158
399
  else {
159
400
  if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
160
- 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));
401
+ if (this.isAutoFit()) {
402
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + (taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height + 3), (this.baselineWidth), pixelToPoint(this.baselineHeight));
403
+ }
404
+ else {
405
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height + 3), pixelToPoint(this.baselineWidth), pixelToPoint(this.baselineHeight));
406
+ }
407
+ }
408
+ if (taskbar.isSpliterTask) {
409
+ var pervwidth_1 = 0;
410
+ var valueChangeBlocker_1 = true;
411
+ var lineWidth_1 = 0;
412
+ taskbar.segment.map(function (item) {
413
+ lineWidth_1 = item.left + item.width;
414
+ });
415
+ splitline.dashStyle = PdfDashStyle.Dot;
416
+ if (this.isAutoFit()) {
417
+ taskGraphics.drawLine(splitline, new PointF(startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height / 2)), new PointF((lineWidth_1) + (this.left - cumulativeWidth) + startPoint.x, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height / 2)));
418
+ }
419
+ else {
420
+ taskGraphics.drawLine(splitline, new PointF(startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height / 2)), new PointF(pixelToPoint(lineWidth_1) + pixelToPoint(this.left - cumulativeWidth) + startPoint.x, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height / 2)));
421
+ }
422
+ taskbar.segment.map(function (data, index) {
423
+ if (_this.isAutoFit()) {
424
+ taskGraphics.drawRectangle(taskbarPen_1, taskBrush_1, startPoint.x + (_this.left - cumulativeWidth) + 0.5 + (data.left), startPoint.y + adjustHeight_1, (data.width), pixelToPoint(taskbar.height));
425
+ }
426
+ else {
427
+ taskGraphics.drawRectangle(taskbarPen_1, taskBrush_1, startPoint.x + pixelToPoint(_this.left - cumulativeWidth) + 0.5 + pixelToPoint(data.left), startPoint.y + adjustHeight_1, pixelToPoint(data.width), pixelToPoint(taskbar.height));
428
+ }
429
+ pervwidth_1 = data.left + data.width;
430
+ if (renderWidth_1 >= pervwidth_1) {
431
+ _this.segmentCollection[index].width = 0;
432
+ _this.segmentCollection[index].left = 0;
433
+ }
434
+ else {
435
+ if (renderWidth_1 >= (pervwidth_1 - data.width)) {
436
+ _this.segmentCollection[index].left = 0;
437
+ }
438
+ else {
439
+ _this.segmentCollection[index].left = ((splitRenderwidth_1 - data.left));
440
+ }
441
+ if (renderWidth_1 >= (pervwidth_1)) {
442
+ _this.segmentCollection[index].width = 0;
443
+ }
444
+ else {
445
+ if (valueChangeBlocker_1) {
446
+ _this.segmentCollection[index].width = pervwidth_1 - renderWidth_1;
447
+ valueChangeBlocker_1 = false;
448
+ }
449
+ }
450
+ }
451
+ splitRenderwidth_1 = splitRenderwidth_1 + data.width + data.left;
452
+ });
453
+ }
454
+ else {
455
+ if (this.isAutoFit()) {
456
+ taskGraphics.drawRectangle(taskbarPen_1, taskBrush_1, startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, (renderWidth_1), pixelToPoint(taskbar.height));
457
+ }
458
+ else {
459
+ taskGraphics.drawRectangle(taskbarPen_1, taskBrush_1, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, pixelToPoint(renderWidth_1), pixelToPoint(taskbar.height));
460
+ }
461
+ if (taskbar.isAutoSchedule && !taskbar.isSpliterTask) {
462
+ var progressBoundsWidth = 0;
463
+ if (this.progressWidth <= renderWidth_1) {
464
+ progressBoundsWidth = this.progressWidth;
465
+ }
466
+ else {
467
+ progressBoundsWidth = renderWidth_1;
468
+ }
469
+ if (this.isAutoFit()) {
470
+ taskGraphics.drawRectangle(progressPen_1, progressBrush_1, startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, (progressBoundsWidth), pixelToPoint(taskbar.height));
471
+ }
472
+ else {
473
+ taskGraphics.drawRectangle(progressPen_1, progressBrush_1, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, pixelToPoint(progressBoundsWidth), pixelToPoint(taskbar.height));
474
+ }
475
+ this.progressWidth -= progressBoundsWidth;
476
+ if (this.parent.labelSettings.taskLabel && !isNullOrUndefined(this.taskLabel)) {
477
+ updatedWidth = progressBoundsWidth;
478
+ if (isLabelString) {
479
+ updatedWidth = this.width;
480
+ }
481
+ taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth), (startPoint.y + adjustHeight_1), pixelToPoint(updatedWidth), pixelToPoint(this.height), progressFormat);
482
+ }
483
+ }
161
484
  }
162
- taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(renderWidth), pixelToPoint(taskbar.height));
163
- if (this.isScheduledTask) {
485
+ if (taskbar.isSpliterTask && taskbar.isAutoSchedule && !taskbar.isSpliterTask) {
164
486
  var progressBoundsWidth = 0;
165
- if (this.progressWidth <= renderWidth) {
487
+ if (this.progressWidth <= renderWidth_1) {
166
488
  progressBoundsWidth = this.progressWidth;
167
489
  }
168
490
  else {
169
- progressBoundsWidth = renderWidth;
491
+ progressBoundsWidth = renderWidth_1;
492
+ }
493
+ if (this.isAutoFit()) {
494
+ taskGraphics.drawRectangle(progressPen_1, progressBrush_1, startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, (progressBoundsWidth), pixelToPoint(taskbar.height));
495
+ }
496
+ else {
497
+ taskGraphics.drawRectangle(progressPen_1, progressBrush_1, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, pixelToPoint(progressBoundsWidth), pixelToPoint(taskbar.height));
170
498
  }
171
- taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(progressBoundsWidth), pixelToPoint(taskbar.height));
172
499
  this.progressWidth -= progressBoundsWidth;
173
500
  if (this.parent.labelSettings.taskLabel && !isNullOrUndefined(this.taskLabel)) {
174
501
  updatedWidth = progressBoundsWidth;
175
502
  if (isLabelString) {
176
503
  updatedWidth = this.width;
177
504
  }
178
- taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth), (startPoint.y + adjustHeight), pixelToPoint(updatedWidth), pixelToPoint(this.height), progressFormat);
505
+ if (this.isAutoFit()) {
506
+ taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + (this.left - cumulativeWidth), (startPoint.y + adjustHeight_1), (updatedWidth), pixelToPoint(this.height), progressFormat);
507
+ }
508
+ else {
509
+ taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth), (startPoint.y + adjustHeight_1), pixelToPoint(updatedWidth), pixelToPoint(this.height), progressFormat);
510
+ }
179
511
  }
180
512
  }
513
+ else if (taskbar.isSpliterTask) {
514
+ taskbar.segment.map(function (data, index) {
515
+ if (_this.isAutoFit()) {
516
+ taskGraphics.drawRectangle(progressPen_1, progressBrush_1, startPoint.x + (_this.left + data.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, (data.progressWidth), pixelToPoint(taskbar.height));
517
+ }
518
+ else {
519
+ taskGraphics.drawRectangle(progressPen_1, progressBrush_1, startPoint.x + pixelToPoint(_this.left + data.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, pixelToPoint(data.progressWidth), pixelToPoint(taskbar.height));
520
+ }
521
+ if (_this.segmentCollection[index].width === 0) {
522
+ _this.segmentCollection[index].progressWidth = 0;
523
+ }
524
+ else {
525
+ if (data.width - _this.segmentCollection[index].width < data.progressWidth && data.width !== _this.segmentCollection[index].width) {
526
+ _this.segmentCollection[index].progressWidth = data.progressWidth - (data.width - _this.segmentCollection[index].width);
527
+ }
528
+ }
529
+ });
530
+ }
181
531
  }
182
532
  this.left = 0;
183
533
  this.isCompleted = false;
@@ -189,20 +539,152 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
189
539
  this.taskStartPoint = __assign({}, startPoint);
190
540
  this.isStartPoint = true;
191
541
  }
542
+ if (!isNullOrUndefined(taskbar.indicators) && taskbar.indicators.length > 0) {
543
+ taskbar.indicators.map(function (items, index) {
544
+ var currendate = _this.parent.dateValidationModule.getDateFromFormat(items.date, true);
545
+ if (detail.startDate <= currendate && currendate <= detail.endDate) {
546
+ var leftValue = _this.parent.chartRowsModule.getIndicatorleft(items.date);
547
+ if (!isNullOrUndefined(items.base64)) {
548
+ var image = new PdfBitmap(items.base64);
549
+ if (_this.isAutoFit()) {
550
+ taskGraphics.drawImage(image, startPoint.x + (leftValue - cumulativeWidth) + 0.5 + 10, startPoint.y + adjustHeight_1, imageSize_1, imageSize_1);
551
+ taskGraphics.drawString(items.name, new PdfStandardFont(PdfFontFamily.Helvetica, 10), null, PdfBrushes.Black, startPoint.x + (leftValue - cumulativeWidth) + 0.5 + 10 + imageSize_1, startPoint.y + adjustHeight_1, null);
552
+ }
553
+ else {
554
+ taskGraphics.drawImage(image, startPoint.x + pixelToPoint(leftValue - cumulativeWidth) + 0.5 + 10, startPoint.y + adjustHeight_1, imageSize_1, imageSize_1);
555
+ taskGraphics.drawString(items.name, new PdfStandardFont(PdfFontFamily.Helvetica, 10), null, PdfBrushes.Black, startPoint.x + pixelToPoint(leftValue - cumulativeWidth) + 0.5 + 10 + imageSize_1, startPoint.y + adjustHeight_1, null);
556
+ }
557
+ }
558
+ }
559
+ });
560
+ }
192
561
  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));
562
+ if (this.isAutoFit()) {
563
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + (taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height + 3), (this.baselineWidth), pixelToPoint(this.baselineHeight));
564
+ }
565
+ else {
566
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height + 3), pixelToPoint(this.baselineWidth), pixelToPoint(this.baselineHeight));
567
+ }
194
568
  }
195
- taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(taskbar.left + 0.5), startPoint.y + adjustHeight, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
196
- if (this.isScheduledTask) {
197
- taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(taskbar.left + 0.5), startPoint.y + adjustHeight, pixelToPoint(taskbar.progressWidth), pixelToPoint(taskbar.height));
569
+ if (!this.isScheduledTask && this.unscheduledTaskBy === 'duration') {
570
+ var brush1 = void 0;
571
+ var brush2 = void 0;
572
+ if (this.isAutoFit()) {
573
+ brush1 = new PdfLinearGradientBrush(new PointF(startPoint.x + (taskbar.left + 0.5) + (taskbar.width) / 2, 0), new PointF(startPoint.x + (taskbar.left + 0.5), 0), new PdfColor(taskbar.unscheduledTaskBarColor), new PdfColor(255, 255, 255));
574
+ taskGraphics.drawRectangle(brush1, startPoint.x + (taskbar.left + 0.5), startPoint.y + adjustHeight_1, (taskbar.width), pixelToPoint(taskbar.height));
575
+ brush2 = new PdfLinearGradientBrush(new PointF(startPoint.x + (taskbar.left + 0.5) + (taskbar.width), 0), new PointF(startPoint.x + (taskbar.left + 0.5) + (taskbar.width) / 2, 0), new PdfColor(255, 255, 255), new PdfColor(taskbar.unscheduledTaskBarColor));
576
+ taskGraphics.drawRectangle(brush2, startPoint.x + (taskbar.left + 0.5) + (taskbar.width) / 2, startPoint.y + adjustHeight_1, (taskbar.width) / 2, pixelToPoint(taskbar.height));
577
+ }
578
+ else {
579
+ brush1 = new PdfLinearGradientBrush(new PointF(startPoint.x + pixelToPoint(taskbar.left + 0.5) + pixelToPoint(taskbar.width) / 2, 0), new PointF(startPoint.x + pixelToPoint(taskbar.left + 0.5), 0), new PdfColor(taskbar.unscheduledTaskBarColor), new PdfColor(255, 255, 255));
580
+ taskGraphics.drawRectangle(brush1, startPoint.x + pixelToPoint(taskbar.left + 0.5), startPoint.y + adjustHeight_1, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
581
+ brush2 = new PdfLinearGradientBrush(new PointF(startPoint.x + pixelToPoint(taskbar.left + 0.5) + pixelToPoint(taskbar.width), 0), new PointF(startPoint.x + pixelToPoint(taskbar.left + 0.5) + pixelToPoint(taskbar.width) / 2, 0), new PdfColor(255, 255, 255), new PdfColor(taskbar.unscheduledTaskBarColor));
582
+ taskGraphics.drawRectangle(brush2, startPoint.x + pixelToPoint(taskbar.left + 0.5) + pixelToPoint(taskbar.width) / 2, startPoint.y + adjustHeight_1, pixelToPoint(taskbar.width) / 2, pixelToPoint(taskbar.height));
583
+ }
584
+ }
585
+ else if (!taskbar.isAutoSchedule && taskbar.isParentTask) {
586
+ var path1 = new PdfPath();
587
+ path1.addEllipse(0, 0, 5, 5);
588
+ taskGraphics.save();
589
+ if (this.isAutoFit()) {
590
+ taskGraphics.translateTransform(startPoint.x + (this.left - cumulativeWidth) + 0.5 + (this.width), startPoint.y + adjustHeight_1 - 2);
591
+ }
592
+ else {
593
+ taskGraphics.translateTransform(startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5 + pixelToPoint(this.width), startPoint.y + adjustHeight_1 - 2);
594
+ }
595
+ taskGraphics.drawPath(manualTaskbarPen, manuallineBrush, path1);
596
+ taskGraphics.restore();
597
+ manualline.dashStyle = PdfDashStyle.Solid;
598
+ if (this.isAutoFit()) {
599
+ taskGraphics.drawLine(manualline, new PointF(startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1), new PointF((taskbar.width) + startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1));
600
+ }
601
+ else {
602
+ taskGraphics.drawLine(manualline, new PointF(startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1), new PointF(pixelToPoint(taskbar.width) + startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1));
603
+ }
604
+ }
605
+ else if (!taskbar.isAutoSchedule && !taskbar.isParentTask) {
606
+ if (this.isAutoFit()) {
607
+ taskGraphics.drawRectangle(manualChildBorderPen, null, startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, (taskbar.width), pixelToPoint(taskbar.height));
608
+ }
609
+ else {
610
+ taskGraphics.drawRectangle(manualChildBorderPen, null, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
611
+ }
612
+ taskGraphics.save();
613
+ taskGraphics.setTransparency(0.87);
614
+ if (this.isAutoFit()) {
615
+ taskGraphics.drawRectangle(null, manualChildBrush, startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, (taskbar.width), pixelToPoint(taskbar.height));
616
+ }
617
+ else {
618
+ taskGraphics.drawRectangle(null, manualChildBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
619
+ }
620
+ taskGraphics.restore();
621
+ if (this.isAutoFit()) {
622
+ taskGraphics.drawRectangle(null, manualChildProgressBrush, startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, (taskbar.progressWidth), pixelToPoint(taskbar.height));
623
+ }
624
+ else {
625
+ taskGraphics.drawRectangle(null, manualChildProgressBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, pixelToPoint(taskbar.progressWidth), pixelToPoint(taskbar.height));
626
+ }
627
+ }
628
+ else if (!this.isScheduledTask && this.unscheduledTaskBy === "endDate") {
629
+ this.drawUnscheduledTask(taskGraphics, startPoint, cumulativeWidth, adjustHeight_1);
630
+ }
631
+ else if (taskbar.isSpliterTask) {
632
+ splitline.dashStyle = PdfDashStyle.Dot;
633
+ if (this.isAutoFit()) {
634
+ taskGraphics.drawLine(splitline, new PointF(startPoint.x + (this.left) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height / 2)), new PointF((taskbar.width) + startPoint.x + (this.left), startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height / 2)));
635
+ }
636
+ else {
637
+ taskGraphics.drawLine(splitline, new PointF(startPoint.x + pixelToPoint(this.left) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height / 2)), new PointF(pixelToPoint(taskbar.width) + startPoint.x + pixelToPoint(this.left), startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height / 2)));
638
+ }
639
+ taskbar.segmentCollection.map(function (data) {
640
+ if (data.width !== 0) {
641
+ if (_this.isAutoFit()) {
642
+ taskGraphics.drawRectangle(taskbarPen_1, taskBrush_1, startPoint.x + (taskbar.left + 0.5 + data.left), startPoint.y + adjustHeight_1, (data.width), pixelToPoint(taskbar.height));
643
+ }
644
+ else {
645
+ taskGraphics.drawRectangle(taskbarPen_1, taskBrush_1, startPoint.x + pixelToPoint(taskbar.left + 0.5 + data.left), startPoint.y + adjustHeight_1, pixelToPoint(data.width), pixelToPoint(taskbar.height));
646
+ }
647
+ }
648
+ });
649
+ }
650
+ else {
651
+ if (this.isAutoFit()) {
652
+ taskGraphics.drawRectangle(taskbarPen_1, taskBrush_1, startPoint.x + (taskbar.left + 0.5), startPoint.y + adjustHeight_1, (taskbar.width), pixelToPoint(taskbar.height));
653
+ }
654
+ else {
655
+ taskGraphics.drawRectangle(taskbarPen_1, taskBrush_1, startPoint.x + pixelToPoint(taskbar.left + 0.5), startPoint.y + adjustHeight_1, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
656
+ }
657
+ }
658
+ if (this.isScheduledTask && taskbar.isAutoSchedule && !taskbar.isSpliterTask) {
659
+ if (this.isAutoFit()) {
660
+ taskGraphics.drawRectangle(progressPen_1, progressBrush_1, startPoint.x + (taskbar.left + 0.5), startPoint.y + adjustHeight_1, (taskbar.progressWidth), pixelToPoint(taskbar.height));
661
+ }
662
+ else {
663
+ taskGraphics.drawRectangle(progressPen_1, progressBrush_1, startPoint.x + pixelToPoint(taskbar.left + 0.5), startPoint.y + adjustHeight_1, pixelToPoint(taskbar.progressWidth), pixelToPoint(taskbar.height));
664
+ }
198
665
  if (!isNullOrUndefined(this.taskLabel)) {
199
666
  updatedWidth = this.progressWidth;
200
667
  if (isLabelString) {
201
668
  updatedWidth = this.width;
202
669
  }
203
- taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left), (startPoint.y + adjustHeight), pixelToPoint(updatedWidth), pixelToPoint(this.height), progressFormat);
670
+ if (this.isAutoFit()) {
671
+ taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + (this.left), (startPoint.y + adjustHeight_1), (updatedWidth), pixelToPoint(this.height), progressFormat);
672
+ }
673
+ else {
674
+ taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left), (startPoint.y + adjustHeight_1), pixelToPoint(updatedWidth), pixelToPoint(this.height), progressFormat);
675
+ }
204
676
  }
205
677
  }
678
+ else if (taskbar.isSpliterTask) {
679
+ taskbar.segmentCollection.map(function (data) {
680
+ if (_this.isAutoFit()) {
681
+ taskGraphics.drawRectangle(progressPen_1, progressBrush_1, startPoint.x + (taskbar.left + 0.5 + data.left), startPoint.y + adjustHeight_1, (data.progressWidth), pixelToPoint(taskbar.height));
682
+ }
683
+ else {
684
+ taskGraphics.drawRectangle(progressPen_1, progressBrush_1, startPoint.x + pixelToPoint(taskbar.left + 0.5 + data.left), startPoint.y + adjustHeight_1, pixelToPoint(data.progressWidth), pixelToPoint(taskbar.height));
685
+ }
686
+ });
687
+ }
206
688
  this.isCompleted = true;
207
689
  this.endPage = pageIndex;
208
690
  }
@@ -213,10 +695,83 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
213
695
  this.taskStartPoint = __assign({}, startPoint);
214
696
  this.isStartPoint = true;
215
697
  }
698
+ if (!isNullOrUndefined(taskbar.indicators) && taskbar.indicators.length > 0) {
699
+ taskbar.indicators.map(function (items, index) {
700
+ var currendate = _this.parent.dateValidationModule.getDateFromFormat(items.date, true);
701
+ if (detail.startDate <= currendate && currendate <= detail.endDate) {
702
+ var leftValue = _this.parent.chartRowsModule.getIndicatorleft(items.date);
703
+ if (!isNullOrUndefined(items.base64)) {
704
+ var image = new PdfBitmap(items.base64);
705
+ if (_this.isAutoFit()) {
706
+ taskGraphics.drawImage(image, startPoint.x + (leftValue - cumulativeWidth) + 0.5 + 10, startPoint.y + adjustHeight_1, imageSize_1, imageSize_1);
707
+ taskGraphics.drawString(items.name, new PdfStandardFont(PdfFontFamily.Helvetica, 10), null, PdfBrushes.Black, startPoint.x + (leftValue - cumulativeWidth) + 0.5 + 10 + imageSize_1, startPoint.y + adjustHeight_1, null);
708
+ }
709
+ else {
710
+ taskGraphics.drawImage(image, startPoint.x + pixelToPoint(leftValue - cumulativeWidth) + 0.5 + 10, startPoint.y + adjustHeight_1, imageSize_1, imageSize_1);
711
+ taskGraphics.drawString(items.name, new PdfStandardFont(PdfFontFamily.Helvetica, 10), null, PdfBrushes.Black, startPoint.x + pixelToPoint(leftValue - cumulativeWidth) + 0.5 + 10 + imageSize_1, startPoint.y + adjustHeight_1, null);
712
+ }
713
+ }
714
+ }
715
+ });
716
+ }
216
717
  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));
718
+ if (this.isAutoFit()) {
719
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + (taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height + 3), (this.baselineWidth), pixelToPoint(this.baselineHeight));
720
+ }
721
+ else {
722
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + pixelToPoint(taskbar.height + 3), pixelToPoint(this.baselineWidth), pixelToPoint(this.baselineHeight));
723
+ }
724
+ }
725
+ if (!this.isScheduledTask && this.unscheduledTaskBy === 'duration') {
726
+ var brush1 = void 0;
727
+ var brush2 = void 0;
728
+ if (this.isAutoFit()) {
729
+ brush1 = new PdfLinearGradientBrush(new PointF(startPoint.x + (taskbar.left) + 0.5 + (detail.totalWidth) / 2, 0), new PointF(startPoint.x + (taskbar.left), 0), new PdfColor(taskbar.unscheduledTaskBarColor), new PdfColor(255, 255, 255));
730
+ taskGraphics.drawRectangle(brush1, startPoint.x + (taskbar.left) + 0.5, startPoint.y + adjustHeight_1, (detail.totalWidth), pixelToPoint(taskbar.height));
731
+ brush2 = new PdfLinearGradientBrush(new PointF(startPoint.x + (taskbar.left) + 0.5 + (detail.totalWidth), 0), new PointF(startPoint.x + (taskbar.left) + (detail.totalWidth) / 2, 0), new PdfColor(255, 255, 255), new PdfColor(taskbar.unscheduledTaskBarColor));
732
+ taskGraphics.drawRectangle(brush2, startPoint.x + (taskbar.left) + 0.5 + (detail.totalWidth) / 2, startPoint.y + adjustHeight_1, (detail.totalWidth) / 2, pixelToPoint(taskbar.height));
733
+ }
734
+ else {
735
+ brush1 = new PdfLinearGradientBrush(new PointF(startPoint.x + pixelToPoint(taskbar.left) + 0.5 + pixelToPoint(detail.totalWidth) / 2, 0), new PointF(startPoint.x + pixelToPoint(taskbar.left), 0), new PdfColor(taskbar.unscheduledTaskBarColor), new PdfColor(255, 255, 255));
736
+ taskGraphics.drawRectangle(brush1, startPoint.x + pixelToPoint(taskbar.left) + 0.5, startPoint.y + adjustHeight_1, pixelToPoint(detail.totalWidth), pixelToPoint(taskbar.height));
737
+ brush2 = new PdfLinearGradientBrush(new PointF(startPoint.x + pixelToPoint(taskbar.left) + 0.5 + pixelToPoint(detail.totalWidth), 0), new PointF(startPoint.x + pixelToPoint(taskbar.left) + pixelToPoint(detail.totalWidth) / 2, 0), new PdfColor(255, 255, 255), new PdfColor(taskbar.unscheduledTaskBarColor));
738
+ taskGraphics.drawRectangle(brush2, startPoint.x + pixelToPoint(taskbar.left) + 0.5 + pixelToPoint(detail.totalWidth) / 2, startPoint.y + adjustHeight_1, pixelToPoint(detail.totalWidth) / 2, pixelToPoint(taskbar.height));
739
+ }
740
+ }
741
+ else if (!this.isScheduledTask && this.unscheduledTaskBy === "endDate") {
742
+ this.drawUnscheduledTask(taskGraphics, startPoint, cumulativeWidth, adjustHeight_1);
743
+ }
744
+ else if (!taskbar.isAutoSchedule && !taskbar.isParentTask) {
745
+ if (this.isAutoFit()) {
746
+ taskGraphics.drawRectangle(manualChildBorderPen, null, startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, (detail.totalWidth), pixelToPoint(taskbar.height));
747
+ }
748
+ else {
749
+ taskGraphics.drawRectangle(manualChildBorderPen, null, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, pixelToPoint(detail.totalWidth), pixelToPoint(taskbar.height));
750
+ }
751
+ taskGraphics.save();
752
+ taskGraphics.setTransparency(0.87);
753
+ if (this.isAutoFit()) {
754
+ taskGraphics.drawRectangle(null, manualChildBrush, startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, (detail.totalWidth), pixelToPoint(taskbar.height));
755
+ }
756
+ else {
757
+ taskGraphics.drawRectangle(null, manualChildBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, pixelToPoint(detail.totalWidth), pixelToPoint(taskbar.height));
758
+ }
759
+ taskGraphics.restore();
760
+ if (this.isAutoFit()) {
761
+ taskGraphics.drawRectangle(null, manualChildProgressBrush, startPoint.x + (this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, (detail.totalWidth), pixelToPoint(taskbar.height));
762
+ }
763
+ else {
764
+ taskGraphics.drawRectangle(null, manualChildProgressBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1, pixelToPoint(detail.totalWidth), pixelToPoint(taskbar.height));
765
+ }
766
+ }
767
+ else {
768
+ if (this.isAutoFit()) {
769
+ taskGraphics.drawRectangle(taskbarPen_1, taskBrush_1, startPoint.x + (taskbar.left) + 0.5, startPoint.y + adjustHeight_1, (detail.totalWidth), pixelToPoint(taskbar.height));
770
+ }
771
+ else {
772
+ taskGraphics.drawRectangle(taskbarPen_1, taskBrush_1, startPoint.x + pixelToPoint(taskbar.left) + 0.5, startPoint.y + adjustHeight_1, pixelToPoint(detail.totalWidth), pixelToPoint(taskbar.height));
773
+ }
218
774
  }
219
- taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(taskbar.left) + 0.5, startPoint.y + adjustHeight, pixelToPoint(detail.totalWidth), pixelToPoint(taskbar.height));
220
775
  if (this.isScheduledTask) {
221
776
  var progressBoundsWidth = 0;
222
777
  if (this.progressWidth <= detail.totalWidth) {
@@ -225,19 +780,160 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
225
780
  else {
226
781
  progressBoundsWidth = detail.totalWidth;
227
782
  }
228
- taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(taskbar.left) + 0.5, startPoint.y + adjustHeight, pixelToPoint(progressBoundsWidth), pixelToPoint(taskbar.height));
783
+ if (this.isAutoFit()) {
784
+ taskGraphics.drawRectangle(progressPen_1, progressBrush_1, startPoint.x + (taskbar.left) + 0.5, startPoint.y + adjustHeight_1, (progressBoundsWidth), pixelToPoint(taskbar.height));
785
+ }
786
+ else {
787
+ taskGraphics.drawRectangle(progressPen_1, progressBrush_1, startPoint.x + pixelToPoint(taskbar.left) + 0.5, startPoint.y + adjustHeight_1, pixelToPoint(progressBoundsWidth), pixelToPoint(taskbar.height));
788
+ }
229
789
  this.progressWidth -= progressBoundsWidth;
230
790
  if (!isNullOrUndefined(this.taskLabel)) {
231
791
  updatedWidth = progressBoundsWidth;
232
792
  if (isLabelString) {
233
793
  updatedWidth = this.width;
234
794
  }
235
- taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left), (startPoint.y + adjustHeight), pixelToPoint(updatedWidth), pixelToPoint(this.height), progressFormat);
795
+ if (this.isAutoFit()) {
796
+ taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + (this.left), (startPoint.y + adjustHeight_1), (updatedWidth), pixelToPoint(this.height), progressFormat);
797
+ }
798
+ else {
799
+ taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left), (startPoint.y + adjustHeight_1), pixelToPoint(updatedWidth), pixelToPoint(this.height), progressFormat);
800
+ }
236
801
  }
237
802
  }
238
803
  this.isCompleted = false;
239
804
  this.width -= detail.totalWidth;
240
805
  }
806
+ if (!this.isAutoSchedule && taskbar.isParentTask) {
807
+ if (detail.startDate <= taskbar.autoStartDate && taskbar.autoEndDate <= detail.endDate) {
808
+ if (!this.isStartPoint) {
809
+ this.taskStartPoint = __assign({}, startPoint);
810
+ this.isStartPoint = true;
811
+ }
812
+ if (!taskbar.isAutoSchedule && taskbar.isParentTask) {
813
+ if (this.isAutoFit()) {
814
+ taskGraphics.drawRectangle(manualParentBorderPen, null, startPoint.x + (this.autoLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + 10, (this.autoWidth), pixelToPoint(12));
815
+ }
816
+ else {
817
+ taskGraphics.drawRectangle(manualParentBorderPen, null, startPoint.x + pixelToPoint(this.autoLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + 10, pixelToPoint(this.autoWidth), pixelToPoint(12));
818
+ }
819
+ taskGraphics.save();
820
+ taskGraphics.setTransparency(0.87);
821
+ if (this.isAutoFit()) {
822
+ taskGraphics.drawRectangle(null, manualBrush, startPoint.x + (this.autoLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + 10, (this.autoWidth), pixelToPoint(12));
823
+ }
824
+ else {
825
+ taskGraphics.drawRectangle(null, manualBrush, startPoint.x + pixelToPoint(this.autoLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + 10, pixelToPoint(this.autoWidth), pixelToPoint(12));
826
+ }
827
+ taskGraphics.restore();
828
+ if (this.isAutoFit()) {
829
+ taskGraphics.drawRectangle(null, manualProgressBrush, startPoint.x + (this.autoLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + 10, (taskbar.progressWidth), pixelToPoint(12));
830
+ }
831
+ else {
832
+ taskGraphics.drawRectangle(null, manualProgressBrush, startPoint.x + pixelToPoint(this.autoLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + 10, pixelToPoint(taskbar.progressWidth), pixelToPoint(12));
833
+ }
834
+ }
835
+ this.isCompletedAutotask = true;
836
+ this.startPage = pageIndex;
837
+ this.endPage = pageIndex;
838
+ }
839
+ else if (detail.startDate <= taskbar.autoStartDate && detail.endDate >= taskbar.autoStartDate && (taskbar.autoEndDate >= detail.endDate)) {
840
+ if (!this.isStartPoint) {
841
+ this.taskStartPoint = __assign({}, startPoint);
842
+ this.isStartPoint = true;
843
+ }
844
+ var renderWidth = 0;
845
+ renderWidth = (detail.totalWidth - (this.autoLeft - cumulativeWidth));
846
+ if (!taskbar.isAutoSchedule && taskbar.isParentTask) {
847
+ if (this.isAutoFit()) {
848
+ taskGraphics.drawRectangle(manualParentBorderPen, null, startPoint.x + (this.autoLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + 10, (renderWidth), pixelToPoint(12));
849
+ }
850
+ else {
851
+ taskGraphics.drawRectangle(manualParentBorderPen, null, startPoint.x + pixelToPoint(this.autoLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + 10, pixelToPoint(renderWidth), pixelToPoint(12));
852
+ }
853
+ taskGraphics.save();
854
+ taskGraphics.setTransparency(0.87);
855
+ if (this.isAutoFit()) {
856
+ taskGraphics.drawRectangle(null, manualBrush, startPoint.x + (this.autoLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + 10, (renderWidth), pixelToPoint(12));
857
+ }
858
+ else {
859
+ taskGraphics.drawRectangle(null, manualBrush, startPoint.x + pixelToPoint(this.autoLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + 10, pixelToPoint(renderWidth), pixelToPoint(12));
860
+ }
861
+ taskGraphics.restore();
862
+ if (this.isAutoFit()) {
863
+ taskGraphics.drawRectangle(null, manualProgressBrush, startPoint.x + (this.autoLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + 10, (taskbar.progressWidth), pixelToPoint(12));
864
+ }
865
+ else {
866
+ taskGraphics.drawRectangle(null, manualProgressBrush, startPoint.x + pixelToPoint(this.autoLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + 10, pixelToPoint(taskbar.progressWidth), pixelToPoint(12));
867
+ }
868
+ taskbar.autoWidth = taskbar.autoWidth - renderWidth;
869
+ }
870
+ this.autoLeft = 0;
871
+ this.isCompletedAutotask = false;
872
+ this.startPage = pageIndex;
873
+ }
874
+ else if (taskbar.autoEndDate <= detail.endDate && detail.startDate <= taskbar.autoEndDate && !this.isCompletedAutotask) {
875
+ if (!this.isStartPoint) {
876
+ this.taskStartPoint = __assign({}, startPoint);
877
+ this.isStartPoint = true;
878
+ }
879
+ else if (!taskbar.isAutoSchedule && taskbar.isParentTask) {
880
+ if (this.isAutoFit()) {
881
+ taskGraphics.drawRectangle(manualParentBorderPen, null, startPoint.x + (this.autoLeft + 0.5), startPoint.y + adjustHeight_1 + 10, (taskbar.autoWidth), pixelToPoint(12));
882
+ }
883
+ else {
884
+ taskGraphics.drawRectangle(manualParentBorderPen, null, startPoint.x + pixelToPoint(this.autoLeft + 0.5), startPoint.y + adjustHeight_1 + 10, pixelToPoint(taskbar.autoWidth), pixelToPoint(12));
885
+ }
886
+ taskGraphics.save();
887
+ taskGraphics.setTransparency(0.87);
888
+ if (this.isAutoFit()) {
889
+ taskGraphics.drawRectangle(null, manualBrush, startPoint.x + (this.autoLeft + 0.5), startPoint.y + adjustHeight_1 + 10, (taskbar.autoWidth), pixelToPoint(12));
890
+ }
891
+ else {
892
+ taskGraphics.drawRectangle(null, manualBrush, startPoint.x + pixelToPoint(this.autoLeft + 0.5), startPoint.y + adjustHeight_1 + 10, pixelToPoint(taskbar.autoWidth), pixelToPoint(12));
893
+ }
894
+ taskGraphics.restore();
895
+ if (this.isAutoFit()) {
896
+ taskGraphics.drawRectangle(null, manualProgressBrush, startPoint.x + (this.autoLeft + 0.5), startPoint.y + adjustHeight_1 + 10, (taskbar.progressWidth), pixelToPoint(12));
897
+ }
898
+ else {
899
+ taskGraphics.drawRectangle(null, manualProgressBrush, startPoint.x + pixelToPoint(this.autoLeft + 0.5), startPoint.y + adjustHeight_1 + 10, pixelToPoint(taskbar.progressWidth), pixelToPoint(12));
900
+ }
901
+ }
902
+ this.isCompletedAutotask = true;
903
+ this.endPage = pageIndex;
904
+ }
905
+ else if (taskbar.autoStartDate < detail.startDate && taskbar.autoEndDate > detail.endDate) {
906
+ if (!this.isStartPoint) {
907
+ this.taskStartPoint = __assign({}, startPoint);
908
+ this.isStartPoint = true;
909
+ }
910
+ if (!taskbar.isAutoSchedule && taskbar.isParentTask) {
911
+ if (this.isAutoFit()) {
912
+ taskGraphics.drawRectangle(manualParentBorderPen, null, startPoint.x + (this.autoLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + 10, (detail.totalWidth), pixelToPoint(12));
913
+ }
914
+ else {
915
+ taskGraphics.drawRectangle(manualParentBorderPen, null, startPoint.x + pixelToPoint(this.autoLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + 10, pixelToPoint(detail.totalWidth), pixelToPoint(12));
916
+ }
917
+ taskGraphics.save();
918
+ taskGraphics.setTransparency(0.87);
919
+ if (this.isAutoFit()) {
920
+ taskGraphics.drawRectangle(null, manualBrush, startPoint.x + (this.autoLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + 10, (detail.totalWidth), pixelToPoint(12));
921
+ }
922
+ else {
923
+ taskGraphics.drawRectangle(null, manualBrush, startPoint.x + pixelToPoint(this.autoLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight_1 + 10, pixelToPoint(detail.totalWidth), pixelToPoint(12));
924
+ }
925
+ taskGraphics.restore();
926
+ if (this.isAutoFit()) {
927
+ taskGraphics.drawRectangle(null, manualProgressBrush, startPoint.x + (this.autoLeft + 0.5), startPoint.y + adjustHeight_1 + 10, (taskbar.progressWidth), pixelToPoint(12));
928
+ }
929
+ else {
930
+ taskGraphics.drawRectangle(null, manualProgressBrush, startPoint.x + pixelToPoint(this.autoLeft + 0.5), startPoint.y + adjustHeight_1 + 10, pixelToPoint(taskbar.progressWidth), pixelToPoint(12));
931
+ }
932
+ }
933
+ this.isCompletedAutotask = false;
934
+ this.autoWidth -= detail.totalWidth;
935
+ }
936
+ }
241
937
  }
242
938
  else {
243
939
  this.drawMilestone(page, startPoint, detail, cumulativeWidth);
@@ -264,9 +960,20 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
264
960
  left = this.rightTaskLabel.left;
265
961
  }
266
962
  else {
267
- left = pixelToPoint(this.rightTaskLabel.left);
963
+ if (this.isAutoFit()) {
964
+ left = (this.rightTaskLabel.left);
965
+ }
966
+ else {
967
+ left = pixelToPoint(this.rightTaskLabel.left);
968
+ }
969
+ }
970
+ var actualLeft;
971
+ if (this.isAutoFit()) {
972
+ actualLeft = left - (cumulativeWidth) + startPoint.x;
973
+ }
974
+ else {
975
+ actualLeft = left - pixelToPoint(cumulativeWidth) + startPoint.x;
268
976
  }
269
- var actualLeft = left - pixelToPoint(cumulativeWidth) + startPoint.x;
270
977
  if (detail.startPoint <= left && left < detail.endPoint &&
271
978
  !isNullOrUndefined(this.rightTaskLabel.value) && !this.rightTaskLabel.isCompleted) {
272
979
  var result = this.getWidth(this.rightTaskLabel.value, detail.endPoint - left, 15);
@@ -318,14 +1025,25 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
318
1025
  if (!this.leftTaskLabel.isLeftCalculated) {
319
1026
  var result = this.getWidth(this.leftTaskLabel.value, Number.MAX_VALUE, 15);
320
1027
  var reduceLeft = this.isMilestone ? Math.floor(this.parent.chartRowsModule.taskBarHeight / 2) + 33 : 33; // 33 indicates default timeline cell width
321
- left = pixelToPoint(labelLeft - reduceLeft) - result.actualSize.width;
1028
+ if (this.isAutoFit()) {
1029
+ left = (labelLeft - reduceLeft) - result.actualSize.width;
1030
+ }
1031
+ else {
1032
+ left = pixelToPoint(labelLeft - reduceLeft) - result.actualSize.width;
1033
+ }
322
1034
  this.leftTaskLabel.left = left;
323
1035
  this.leftTaskLabel.isLeftCalculated = true;
324
1036
  }
325
1037
  else {
326
1038
  left = this.leftTaskLabel.left;
327
1039
  }
328
- var actualLeft = left - pixelToPoint(cumulativeWidth) + startPoint.x;
1040
+ var actualLeft = void 0;
1041
+ if (this.isAutoFit()) {
1042
+ actualLeft = left - pixelToPoint(cumulativeWidth) + startPoint.x;
1043
+ }
1044
+ else {
1045
+ actualLeft = left - pixelToPoint(cumulativeWidth) + startPoint.x;
1046
+ }
329
1047
  if (detail.startPoint <= left && left < detail.endPoint && !isNullOrUndefined(this.leftTaskLabel.value)
330
1048
  && !this.leftTaskLabel.isCompleted) {
331
1049
  var result = this.getWidth(this.leftTaskLabel.value, detail.endPoint - left, 15);
@@ -386,7 +1104,12 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
386
1104
  PdfGanttTaskbarCollection.prototype.drawUnscheduledTask = function (taskGraphics, startPoint, cumulativeWidth, adjustHeight) {
387
1105
  var taskBrush = new PdfSolidBrush(this.taskColor);
388
1106
  /* eslint-disable-next-line */
389
- taskGraphics.drawRectangle(taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth), startPoint.y + adjustHeight, pixelToPoint(3), pixelToPoint(this.height));
1107
+ if (this.isAutoFit()) {
1108
+ taskGraphics.drawRectangle(taskBrush, startPoint.x + (this.left - cumulativeWidth), startPoint.y + adjustHeight, pixelToPoint(3), pixelToPoint(this.height));
1109
+ }
1110
+ else {
1111
+ taskGraphics.drawRectangle(taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth), startPoint.y + adjustHeight, pixelToPoint(3), pixelToPoint(this.height));
1112
+ }
390
1113
  };
391
1114
  /**
392
1115
  * @param {PdfPage} page .
@@ -411,7 +1134,12 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
411
1134
  taskGraphics.save(); //saving graphics state
412
1135
  var height = Math.floor(this.parent.chartRowsModule.taskBarHeight * 0.8);
413
1136
  /* eslint-disable-next-line */
414
- taskGraphics.translateTransform(startPoint.x + pixelToPoint(this.left - cumulativeWidth), startPoint.y + adjustHeight - (this.parent.chartRowsModule.taskBarHeight * 0.7) / 2);
1137
+ if (this.isAutoFit()) {
1138
+ taskGraphics.translateTransform(startPoint.x + (this.left - cumulativeWidth), startPoint.y + adjustHeight - (this.parent.chartRowsModule.taskBarHeight * 0.7) / 2);
1139
+ }
1140
+ else {
1141
+ taskGraphics.translateTransform(startPoint.x + pixelToPoint(this.left - cumulativeWidth), startPoint.y + adjustHeight - (this.parent.chartRowsModule.taskBarHeight * 0.7) / 2);
1142
+ }
415
1143
  taskGraphics.rotateTransform(45); //apply rotation
416
1144
  if (this.parent.renderBaseline && this.baselineStartDate && this.baselineEndDate) {
417
1145
  taskGraphics.drawRectangle(baselinePen, baselineBrush, 2, 2, pixelToPoint(height), pixelToPoint(height));