private onCurrentDataPointIndexChange()

in src/visualComponent/sparkline/sparklineComponent.ts [163:186]


    private onCurrentDataPointIndexChange(index: number): void {
        const current: IDataRepresentationPoint = this.renderOptions
            && this.renderOptions.current
            && this.renderOptions.current.points
            && this.renderOptions.current.points[index];

        const sparklineValue: SubtitleDescriptor = this.renderOptions
            && this.renderOptions.current
            && this.renderOptions.current.settings
            && this.renderOptions.current.settings.sparklineValue;

        const viewportSize: ViewportSize = this.renderOptions
            && this.renderOptions.dataRepresentation
            && this.renderOptions.dataRepresentation.viewportSize;

        const valuesSettings: ValuesDescriptor = this.renderOptions
            && this.renderOptions.current
            && this.renderOptions.current.settings
            && this.renderOptions.current.settings.values;

        if (current && sparklineValue) {
            setTimeout(this.renderBottomLabel.bind(this, current.y, viewportSize, sparklineValue, valuesSettings));
        }
    }