public class LegendItem extends AbstractNode
| Modifier and Type | Class and Description |
|---|---|
static class |
LegendItem.LegendItemFactory
Inner class to create legend item by a native object.
|
| Modifier and Type | Field and Description |
|---|---|
static LegendItem.LegendItemFactory |
FACTORY
Public factory to create a legend item from a native object.
|
| Constructor and Description |
|---|
LegendItem(ChartEnvelop<LegendItem> envelop)
Creates the item using another legend item (passed by envelop) which contains all properties.
|
| Modifier and Type | Method and Description |
|---|---|
BorderRadiusItem |
getBorderRadius()
Returns the border radius of item.
|
int |
getDatasetIndex()
Returns the data set 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.
|
Gradient |
getFillStyleAsGradient()
Returns the fill style of the legend box as gradient.
|
Pattern |
getFillStyleAsPattern()
Returns the fill style of the legend box as pattern.
|
IsColor |
getFontColor()
Returns the font color of the legend or
null if not set. |
int |
getIndex()
Returns the data set 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.
|
double |
getLineDashOffset()
Returns the box border dash pattern offset.
|
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).
|
int |
getLineWidth()
Returns the width of line in pixels.
|
PointStyle |
getPointStyle()
Returns the style of the legend box (only used if usePointStyle is true)
|
Canvas |
getPointStyleAsCanvas()
Returns the style (as canvas) 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)
|
PointStyleType |
getPointStyleType()
Returns the type of point style.
|
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 canvas gradient.
|
CanvasPatternItem |
getStrokeStyleAsCanvasPattern()
Returns the stroke style of the legend box as canvas pattern.
|
Gradient |
getStrokeStyleAsGradient()
Returns the stroke style of the legend box as gradient.
|
Pattern |
getStrokeStyleAsPattern()
Returns the stroke style of the legend box as pattern.
|
String |
getText()
Returns the label that will be displayed
|
boolean |
isFillStyleAsColor()
Returns
true if the fill style is defined as color. |
boolean |
isFillStyleAsGradient()
Returns
true if the fill style is defined as gradient. |
boolean |
isFillStyleAsPattern()
Returns
true if the fill style is defined as canvas pattern. |
boolean |
isHidden(IsChart chart)
Returns
true if this item represents a hidden data set.Label will be rendered with a strike-through effect |
boolean |
isStrokeStyleAsColor()
Returns
true if the stroke style is defined as color. |
boolean |
isStrokeStyleAsGradient()
Returns
true if the stroke style is defined as gradient. |
boolean |
isStrokeStyleAsPattern()
Returns
true if the stroke style is defined as gradient. |
checkAndAddToParent, getChildKey, getParentNode, getRootNode, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParentcheckDefaultValuesArgument, 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, typepublic static final LegendItem.LegendItemFactory FACTORY
public LegendItem(ChartEnvelop<LegendItem> envelop)
envelop - envelop which contains legend item which contains all properties.public final boolean isHidden(IsChart chart)
true if this item represents a hidden data set.chart - chart instance to check if data set or data are visibletrue if this item represents a hidden data set.public final BorderRadiusItem getBorderRadius()
public final int getDatasetIndex()
public final int getIndex()
public final String getText()
public final boolean isFillStyleAsColor()
true if the fill style is defined as color.true if the fill style is defined as colorpublic final boolean isFillStyleAsGradient()
true if the fill style is defined as gradient.true if the fill style is defined as gradientpublic final boolean isFillStyleAsPattern()
true if the fill style is defined as canvas pattern.true if the fill style is defined as canvas patternpublic final IsColor getFontColor()
null if not set.null if not setpublic final IsColor getFillStyle()
null if is not a colorpublic final Gradient getFillStyleAsGradient()
null if is not a gradientpublic final CanvasGradientItem getFillStyleAsCanvasGradient()
null if is not a canvas gradientpublic final Pattern getFillStyleAsPattern()
null if is not a patternpublic 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 isStrokeStyleAsGradient()
true if the stroke style is defined as gradient.true if the stroke style is defined as gradientpublic final boolean isStrokeStyleAsPattern()
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 canvas gradientpublic final Gradient getStrokeStyleAsGradient()
null if is not a gradientpublic final CanvasPatternItem getStrokeStyleAsCanvasPattern()
null if is not a canvas patternpublic final Pattern getStrokeStyleAsPattern()
null if is not a patternpublic final CapStyle getLineCap()
public final List<Integer> getLineDash()
public final double getLineDashOffset()
public final JoinStyle getLineJoin()
public final int getLineWidth()
public final double getRotation()
public final PointStyleType getPointStyleType()
public final PointStyle getPointStyle()
public final Img getPointStyleAsImage()
public final Canvas getPointStyleAsCanvas()