Interface: LegendElement<TType>
-
↳
LegendElement
• Readonly
active: boolean
Inherited from
Element.active
Defined in
bottom
• bottom: number
Bottom edge of the item. Set by layout system and cannot be used in update
Inherited from
Defined in
chart
• chart: <TType
, DistributiveArray
<ChartTypeRegistry[TType
]["defaultDataPoint"
]>, unknown
>
Defined in
index.esm.d.ts:2184 (opens new window)
ctx
• ctx: CanvasRenderingContext2D
Defined in
fullSize
• fullSize: boolean
if true, and the item is horizontal, then push vertical boxes down
Inherited from
Defined in
height
• height: number
Height of item. Must be valid after update()
Inherited from
Defined in
left
• left: number
Left edge of the item. Set by layout system and cannot be used in update
Inherited from
Defined in
legendItems
• Optional
legendItems: []
Defined in
• options: LegendOptions<TType
>
Overrides
Element.options
Defined in
position
The position of the item in the chart layout. Possible values are
Inherited from
Defined in
right
• right: number
Right edge of the item. Set by layout system and cannot be used in update
Inherited from
Defined in
top
• top: number
Top edge of the item. Set by layout system and cannot be used in update
Inherited from
Defined in
weight
• weight: number
The weight used to sort the item. Higher weights are further away from the chart area
Inherited from
Defined in
width
• width: number
Width of item. Must be valid after update()
Inherited from
Defined in
x
• x: number
Inherited from
Element.x
Defined in
y
• Readonly
y: number
Inherited from
Element.y
Defined in
▸ Optional
beforeLayout(): void
Called before the layout process starts
Returns
void
Inherited from
Defined in
draw
Draws the element
Parameters
Name | Type |
---|---|
chartArea | ChartArea |
Returns
void
Inherited from
.draw
Defined in
layout.d.ts:50 (opens new window)
getPadding
▸ Optional
getPadding(): ChartArea
Returns an object with padding on the edges
Returns
Inherited from
Defined in
getProps
▸ getProps<P
>(props
, final?
): Pick
<AnyObject
, P
[number
]>
Type parameters
Parameters
Name | Type |
---|---|
props | |
final? | boolean |
Returns
Pick
<AnyObject
, P
[number
]>
Inherited from
Element.getProps
Defined in
element.d.ts:12 (opens new window)
hasValue
▸ hasValue(): boolean
Returns
boolean
Inherited from
Element.hasValue
Defined in
isHorizontal
▸ isHorizontal(): boolean
returns true if the layout item is horizontal (ie. top or bottom)
Returns
boolean
Inherited from
Defined in
layout.d.ts:58 (opens new window)
tooltipPosition
▸ tooltipPosition(useFinalPosition?
): Point
Parameters
Returns
Inherited from
Element.tooltipPosition
Defined in
element.d.ts:10 (opens new window)
update
▸ update(width
, height
, margins?
): void
Takes two parameters: width and height.
Parameters
Name | Type |
---|---|
width | number |
height | number |
Returns
void