Skip to content

Commit

Permalink
fix: nvd3 charts break on stateChange dispatch (apache#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Ritter authored and zhaoyongjie committed Nov 26, 2021
1 parent c382480 commit dd2af3f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,9 @@ function nvd3Vis(element, props) {
applyYAxisBounds();

// Also reapply on each state change to account for enabled/disabled series
chart.dispatch.on('stateChange.applyYAxisBounds', applyYAxisBounds);
if (chart.dispatch && chart.dispatch.stateChange) {
chart.dispatch.on('stateChange.applyYAxisBounds', applyYAxisBounds);
}

// align yAxis1 and yAxis2 ticks
if (isVizTypes(['dual_line', 'line_multi'])) {
Expand Down

0 comments on commit dd2af3f

Please sign in to comment.