Skip to content

Margin shorthand #1682

Closed Answered by mbostock
dgwyer asked this question in Q&A
Jun 8, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

It’s shorthand for specifying all four margins as the same value. For example, margin: 20.

Plot.plot({
  margin: 20,
  marks: [ ... ]
})

is equivalent to

Plot.plot({
  marginTop: 20,
  marginBottom: 20,
  marginLeft: 20,
  marginRight: 20,
  marks: [ ... ]
})

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dgwyer
Comment options

Answer selected by Fil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants