Skip to content

Commit

Permalink
Fix multi/dual when no right y axis (apache#6571)
Browse files Browse the repository at this point in the history
  • Loading branch information
betodealmeida authored and Conglei Shi committed Jan 7, 2019
1 parent cf7acaa commit 8b0cfa7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion superset/assets/src/visualizations/nvd3/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8b0cfa7

Please sign in to comment.