in src/visual.ts [847:893]
public update(options: VisualUpdateOptions) {
this.dataViews = options.dataViews;
this.currentViewport = options.viewport;
if (!this.checkDataset()) {
this.clearViewport();
return;
}
if (this.layers.length === 0) {
this.layers = this.createAndInitLayers(this.dataViews);
}
if (this.dataViews && this.dataViews.length > 0) {
this.populateObjectProperties(this.dataViews);
}
for (let layerIndex: number = 0, length: number = this.layers.length; layerIndex < length; layerIndex++) {
this.layers[layerIndex].setData(dataViewUtils.getLayerData(this.dataViews, layerIndex, length));
}
const rotataionEnabled = (<BaseColumnChart>this.layers[0]).getXAxisLabelsSettings().enableRotataion;
let additionHeight: number = 0;
if (rotataionEnabled) {
let axes: MekkoChartAxisProperties = this.axes = axisUtils.calculateAxes(
this.layers,
this.currentViewport,
this.margin,
this.categoryAxisProperties,
this.valueAxisProperties,
this.isXScrollBarVisible || this.isYScrollBarVisible,
null);
additionHeight += this.calculateXAxisAdditionalHeight(axes.x.values);
}
if ((this.currentViewport.width < MekkoChart.MinWidth)
|| (this.currentViewport.height < MekkoChart.MinHeight + additionHeight)) {
this.clearViewport();
return;
}
this.renderLegend();
this.render();
this.hasSetData = this.hasSetData
|| (this.dataViews && this.dataViews.length > 0);
}