diff --git a/superset/assets/javascripts/explorev2/components/ChartContainer.jsx b/superset/assets/javascripts/explorev2/components/ChartContainer.jsx index 00932a07c5..bd944b852b 100644 --- a/superset/assets/javascripts/explorev2/components/ChartContainer.jsx +++ b/superset/assets/javascripts/explorev2/components/ChartContainer.jsx @@ -109,16 +109,17 @@ class ChartContainer extends React.Component { }, clearError: () => { - this.props.actions.removeChartAlert(); + // no need to do anything here since Alert is closable + // query button will also remove Alert }, error(msg) { - this.props.actions.chartUpdateFailed(msg); + props.actions.chartUpdateFailed(msg); }, d3format: (col, number) => { // mock d3format function in Slice object in superset.js - const format = this.props.column_formats[col]; + const format = props.column_formats[col]; return d3format(format, number); }, }; diff --git a/superset/assets/visualizations/nvd3_vis.js b/superset/assets/visualizations/nvd3_vis.js index adc5fef35f..dfa1abcdb8 100644 --- a/superset/assets/visualizations/nvd3_vis.js +++ b/superset/assets/visualizations/nvd3_vis.js @@ -60,6 +60,7 @@ function nvd3Vis(slice) { const render = function () { d3.json(slice.jsonEndpoint(), function (error, payload) { + slice.container.html(''); // Check error first, otherwise payload can be null if (error) { slice.error(error.responseText, error);