Skip to content
This repository was archived by the owner on Jun 25, 2020. It is now read-only.

Commit 484d639

Browse files
KKcorpskristw
authored andcommitted
fix: Line not hidden after legend selection (#204)
* fix: Line not hidden after legend selection * fix: lint issues
1 parent 6e988aa commit 484d639

File tree

1 file changed

+9
-7
lines changed
  • packages/superset-ui-legacy-preset-chart-nvd3/src

1 file changed

+9
-7
lines changed

packages/superset-ui-legacy-preset-chart-nvd3/src/NVD3Vis.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,13 +1080,15 @@ function nvd3Vis(element, props) {
10801080
.call(chart);
10811081

10821082
// Display styles for Time Series Annotations
1083-
d3.selectAll('.slice_container .nv-timeseries-annotation-layer.showMarkerstrue .nv-point')
1084-
.style('stroke-opacity', 1)
1085-
.style('fill-opacity', 1);
1086-
d3.selectAll('.slice_container .nv-timeseries-annotation-layer.hideLinetrue').style(
1087-
'stroke-width',
1088-
0,
1089-
);
1083+
chart.dispatch.on('renderEnd.timeseries-annotation', () => {
1084+
d3.selectAll('.slice_container .nv-timeseries-annotation-layer.showMarkerstrue .nv-point')
1085+
.style('stroke-opacity', 1)
1086+
.style('fill-opacity', 1);
1087+
d3.selectAll('.slice_container .nv-timeseries-annotation-layer.hideLinetrue').style(
1088+
'stroke-width',
1089+
0,
1090+
);
1091+
});
10901092
}
10911093
}
10921094

0 commit comments

Comments
 (0)