|
|
@@ -366,7 +366,7 @@ class Timeline extends LitElement {
|
|
|
}
|
|
|
|
|
|
updateLegend():void {
|
|
|
- const legend = [];
|
|
|
+ const legend:Array<Array<legendItem>> = [];
|
|
|
const legendUnitList:Array<dayjsUnit> = [ "y","M","d","h","m",'s'];
|
|
|
const legendMinUnitSpan = this.slotDuration * this.legendSpan;
|
|
|
for (const legendUnit of legendUnitList) {
|
|
|
@@ -386,7 +386,7 @@ class Timeline extends LitElement {
|
|
|
let i = 0;
|
|
|
while(currentDate.isBefore(this._end)){
|
|
|
i+=this.legendSpan;
|
|
|
- if(nextColumn.diff(currentDate,legendUnit) > 0 ){
|
|
|
+ if(nextColumn.diff(currentDate,legendUnit) >= 0 ){
|
|
|
row.push({colspan:i,title:'' + currentDate.format(this.legendUnitFormat[legendUnit])})
|
|
|
i = 0;
|
|
|
currentDate = nextColumn;
|