Skip to content

Commit

Permalink
Fix 'Uncaught TypeError: pe.clamp is not a function' (apache#4901)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch authored and michellethomas committed May 23, 2018
1 parent 6447224 commit f4e5dcc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion superset/assets/src/visualizations/nvd3_vis.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down

0 comments on commit f4e5dcc

Please sign in to comment.