private renderBunchOfLabels()

in src/timeLine.ts [1409:1475]


    private renderBunchOfLabels(timelineSettings: Settings): number {
        const extendedLabels = this.timelineData.currentGranularity.getExtendedLabel();
        const granularityType = this.timelineData.currentGranularity.getType();
        const yDiff: number = Timeline.DefaultYDiff;
        let yPos: number = 0;

        if (timelineSettings.labels.show) {
            if (timelineSettings.labels.displayAll || granularityType === GranularityType.year) {
                this.renderLabels(
                    extendedLabels.yearLabels,
                    this.yearLabelsSelection,
                    this.calculateYOffset(yPos),
                    granularityType === 0);
                if (granularityType >= GranularityType.year) {
                    yPos += yDiff;
                }
            }

            if (timelineSettings.labels.displayAll || granularityType === GranularityType.quarter) {
                this.renderLabels(
                    extendedLabels.quarterLabels,
                    this.quarterLabelsSelection,
                    this.calculateYOffset(yPos),
                    granularityType === 1);
                if (granularityType >= GranularityType.quarter) {
                    yPos += yDiff;
                }
            }

            if (timelineSettings.labels.displayAll || granularityType === GranularityType.month) {
                this.renderLabels(
                    extendedLabels.monthLabels,
                    this.monthLabelsSelection,
                    this.calculateYOffset(yPos),
                    granularityType === 2);
                if (granularityType >= GranularityType.month) {
                    yPos += yDiff;
                }
            }

            if (timelineSettings.labels.displayAll || granularityType === GranularityType.week) {
                this.renderLabels(
                    extendedLabels.weekLabels,
                    this.weekLabelsSelection,
                    this.calculateYOffset(yPos),
                    granularityType === 3);
                if (granularityType >= GranularityType.week) {
                    yPos += yDiff;
                }
            }

            if (timelineSettings.labels.displayAll || granularityType === GranularityType.day) {
                this.renderLabels(
                    extendedLabels.dayLabels,
                    this.dayLabelsSelection,
                    this.calculateYOffset(yPos),
                    granularityType === 4);
                if (granularityType >= GranularityType.day) {
                    yPos += yDiff;
                }
            }
        }

        yPos -= 1;

        return yPos;
    }