public final class LegendLabelItem extends LegendItem
Constructor and Description |
---|
LegendLabelItem()
Standard constructor which wraps a new native java script object.
|
Modifier and Type | Method and Description |
---|---|
int |
getLineWidth()
Returns the width of line in pixels.
|
PointStyle |
getPointStyle()
Returns the style of the legend box (only used if usePointStyle is true)
|
ImageElement |
getPointStyleAsImage()
Returns the style (as image) of the legend box (only used if usePointStyle is true)
|
IsColor |
getStrokeStyle()
Returns the stroke style of the legend box
|
boolean |
isPointStyleAsImage()
Returns
true if the point style is defined as image. |
void |
setDatasetIndex(int datasetIndex)
Sets the dataset index of the chart
|
void |
setFillStyle(IsColor color)
Sets the fill style of the legend box
|
void |
setHidden(boolean hidden)
Sets true if this item represents a hidden dataset.
|
void |
setIndex(int index)
Sets the dataset index of the chart (for POLAR and PIE charts)
|
void |
setLineCap(CapStyle style)
Sets how the end points of every box border are drawn.
|
void |
setLineDash(List<Integer> lineDash)
Sets 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.
|
void |
setLineDashOffset(int lineDashOffset)
Sets the box border dash pattern offset or "phase".
|
void |
setLineJoin(JoinStyle style)
Sets 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. |
void |
setLineWidth(int lineWidths)
Sets the width of box border in pixels.
|
void |
setPointStyle(Image pointStyle)
Sets the style of the point as image.
|
void |
setPointStyle(ImageElement pointStyle)
Sets the style (as image) of the legend box (only used if usePointStyle is true)
|
void |
setPointStyle(ImageResource pointStyle)
Sets the style of the point as image.
|
void |
setPointStyle(PointStyle style)
Sets the style of the legend box (only used if usePointStyle is true)
|
void |
setRotation(double rotation)
Sets the rotation of the point in degrees (only used if usePointStyle is true).
|
void |
setStrokeStyle(IsColor color)
Sets the stroke style of the legend box
|
void |
setText(String text)
Sets the label that will be displayed
|
getDatasetIndex, getFillStyle, getIndex, getLineCap, getLineDash, getLineDashOffset, getLineJoin, getRotation, getText, isHidden
checkValue, getArrayValue, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, keys, remove, remove, removeIfExists, setArrayValue, setArrayValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
public LegendLabelItem()
public void setDatasetIndex(int datasetIndex)
datasetIndex
- the dataset index of the chartpublic void setIndex(int index)
index
- the dataset index of the chart (for POLAR and PIE charts)public void setText(String text)
text
- the label that will be displayedpublic void setFillStyle(IsColor color)
color
- the fill style of the legend boxpublic void setHidden(boolean hidden)
hidden
- true if this item represents a hidden dataset. Label will be rendered with a strike-through effectpublic void setLineCap(CapStyle style)
style
- how the end points of every box border are drawn.public void setLineDash(List<Integer> lineDash)
lineDash
- 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.public void setLineDashOffset(int lineDashOffset)
lineDashOffset
- the box border dash pattern offset or "phase".public void setLineJoin(JoinStyle style)
style
- There are three possible values for this property: round, bevel and miter.public void setLineWidth(int lineWidths)
lineWidths
- the width of box border in pixels.public int getLineWidth()
public void setStrokeStyle(IsColor color)
color
- the stroke style of the legend boxpublic IsColor getStrokeStyle()
public boolean isPointStyleAsImage()
true
if the point style is defined as image.true
if the point style is defined as imagepublic void setPointStyle(PointStyle style)
style
- the style of the legend boxpublic void setPointStyle(ImageResource pointStyle)
pointStyle
- image resource of the style of the point as image.public void setPointStyle(Image pointStyle)
pointStyle
- image resource of the style of the point as image.public void setPointStyle(ImageElement pointStyle)
pointStyle
- the style (as image) of the legend boxpublic PointStyle getPointStyle()
public ImageElement getPointStyleAsImage()
public void setRotation(double rotation)
rotation
- the rotation of the point in degrees