Skip to content
Snippets Groups Projects
Unverified Commit 6d99750f authored by Paul Rosenzweig's avatar Paul Rosenzweig Committed by GitHub
Browse files

Don't pass gridSize if it was computed from null width/height (#12022)

parent 5f0f4b9f
Branches
Tags
No related merge requests found
......@@ -453,7 +453,14 @@ export default class Visualization extends React.PureComponent {
);
let { gridSize, gridUnit, classNameWidgets } = this.props;
if (!gridSize && gridUnit) {
if (
!gridSize &&
gridUnit &&
// Check that width/height are set. If they're not, we want to pass
// undefined rather than {width: 0, height: 0}. Passing 0 will hide axes.
width != null &&
height != null
) {
gridSize = {
width: Math.round(width / (gridUnit * 4)),
height: Math.round(height / (gridUnit * 3)),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment