Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
6d99750f
Unverified
Commit
6d99750f
authored
5 years ago
by
Paul Rosenzweig
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Don't pass gridSize if it was computed from null width/height (#12022)
parent
5f0f4b9f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/src/metabase/visualizations/components/Visualization.jsx
+8
-1
8 additions, 1 deletion
.../src/metabase/visualizations/components/Visualization.jsx
with
8 additions
and
1 deletion
frontend/src/metabase/visualizations/components/Visualization.jsx
+
8
−
1
View file @
6d99750f
...
...
@@ -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
)),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment