mistercrunch closed pull request #4901: Fix 'Uncaught TypeError: pe.clamp is
not a function'
URL: https://github.com/apache/incubator-superset/pull/4901
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/src/visualizations/nvd3_vis.js
b/superset/assets/src/visualizations/nvd3_vis.js
index d78bf2f714..068b8a0b55 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 = [];
----------------------------------------------------------------
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