mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
Fixed a bug with switching viz_type in exploreV2 (#1631)
- Issue: when switching from a viz_type outside nvd3 to a viz_type in nvd3, the Chart Container doesn't draw new graph - Fix: The reason was somehow the function inside nv.addGraph() wasn't called, extract the function outside and explicitly calling it solve the problem
This commit is contained in:
@@ -104,7 +104,8 @@ function nvd3Vis(slice) {
|
||||
const reduceXTicks = fd.reduce_x_ticks || false;
|
||||
let stacked = false;
|
||||
let row;
|
||||
nv.addGraph(function () {
|
||||
|
||||
const drawGraph = function () {
|
||||
switch (vizType) {
|
||||
case 'line':
|
||||
if (fd.show_brush) {
|
||||
@@ -352,8 +353,10 @@ function nvd3Vis(slice) {
|
||||
}
|
||||
|
||||
return chart;
|
||||
});
|
||||
};
|
||||
|
||||
const graph = drawGraph();
|
||||
nv.addGraph(graph);
|
||||
slice.done(payload);
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user