mirror of
https://github.com/apache/superset.git
synced 2024-09-17 11:09:47 -04:00
Temperary fix of a slice bug (#1648)
This commit is contained in:
parent
face5245a9
commit
bdae570a69
@ -109,16 +109,17 @@ class ChartContainer extends React.Component {
|
|||||||
},
|
},
|
||||||
|
|
||||||
clearError: () => {
|
clearError: () => {
|
||||||
this.props.actions.removeChartAlert();
|
// no need to do anything here since Alert is closable
|
||||||
|
// query button will also remove Alert
|
||||||
},
|
},
|
||||||
|
|
||||||
error(msg) {
|
error(msg) {
|
||||||
this.props.actions.chartUpdateFailed(msg);
|
props.actions.chartUpdateFailed(msg);
|
||||||
},
|
},
|
||||||
|
|
||||||
d3format: (col, number) => {
|
d3format: (col, number) => {
|
||||||
// mock d3format function in Slice object in superset.js
|
// 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);
|
return d3format(format, number);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -60,6 +60,7 @@ function nvd3Vis(slice) {
|
|||||||
|
|
||||||
const render = function () {
|
const render = function () {
|
||||||
d3.json(slice.jsonEndpoint(), function (error, payload) {
|
d3.json(slice.jsonEndpoint(), function (error, payload) {
|
||||||
|
slice.container.html('');
|
||||||
// Check error first, otherwise payload can be null
|
// Check error first, otherwise payload can be null
|
||||||
if (error) {
|
if (error) {
|
||||||
slice.error(error.responseText, error);
|
slice.error(error.responseText, error);
|
||||||
|
Loading…
Reference in New Issue
Block a user