superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maximebeauche...@apache.org
Subject [incubator-superset] branch master updated: Remedy for dual axis annotation (#4130)
Date Tue, 02 Jan 2018 22:31:18 GMT
This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new f7c5527  Remedy for dual axis annotation (#4130)
f7c5527 is described below

commit f7c55270db9ac757ea8a69596a7a0fc9aff27385
Author: Jeff Niu <jeffniu22@gmail.com>
AuthorDate: Tue Jan 2 17:31:16 2018 -0500

    Remedy for dual axis annotation (#4130)
---
 superset/assets/visualizations/nvd3_vis.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/superset/assets/visualizations/nvd3_vis.js b/superset/assets/visualizations/nvd3_vis.js
index 470f499..b60c32a 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')

-- 
To stop receiving notification emails like this one, please contact
['"commits@superset.apache.org" <commits@superset.apache.org>'].

Mime
View raw message