superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject [incubator-superset] branch master updated: Fix multi/dual when no right y axis (#6571)
Date Fri, 28 Dec 2018 05:17:53 GMT
This is an automated email from the ASF dual-hosted git repository.

beto 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 a0b2f2c  Fix multi/dual when no right y axis (#6571)
a0b2f2c is described below

commit a0b2f2ca0feb7c67245aa214f6ae1be5376038af
Author: Beto Dealmeida <roberto@dealmeida.net>
AuthorDate: Thu Dec 27 21:17:48 2018 -0800

    Fix multi/dual when no right y axis (#6571)
---
 superset/assets/src/visualizations/nvd3/LineMulti/LineMulti.jsx | 2 +-
 superset/assets/src/visualizations/nvd3/utils.js                | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/superset/assets/src/visualizations/nvd3/LineMulti/LineMulti.jsx b/superset/assets/src/visualizations/nvd3/LineMulti/LineMulti.jsx
index 525a0f0..42efb7b 100644
--- a/superset/assets/src/visualizations/nvd3/LineMulti/LineMulti.jsx
+++ b/superset/assets/src/visualizations/nvd3/LineMulti/LineMulti.jsx
@@ -9,7 +9,7 @@ const propTypes = {
   width: PropTypes.number,
   height: PropTypes.number,
   annotationData: PropTypes.object,
-  datasource: PropTypes.array,
+  datasource: PropTypes.object,
   formData: PropTypes.object,
   onAddFilter: PropTypes.func,
   onError: PropTypes.func,
diff --git a/superset/assets/src/visualizations/nvd3/utils.js b/superset/assets/src/visualizations/nvd3/utils.js
index 86ee61f..b8d0d4d 100644
--- a/superset/assets/src/visualizations/nvd3/utils.js
+++ b/superset/assets/src/visualizations/nvd3/utils.js
@@ -181,7 +181,7 @@ export function getMaxLabelSize(svg, axisClass) {
   const tickTexts = svg.selectAll(`.${axisClass} g.tick text`);
   if (tickTexts.length > 0) {
     const lengths = tickTexts[0].map(text => text.getComputedTextLength());
-    return Math.ceil(Math.max(...lengths));
+    return Math.ceil(Math.max(0, ...lengths));
   }
   return 0;
 }


Mime
View raw message