You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2018/01/02 22:31:18 UTC

[incubator-superset] branch master updated: Remedy for dual axis annotation (#4130)

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 <je...@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" <co...@superset.apache.org>'].