public final class Legend extends NativeObjectContainer
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_INDICATOR_WIDTH
Default indicator width options, 10.
|
static int |
DEFAULT_LENGTH
Default length options, 100.
|
static int |
DEFAULT_MARGIN
Default margin options, 8.
|
static int |
DEFAULT_WIDTH
Default width options, 50.
|
Modifier and Type | Method and Description |
---|---|
Align |
getAlign()
Returns the alignment of the legend on the chart area.
|
int |
getIndicatorWidth()
Returns how many pixels should be used for the color bar.
|
int |
getLength()
Returns the length of the legend.
|
int |
getMargin()
Returns the margin pixels such that it doesn't stick to the edge of the chart.
|
Margin |
getMarginAsObject()
Returns the margin pixels such that it doesn't stick to the edge of the chart.
|
Position |
getPosition()
Returns the location of the legend on the chart area.
|
PositionPoint |
getPositionAsPoint()
Returns the location of the legend on the chart area.
|
int |
getWidth()
Returns how wide the scale is.
For a horizontal scale the height if a value less than 1 is given, is it assume to be a ratio of the corresponding chart area. |
void |
setAlign(Align align)
Sets the alignment of the legend on the chart area.
|
void |
setIndicatorWidth(int width)
Sets how many pixels should be used for the color bar.
|
void |
setLength(int length)
Sets the length of the legend.
|
void |
setMargin(int margin)
Sets the margin pixels such that it doesn't stick to the edge of the chart.
|
void |
setMargin(Margin margin)
Sets the margin pixels such that it doesn't stick to the edge of the chart.
|
void |
setPosition(Position position)
Sets the location of the legend on the chart area.
|
void |
setPosition(PositionPoint position)
Sets the location of the legend on the chart area.
|
void |
setWidth(int width)
Sets how wide the scale is.
For a horizontal scale the height if a value less than 1 is given, is it assume to be a ratio of the corresponding chart area. |
checkDefaultValuesArgument, empty, getArrayValue, getElement, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setElement, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
public static final int DEFAULT_LENGTH
public static final int DEFAULT_WIDTH
public static final int DEFAULT_INDICATOR_WIDTH
public static final int DEFAULT_MARGIN
public void setPosition(Position position)
position
- the location of the legend on the chart areapublic void setPosition(PositionPoint position)
position
- the location of the legend on the chart areapublic Position getPosition()
public PositionPoint getPositionAsPoint()
public void setAlign(Align align)
align
- the alignment of the legend on the chart areapublic Align getAlign()
public void setLength(int length)
length
- the length of the legendpublic int getLength()
public void setWidth(int width)
width
- how wide the scale ispublic int getWidth()
public void setIndicatorWidth(int width)
width
- how many pixels should be used for the color barpublic int getIndicatorWidth()
public void setMargin(int margin)
margin
- the margin pixels such that it doesn't stick to the edge of the chartpublic void setMargin(Margin margin)
margin
- the margin pixels such that it doesn't stick to the edge of the chartpublic int getMargin()
public Margin getMarginAsObject()