public class Legend extends BaseOption
The legend is a box containing a symbol and name for each series item or point item in the chart. Each series (or points in case of pie charts) is represented by a symbol and its name in the legend.
It is possible to override the symbol creator function and create custom legend symbols.
Copyright (c) 2022 Powerbuilt Systems. All rights reserved.Constructor and Description |
---|
Legend() |
Modifier and Type | Method and Description |
---|---|
HorizontalAlign |
getAlign()
The horizontal alignment of the legend box within the chart area.
|
Layout |
getLayout()
The layout of the legend items.
|
VerticalAlign |
getVerticalAlign()
The vertical alignment of the legend box.
|
Legend |
setAlign(HorizontalAlign align)
The horizontal alignment of the legend box within the chart area.
|
Legend |
setLayout(Layout layout)
The layout of the legend items.
|
Legend |
setVerticalAlign(VerticalAlign verticalAlign)
The vertical alignment of the legend box.
|
set_hcNulledOption
public static final Legend NULL
public HorizontalAlign getAlign()
The horizontal alignment of the legend box within the chart area. Valid values are left
, center
and right
.
In the case that the legend is aligned in a corner position, the layout
option will determine whether to place it above/below or on the side of the plot area.
public Legend setAlign(HorizontalAlign align)
The horizontal alignment of the legend box within the chart area. Valid values are left
, center
and right
.
In the case that the legend is aligned in a corner position, the layout
option will determine whether to place it above/below or on the side of the plot area.
align
- the value for the align optionpublic Layout getLayout()
The layout of the legend items. Can be one of horizontal
or vertical
or proximate
. When proximate
, the legend items will be placed as close as possible to the graphs they're representing, except in inverted charts or when the legend position doesn't allow it.
public Legend setLayout(Layout layout)
The layout of the legend items. Can be one of horizontal
or vertical
or proximate
. When proximate
, the legend items will be placed as close as possible to the graphs they're representing, except in inverted charts or when the legend position doesn't allow it.
layout
- the value for the layout optionpublic VerticalAlign getVerticalAlign()
The vertical alignment of the legend box. Can be one of top
, middle
or bottom
. Vertical position can be further determined by the y
option.
In the case that the legend is aligned in a corner position, the layout
option will determine whether to place it above/below or on the side of the plot area.
When the layout option is proximate
, the verticalAlign
option doesn't apply.
public Legend setVerticalAlign(VerticalAlign verticalAlign)
The vertical alignment of the legend box. Can be one of top
, middle
or bottom
. Vertical position can be further determined by the y
option.
In the case that the legend is aligned in a corner position, the layout
option will determine whether to place it above/below or on the side of the plot area.
When the layout option is proximate
, the verticalAlign
option doesn't apply.
verticalAlign
- the value for the verticalAlign optionCopyright © 2022. All rights reserved.