public class LegendItem extends JavaScriptObjectContainer
Modifier and Type | Class and Description |
---|---|
protected static class |
LegendItem.Property
Name of fields of JavaScript object.
|
Modifier | Constructor and Description |
---|---|
protected |
LegendItem()
Standard constructor which wraps a new java script object.
|
|
LegendItem(GenericJavaScriptObject javaScriptObject)
Wraps the CHART.JS java script object.
|
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
|
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.
|
java.util.List<java.lang.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 endpoints and control points are exactly at the same position, are
skipped).
There are three possible values for this property: round, bevel and miter. |
java.util.List<java.lang.Integer> |
getLineWidth()
Returns the width of line in pixels.
|
java.util.List<PointStyle> |
getPointStyle()
Returns the style of the legend box (only used if usePointStyle is true)
|
java.util.List<IsColor> |
getStrokeStyle()
Returns the stroke style of the legend box
|
java.lang.String |
getText()
Returns the label that will be displayed
|
boolean |
isHidden()
Returns true if this item represents a hidden dataset.
|
checkAndGetDoubleValues, checkAndGetEnumValues, checkAndGetIntegerValues, checkAndGetStringValues, checkAndSetDoubleValues, checkAndSetEnumValues, checkAndSetIntegerValues, checkAndSetStringValues, getDoubleArray, getIntegerArray, getJavaScriptObject, getObjectArray, getStringArray, getValue, getValue, getValue, getValue, getValue, getValue, getValue, has, has, hasToBeRegistered, isEmpty, keys, remove, remove, removeIfExists, setDoubleArray, setEnumValueArray, setIntegerArray, setObjectArray, setStringArray, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, toString, type
protected LegendItem()
public LegendItem(GenericJavaScriptObject javaScriptObject)
javaScriptObject
- CHART.JS java script objectpublic final int getDatasetIndex()
UndefinedValues.INTEGER
.Data.getDatasets()
public final int getIndex()
UndefinedValues.INTEGER
.Data.getDatasets()
public final java.lang.String getText()
UndefinedValues.STRING
.public final IsColor getFillStyle()
public 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()
CapStyle
public final java.util.List<java.lang.Integer> getLineDash()
public final int getLineDashOffset()
UndefinedValues.INTEGER
.public final JoinStyle getLineJoin()
JoinStyle
public final java.util.List<java.lang.Integer> getLineWidth()
public final java.util.List<IsColor> getStrokeStyle()
public final java.util.List<PointStyle> getPointStyle()
PointStyle