public update()

in src/multiKpi.ts [135:166]


    public update(options: powerbiVisualsApi.extensibility.visual.VisualUpdateOptions) {
        if (!this.dataConverter || !this.rootComponent) {
            return;
        }

        try {
            this.host.eventService.renderingStarted(options);

            const dataView: powerbiVisualsApi.DataView = options
                && options.dataViews
                && options.dataViews[0];

            this.viewport = this.getViewport(options && options.viewport);

            this.settings = <Settings>(Settings.PARSE_SETTINGS(dataView));

            this.dataRepresentation = this.dataConverter.convert({
                dataView,
                settings: this.settings,
                viewport: this.viewport,
            });

            this.render(
                this.dataRepresentation,
                this.settings,
                this.viewport,
            );
        } catch (ex) {
            this.host.eventService.renderingFailed(options, JSON.stringify(ex));
        }
        this.host.eventService.renderingFinished(options);
    }