mistercrunch closed pull request #4130: [Bugfix] Remedy for Dual Axis chart 
render bug
URL: https://github.com/apache/incubator-superset/pull/4130
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/superset/assets/visualizations/nvd3_vis.js 
b/superset/assets/visualizations/nvd3_vis.js
index 470f499094..b60c32a0e5 100644
--- a/superset/assets/visualizations/nvd3_vis.js
+++ b/superset/assets/visualizations/nvd3_vis.js
@@ -553,7 +553,7 @@ function nvd3Vis(slice, payload) {
         } else {
           xMin = chart.xAxis.scale().domain()[0].valueOf();
           xMax = chart.xAxis.scale().domain()[1].valueOf();
-          xScale = chart.xScale();
+          xScale = chart.xScale ? chart.xScale() : d3.scale.linear();
         }
 
         if (Array.isArray(formulas) && formulas.length) {
@@ -591,8 +591,8 @@ function nvd3Vis(slice, payload) {
           }));
           data.push(...formulaData);
         }
-
-        const annotationHeight = chart.yAxis.scale().range()[0];
+        const yAxis = chart.yAxis1 ? chart.yAxis1 : chart.yAxis;
+        const annotationHeight = yAxis.scale().range()[0];
         const tipFactory = layer => d3tip()
           .attr('class', 'd3-tip')
           .direction('n')


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to