public class LegendItem extends NativeObjectContainer
| Modifier and Type | Class and Description |
|---|---|
static class |
LegendItem.LegendItemFactory
Inner class to create legend item by a native object.
|
| Constructor and Description |
|---|
LegendItem(LegendItem item)
Creates the item using another legend item which contains all properties.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getDatasetIndex()
Returns the dataset index of the chart
|
IsColor |
getFillStyle()
Returns the fill style of the legend box as color.
|
CanvasGradientItem |
getFillStyleAsCanvasGradient()
Returns the fill style of the legend box as canvas gradient.
|
CanvasPatternItem |
getFillStyleAsCanvasPattern()
Returns the fill style of the legend box as canvas pattern.
|
int |
getIndex()
Returns the dataset index of the chart (for POLAR and PIE charts)
|
CapStyle |
getLineCap()
Returns how the end points of every box border are drawn.
|
List<Integer> |
getLineDash()
Returns the box border dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.
|
int |
getLineDashOffset()
Returns the box border dash pattern offset or "phase".
|
JoinStyle |
getLineJoin()
Returns how two connecting segments (of box border) with non-zero lengths in a shape are joined together (degenerate segments with zero lengths, whose specified end points
and control points are exactly at the same position, are skipped).
There are three possible values for this property: round, bevel and miter. |
int |
getLineWidth()
Returns the width of line in pixels.
|
PointStyle |
getPointStyle()
Returns the style of the legend box (only used if usePointStyle is true)
|
Img |
getPointStyleAsImage()
Returns the style (as image) of the legend box (only used if usePointStyle is true)
|
double |
getRotation()
Returns the rotation of the point in degrees (only used if usePointStyle is true).
|
IsColor |
getStrokeStyle()
Returns the stroke style of the legend box as color.
|
CanvasGradientItem |
getStrokeStyleAsCanvasGradient()
Returns the stroke style of the legend box as gradient.
|
CanvasPatternItem |
getStrokeStyleAsCanvasPattern()
Returns the stroke style of the legend box as pattern.
|
String |
getText()
Returns the label that will be displayed
|
boolean |
isFillStyleAsCanvasGradient()
Returns
true if the fill style is defined as gradient. |
boolean |
isFillStyleAsCanvasPattern()
Returns
true if the fill style is defined as canvas pattern. |
boolean |
isFillStyleAsColor()
Returns
true if the fill style is defined as color. |
boolean |
isHidden()
Returns true if this item represents a hidden dataset.
|
boolean |
isPointStyleAsImage()
Returns
true if the point style is defined as image. |
boolean |
isStrokeStyleAsCanvasGradient()
Returns
true if the stroke style is defined as gradient. |
boolean |
isStrokeStyleAsCanvasPattern()
Returns
true if the stroke style is defined as gradient. |
boolean |
isStrokeStyleAsColor()
Returns
true if the stroke style is defined as color. |
checkValue, empty, getArrayValue, getNativeChart, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, keys, remove, remove, removeIfExists, setArrayValue, setArrayValue, setArrayValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, typepublic LegendItem(LegendItem item)
item - legend item which contains all properties.public final int getDatasetIndex()
UndefinedValues.INTEGER.public final int getIndex()
UndefinedValues.INTEGER.public final String getText()
UndefinedValues.STRING.public final boolean isFillStyleAsColor()
true if the fill style is defined as color.true if the fill style is defined as colorpublic final boolean isFillStyleAsCanvasGradient()
true if the fill style is defined as gradient.true if the fill style is defined as gradientpublic final boolean isFillStyleAsCanvasPattern()
true if the fill style is defined as canvas pattern.true if the fill style is defined as canvas patternpublic final IsColor getFillStyle()
null if is not a colorpublic final CanvasGradientItem getFillStyleAsCanvasGradient()
null if is not a canvas gradientpublic final CanvasPatternItem getFillStyleAsCanvasPattern()
null if is not a canvas patternpublic final boolean isStrokeStyleAsColor()
true if the stroke style is defined as color.true if the stroke style is defined as colorpublic final boolean isStrokeStyleAsCanvasGradient()
true if the stroke style is defined as gradient.true if the stroke style is defined as gradientpublic final boolean isStrokeStyleAsCanvasPattern()
true if the stroke style is defined as gradient.true if the stroke style is defined as gradientpublic final IsColor getStrokeStyle()
null if is not a colorpublic final CanvasGradientItem getStrokeStyleAsCanvasGradient()
null if is not a gradientpublic final CanvasPatternItem getStrokeStyleAsCanvasPattern()
null if is not a patternpublic final boolean isHidden()
true if this item represents a hidden dataset. Label will be rendered with a strike-through effect.UndefinedValues.BOOLEAN.public final CapStyle getLineCap()
public final List<Integer> getLineDash()
public final int getLineDashOffset()
public final JoinStyle getLineJoin()
public final int getLineWidth()
public final double getRotation()
public final boolean isPointStyleAsImage()
true if the point style is defined as image.true if the point style is defined as imagepublic final PointStyle getPointStyle()
public final Img getPointStyleAsImage()