diff --git a/superset/assets/javascripts/chart/Chart.jsx b/superset/assets/javascripts/chart/Chart.jsx index f775e8900fc..f7c7e6931fe 100644 --- a/superset/assets/javascripts/chart/Chart.jsx +++ b/superset/assets/javascripts/chart/Chart.jsx @@ -62,7 +62,12 @@ class Chart extends React.PureComponent { } componentDidMount() { - this.runQuery(); + if (this.props.triggerQuery) { + this.props.actions.runQuery(this.props.formData, false, + this.props.timeout, + this.props.chartKey, + ); + } } componentWillReceiveProps(nextProps) { @@ -123,13 +128,6 @@ class Chart extends React.PureComponent { return d3format(format, number); } - runQuery() { - this.props.actions.runQuery(this.props.formData, true, - this.props.timeout, - this.props.chartKey, - ); - } - render_template(s) { const context = { width: this.width(),