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: Fix 'Uncaught TypeError: pe.clamp is not a function' (#4901)
Date Fri, 27 Apr 2018 23:15:46 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 caa7267  Fix 'Uncaught TypeError: pe.clamp is not a function' (#4901)
caa7267 is described below

commit caa72675a5b69e0ba133a3e652e1f807e0163d9c
Author: Maxime Beauchemin <maximebeauchemin@gmail.com>
AuthorDate: Fri Apr 27 16:15:43 2018 -0700

    Fix 'Uncaught TypeError: pe.clamp is not a function' (#4901)
---
 superset/assets/src/visualizations/nvd3_vis.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/superset/assets/src/visualizations/nvd3_vis.js b/superset/assets/src/visualizations/nvd3_vis.js
index d78bf2f..068b8a0 100644
--- a/superset/assets/src/visualizations/nvd3_vis.js
+++ b/superset/assets/src/visualizations/nvd3_vis.js
@@ -602,7 +602,9 @@ export default function nvd3Vis(slice, payload) {
           xMax = chart.xAxis.scale().domain()[1].valueOf();
           xScale = chart.xScale ? chart.xScale() : d3.scale.linear();
         }
-        xScale.clamp(true);
+        if (xScale && xScale.clamp) {
+          xScale.clamp(true);
+        }
 
         if (Array.isArray(formulas) && formulas.length) {
           const xValues = [];

-- 
To stop receiving notification emails like this one, please contact
maximebeauchemin@apache.org.

Mime
View raw message