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

fix: nvd3 charts break on stateChange dispatch #159

Merged
merged 1 commit into from
Jul 29, 2019

Conversation

etr2460
Copy link
Contributor

@etr2460 etr2460 commented Jul 29, 2019

🐛 Bug Fix
The change in #148 broke charts that don't have a stateChange dispatch event like the box plot. This fixes the issue.

Tested by opening all the charts (including box plot) in storybook and seeing them render

@kristw

@etr2460 etr2460 requested a review from a team as a code owner July 29, 2019 20:36
@@ -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']) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chart.dispatch.stateChange?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, duh. fixed!

@etr2460 etr2460 force-pushed the erik-ritter--more-y-axis branch from ebc69f0 to 92613ca Compare July 29, 2019 20:47
@codecov
Copy link

codecov bot commented Jul 29, 2019

Codecov Report

Merging #159 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #159   +/-   ##
======================================
  Coverage    25.9%   25.9%           
======================================
  Files           8       8           
  Lines         166     166           
  Branches       10      10           
======================================
  Hits           43      43           
  Misses        122     122           
  Partials        1       1

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b01791c...92613ca. Read the comment docs.

@etr2460 etr2460 merged commit bd1245d into master Jul 29, 2019
@delete-merged-branch delete-merged-branch bot deleted the erik-ritter--more-y-axis branch July 29, 2019 20:56
nytai pushed a commit to preset-io/superset-ui-plugins that referenced this pull request Apr 27, 2020
nytai pushed a commit to preset-io/superset-ui-plugins that referenced this pull request Apr 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants