Skip to content

Commit

Permalink
[dashboard bug] Fix standalone slice (apache#3877)
Browse files Browse the repository at this point in the history
  • Loading branch information
Grace Guo authored and michellethomas committed May 23, 2018
1 parent fea7cc5 commit 4d87d36
Showing 1 changed file with 17 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,22 @@ class ExploreChartPanel extends React.PureComponent {
return parseInt(this.props.height, 10) - headerHeight;
}

renderChart() {
return (
<ChartContainer
containerId={this.props.containerId}
datasource={this.props.datasource}
formData={this.props.form_data}
height={this.getHeight()}
slice={this.props.slice}
chartKey={this.props.chart.chartKey}
setControlValue={this.props.actions.setControlValue}
timeout={this.props.timeout}
vizType={this.props.vizType}
/>
);
}

render() {
if (this.props.standalone) {
// dom manipulation hack to get rid of the boostrap theme's body background
Expand All @@ -57,17 +73,7 @@ class ExploreChartPanel extends React.PureComponent {
style={{ height: this.props.height }}
header={header}
>
<ChartContainer
containerId={this.props.containerId}
datasource={this.props.datasource}
formData={this.props.form_data}
height={this.getHeight()}
slice={this.props.slice}
chartKey={this.props.chart.chartKey}
setControlValue={this.props.actions.setControlValue}
timeout={this.props.timeout}
vizType={this.props.vizType}
/>
{this.renderChart()}
</Panel>
</div>
);
Expand Down

0 comments on commit 4d87d36

Please sign in to comment.