Skip to content

Commit

Permalink
Fix 'Uncaught TypeError: pe.clamp is not a function' (#4901)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch authored Apr 27, 2018
1 parent 0a95371 commit caa7267
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 caa7267

Please sign in to comment.