Currently, add-legend only supports a custom preview function. It would be nice to be able to use the available marks more easily. I got around it by adding this manually, but it seems a bit verbose:
(
(
type: "legend-item",
label: name,
style: (stroke: none),
mark: mark,
mark-size: 0.2,
mark-style: (fill: black.lighten(75%), stroke: black),
axes: ("x", "y"),
data: (),
preview: auto,
),
)
Currently,
add-legendonly supports a custom preview function. It would be nice to be able to use the available marks more easily. I got around it by adding this manually, but it seems a bit verbose:( ( type: "legend-item", label: name, style: (stroke: none), mark: mark, mark-size: 0.2, mark-style: (fill: black.lighten(75%), stroke: black), axes: ("x", "y"), data: (), preview: auto, ), )