in src/visual.ts [1081:1107]
private updateViewport(): void {
const legendMargins: IViewport = this.legend.getMargins(),
legendPosition: LegendPosition = this.legend.getOrientation();
switch (legendPosition) {
case LegendPosition.Top:
case LegendPosition.TopCenter:
case LegendPosition.Bottom:
case LegendPosition.BottomCenter: {
this.viewport.height = Math.max(
StreamGraph.MinInternalViewport.height,
this.viewport.height - legendMargins.height);
break;
}
case LegendPosition.Left:
case LegendPosition.LeftCenter:
case LegendPosition.Right:
case LegendPosition.RightCenter: {
this.viewport.width = Math.max(
StreamGraph.MinInternalViewport.width,
this.viewport.width - legendMargins.width);
break;
}
}
}