Skip to content

Commit

Permalink
Fix legend label measuring
Browse files Browse the repository at this point in the history
  • Loading branch information
johannes-wolf committed Oct 12, 2024
1 parent bd0d87b commit 6c0adc3
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 3 deletions.
Binary file modified gallery/barchart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified gallery/line.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/plot/legend.typ
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
spacing: .1, // Spacing between anchor and legend
item: (
radius: 0,
spacing: .05, // Spacing between items
spacing: 0, // Extra spacing between items
preview: (
width: .75, // Preview width
height: .35, // Preview height
height: .3, // Preview height
margin: .1 // Distance between preview and label
)
),
Expand Down Expand Up @@ -186,7 +186,7 @@

// Draw label
content(label-west,
align(left + horizon, label),
text(top-edge: "ascender", bottom-edge: "descender", align(left + horizon, label)),
name: "label", anchor: "west")
}, name: "item", anchor: if style.orientation == ltr { "west" } else { "north-west" })

Expand Down
Binary file modified tests/axes/log-mode/ref/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/chart/piechart/ref/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/plot/legend/ref/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/plot/violin/ref/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6c0adc3

Please sign in to comment.