in src/visual.ts [700:728]
private setSize(viewport: IViewport): void {
let height: number,
width: number;
this.svg
.attr(TableHeatMap.AttrHeight, Math.max(viewport.height, 0))
.attr(TableHeatMap.AttrWidth, Math.max(viewport.width, 0));
height =
viewport.height -
this.margin.top -
this.margin.bottom;
width =
viewport.width -
this.margin.left -
this.margin.right;
this.viewport = {
height: height,
width: width
};
this.mainGraphics
.attr(TableHeatMap.AttrHeight, Math.max(this.viewport.height + this.margin.top, 0))
.attr(TableHeatMap.AttrWidth, Math.max(this.viewport.width + this.margin.left, 0));
this.mainGraphics.attr(TableHeatMap.AttrTransform, translate(this.margin.left, this.margin.top));
}