in src/visual.ts [772:815]
public update(options: VisualUpdateOptions): void {
if (!options || !options.dataViews || !options.dataViews[0]) {
return;
}
this.viewport = options.viewport;
const dataView: DataView = options.dataViews[0];
let pulseChartData: ChartData = Visual.CONVERTER(
dataView,
this.host,
this.colorHelper,
this.interactivityService,
);
this.settings = pulseChartData.settings;
this.updateData(pulseChartData);
if (!this.validateData(this.data)) {
this.clearAll(true);
return;
}
let width = this.getChartWidth();
this.calculateXAxisProperties(width);
let height = this.getChartHeight(this.data.settings.xAxis.show
&& this.data.series.some((series: Series) => series.xAxisProperties.rotate));
this.calculateYAxisProperties(height);
if (this.data.xScale.ticks(undefined).length < 2) {
this.clearAll(true);
return;
}
this.size = { width, height };
this.updateElements();
this.render(true);
}