const canBeClicked = node => node.qualifier !== 'FIL' && node.qualifier !== 'UTS';
+ // FIXME remove this magic number
+ const height = HEIGHT - 35;
+
return <Treemap
items={items}
breadcrumbs={this.state.breadcrumbs}
- height={HEIGHT}
+ height={height}
canBeClicked={canBeClicked}
onRectangleClick={this.handleRectangleClick.bind(this)}
onReset={this.handleReset.bind(this)}/>;
},
render () {
+ const componentsCount = this.state.components ? this.state.components.length : 1;
+ const height = componentsCount * 25;
+
return <div className="overview-domain-chart">
<div className="overview-card-header">
<h2 className="overview-title">{translate('overview.chart.components')}</h2>
{translateWithParameters('overview.chart.legend.size_x', translate('metric.ncloc.name'))}
</span>
</div>
- <div className="overview-bar-chart" style={{ height: HEIGHT }}>
+ <div className="overview-bar-chart" style={{ height }}>
{this.renderBarChart()}
</div>
</div>;