rusackas commented on a change in pull request #11854:
URL: 
https://github.com/apache/incubator-superset/pull/11854#discussion_r534687553



##########
File path: superset-frontend/src/explore/components/ExploreChartPanel.jsx
##########
@@ -73,67 +178,89 @@ class ExploreChartPanel extends React.PureComponent {
           height > 0 && (
             <ChartContainer
               width={Math.floor(width)}
-              height={parseInt(this.props.height, 10) - headerHeight}
+              height={chartSectionHeight}
               annotationData={chart.annotationData}
               chartAlert={chart.chartAlert}
               chartStackTrace={chart.chartStackTrace}
               chartId={chart.id}
               chartStatus={chart.chartStatus}
-              triggerRender={this.props.triggerRender}
-              datasource={this.props.datasource}
-              errorMessage={this.props.errorMessage}
-              formData={this.props.form_data}
-              onQuery={this.props.onQuery}
-              owners={this.props?.slice?.owners}
+              triggerRender={props.triggerRender}
+              datasource={props.datasource}
+              errorMessage={props.errorMessage}
+              formData={props.form_data}
+              onQuery={props.onQuery}
+              owners={props?.slice?.owners}
               queryResponse={chart.queryResponse}
-              refreshOverlayVisible={this.props.refreshOverlayVisible}
-              setControlValue={this.props.actions.setControlValue}
-              timeout={this.props.timeout}
+              refreshOverlayVisible={props.refreshOverlayVisible}
+              setControlValue={props.actions.setControlValue}
+              timeout={props.timeout}
               triggerQuery={chart.triggerQuery}
-              vizType={this.props.vizType}
+              vizType={props.vizType}
             />
           )
         }
       </ParentSize>
     );
-  }
+  };
 
-  render() {
-    if (this.props.standalone) {
-      // dom manipulation hack to get rid of the boostrap theme's body 
background
-      const standaloneClass = 'background-transparent';
-      const bodyClasses = document.body.className.split(' ');
-      if (bodyClasses.indexOf(standaloneClass) === -1) {
-        document.body.className += ` ${standaloneClass}`;
-      }
-      return this.renderChart();
+  if (props.standalone) {
+    // dom manipulation hack to get rid of the boostrap theme's body background
+    const standaloneClass = 'background-transparent';
+    const bodyClasses = document.body.className.split(' ');
+    if (bodyClasses.indexOf(standaloneClass) === -1) {

Review comment:
       ```suggestion
       if (!bodyClasses.includes(standaloneClass)) {
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to