LegendProps
Defined in: packages/react/src/controls.tsx:45
Props of Legend. useViews’s legendProps(group) supplies most of them.
Properties
Section titled “Properties”className?
Section titled “className?”
optionalclassName?:string
Defined in: packages/react/src/controls.tsx:53
Extra class on the outer element.
counts?
Section titled “counts?”
optionalcounts?:boolean
Defined in: packages/react/src/controls.tsx:60
Show each category’s count. Defaults to true.
group:
LegendGroup
Defined in: packages/react/src/controls.tsx:47
One dimension’s legend, from layout.legends.
heading?
Section titled “heading?”
optionalheading?:boolean
Defined in: packages/react/src/controls.tsx:58
Show the dimension’s label above its entries. Defaults to true.
hideEmpty?
Section titled “hideEmpty?”
optionalhideEmpty?:boolean
Defined in: packages/react/src/controls.tsx:62
Leave out categories with no items. Defaults to false.
onSelect?
Section titled “onSelect?”
optionalonSelect?: (selection) =>void
Defined in: packages/react/src/controls.tsx:51
Called with a category of this group, or null to clear; makes each entry a toggle.
Parameters
Section titled “Parameters”selection
Section titled “selection”Selection | null
Returns
Section titled “Returns”void
renderer?
Section titled “renderer?”
optionalrenderer?:Renderer<PlacedMark>
Defined in: packages/react/src/controls.tsx:56
Draws each entry’s swatch; use the canvas’s renderer so they match. Defaults to shapesRenderer.
selected?
Section titled “selected?”
optionalselected?:Selection|null
Defined in: packages/react/src/controls.tsx:49
The current selection, from useViews.