@@ -315,9 +315,9 @@ export const GanttChart = function (pDiv, pFormat) {
315
315
}
316
316
317
317
/**
318
- *
318
+ *
319
319
* DRAW CHAR HEAD
320
- *
320
+ *
321
321
*/
322
322
this . drawChartHead = function ( vMinDate , vMaxDate , vColWidth , vNumRows ) {
323
323
let vRightHeader = document . createDocumentFragment ( ) ;
@@ -474,7 +474,7 @@ export const GanttChart = function (pDiv, pFormat) {
474
474
vTmpTab . style . width = vTaskLeftPx + 'px' ; // Ensure that the headings has exactly the same width as the chart grid
475
475
// const vTaskPlanLeftPx = (vNumCols * (vColWidth + 3)) + 1;
476
476
let vSingleCell = false ;
477
-
477
+
478
478
if ( this . vUseSingleCell !== 0 && this . vUseSingleCell < ( vNumCols * vNumRows ) ) vSingleCell = true ;
479
479
480
480
newNode ( vTmpDiv , 'div' , null , 'rhscrpad' , null , null , vTaskLeftPx + 1 ) ;
@@ -485,9 +485,9 @@ export const GanttChart = function (pDiv, pFormat) {
485
485
}
486
486
487
487
/**
488
- *
488
+ *
489
489
* DRAW CHART BODY
490
- *
490
+ *
491
491
*/
492
492
this . drawCharBody = function ( vTaskLeftPx , vTmpContentTabWrapper , gChartLbl , gListLbl ,
493
493
vMinDate , vSingleCell , vNumCols , vColWidth , vDateRow ) {
@@ -498,6 +498,7 @@ export const GanttChart = function (pDiv, pFormat) {
498
498
this . setChartTable ( vTmpTab ) ;
499
499
newNode ( vTmpDiv , 'div' , null , 'rhscrpad' , null , null , vTaskLeftPx + 1 ) ;
500
500
const vTmpTBody = newNode ( vTmpTab , 'tbody' ) ;
501
+ const vTmpTFoot = newNode ( vTmpTab , 'tfoot' ) ;
501
502
502
503
syncScroll ( [ vTmpContentTabWrapper , vTmpDiv ] , 'scrollTop' ) ;
503
504
syncScroll ( [ gChartLbl , vTmpDiv ] , 'scrollLeft' ) ;
@@ -569,7 +570,7 @@ export const GanttChart = function (pDiv, pFormat) {
569
570
else {
570
571
let vTaskWidth = vTaskRightPx ;
571
572
572
- // Draw Group Bar which has outer div with inner group div
573
+ // Draw Group Bar which has outer div with inner group div
573
574
// and several small divs to left and right to create angled-end indicators
574
575
if ( this . vTaskList [ i ] . getGroup ( ) ) {
575
576
vTaskWidth = ( vTaskWidth > this . vMinGpLen && vTaskWidth < this . vMinGpLen * 2 ) ? this . vMinGpLen * 2 : vTaskWidth ; // Expand to show two end points
@@ -689,7 +690,15 @@ export const GanttChart = function (pDiv, pFormat) {
689
690
}
690
691
691
692
// Include the footer with the days/week/month...
692
- vTmpTBody . appendChild ( vDateRow . cloneNode ( true ) ) ;
693
+ if ( vSingleCell ) {
694
+ const vTmpTFootTRow = newNode ( vTmpTFoot , 'tr' ) ;
695
+ const vTmpTFootTCell = newNode ( vTmpTFootTRow , 'td' , null , null , null , '100%' ) ;
696
+ const vTmpTFootTCellTable = newNode ( vTmpTFootTCell , 'table' , null , 'gcharttableh' , null , '100%' ) ;
697
+ const vTmpTFootTCellTableTBody = newNode ( vTmpTFootTCellTable , 'tbody' ) ;
698
+ vTmpTFootTCellTableTBody . appendChild ( vDateRow . cloneNode ( true ) ) ;
699
+ } else {
700
+ vTmpTFoot . appendChild ( vDateRow . cloneNode ( true ) ) ;
701
+ }
693
702
694
703
return { vRightTable }
695
704
}
@@ -702,22 +711,22 @@ export const GanttChart = function (pDiv, pFormat) {
702
711
newNode ( vTmpRow , 'td' , null , vCellFormat , '\u00A0\u00A0' , taskCellWidth ) ;
703
712
}
704
713
705
-
714
+
706
715
}
707
716
708
717
/**
709
- *
710
- *
718
+ *
719
+ *
711
720
* DRAWING PROCESS
712
- *
721
+ *
713
722
* vTaskRightPx,vTaskWidth,vTaskPlanLeftPx,vTaskPlanRightPx,vID
714
723
*/
715
724
this . Draw = function ( ) {
716
725
let vMaxDate = new Date ( ) ;
717
726
let vMinDate = new Date ( ) ;
718
727
let vColWidth = 0 ;
719
728
let bd ;
720
-
729
+
721
730
if ( this . vEvents && this . vEvents . beforeDraw ) {
722
731
this . vEvents . beforeDraw ( ) ;
723
732
}
@@ -752,7 +761,7 @@ export const GanttChart = function (pDiv, pFormat) {
752
761
753
762
754
763
/**
755
- * LIST HEAD
764
+ * LIST HEAD
756
765
*/
757
766
const gListLbl = this . drawListHead ( vLeftHeader ) ;
758
767
@@ -889,4 +898,3 @@ export const GanttChart = function (pDiv, pFormat) {
889
898
890
899
if ( this . vDiv && this . vDiv . nodeName && this . vDiv . nodeName . toLowerCase ( ) == 'div' ) this . vDivId = this . vDiv . id ;
891
900
} ; //GanttChart
892
-
0 commit comments