public setAllValuesAndVisibleTAs()

in src/UXClient/Models/ChartComponentData.ts [291:332]


    public setAllValuesAndVisibleTAs () {
        var toMillis = 0;
        var fromMillis = Infinity;
        this.allValues = [];
        this.allNumericValues = [];
        this.visibleTAs = [];
        this.visibleTSCount = 0;
        Object.keys(this.timeArrays).forEach((aggKey: string) => {
            if (this.getAggVisible(aggKey)) {
                this.visibleTAs[aggKey] = {};
                Object.keys(this.timeArrays[aggKey]).forEach((splitBy) => {
                    if (this.getSplitByVisible(aggKey, splitBy)) {
                        this.allValues = this.allValues.concat(this.timeArrays[aggKey][splitBy]);
                        if (this.displayState[aggKey].dataType === DataTypes.Numeric) {
                            this.allNumericValues = this.allNumericValues.concat(this.timeArrays[aggKey][splitBy]);
                        }
                        this.visibleTAs[aggKey][splitBy] = this.timeArrays[aggKey][splitBy];
                        this.visibleTSCount += 1;

                        this.timeArrays[aggKey][splitBy].forEach((d) => {
                            var millis = d.dateTime.valueOf();
                            var bucketSize = this.displayState[aggKey].bucketSize;
                            if (millis < fromMillis)
                                fromMillis = millis;
                            var endValue = bucketSize ? millis + bucketSize : millis;
                            if (endValue > toMillis)
                                toMillis = endValue;
                        });
                        this.usesSeconds = this.usesSeconds || this.doesTimeArrayUseSeconds(this.timeArrays[aggKey][splitBy]);
                        this.usesMillis = this.usesMillis || this.doesTimeArrayUseMillis(this.timeArrays[aggKey][splitBy]);
                    }
                });
            }            
        });
        //set this.toMillis and this.fromMillis if new values are more extreme 
        this.toMillis = (toMillis > this.toMillis) ? toMillis : this.toMillis;
        this.fromMillis = (fromMillis < this.fromMillis) ? fromMillis : this.fromMillis;
        if (this.fromMillis === Infinity) {
            this.fromMillis = this.toMillis - 1;
        }
        return [new Date(this.fromMillis), new Date(this.toMillis)];
    }