public final class LegendLabels extends ChartContainer
| Modifier and Type | Method and Description |
|---|---|
protected LegendLabelItem[] |
generateLegendLabels()
Called to generate legend items for each thing in the legend.
|
int |
getBoxWidth()
Returns the width of coloured box.
|
LegendFilterHandler |
getFilterHandler() |
IsColor |
getFontColor()
Returns the font color for label
|
java.lang.String |
getFontColorAsString()
Returns the font color for label
|
java.lang.String |
getFontFamily()
Returns the font family for the label, follows CSS font-family options.
|
int |
getFontSize()
Returns the font size for label.
|
FontStyle |
getFontStyle()
Returns the font style for the label, follows CSS font-style options (i.e.
|
LegendLabelsCallback |
getLabelsCallBack() |
int |
getPadding()
Returns the padding to apply around labels.
|
boolean |
isUsePointStyle()
Returns if label style will match corresponding point style (size is based on fontSize, boxWidth is not used in this case).
|
protected boolean |
onFilter(GenericJavaScriptObject item)
Called to filter legend items out of the legend.
|
void |
setBoxWidth(int boxWidth)
Sets the width of coloured box.
|
void |
setFontColor(IsColor fontColor)
Sets the font color for label
|
void |
setFontColor(java.lang.String fontColor)
Sets the font color for label
|
void |
setFontFamily(java.lang.String fontFamily)
Sets the font family for the label, follows CSS font-family options.
|
void |
setFontSize(int fontSize)
Sets the font size for label.
|
void |
setFontStyle(FontStyle fontStyle)
Sets the font style for the label, follows CSS font-style options (i.e.
|
void |
setLabelsCallBack(LegendLabelsCallback legendLabelsCallBack) |
void |
setLegendFilterHandler(LegendFilterHandler filterHandler) |
void |
setPadding(int padding)
Sets the padding to apply around labels.
|
void |
setUsePointStyle(boolean usePointStyle)
Sets if label style will match corresponding point style (size is based on fontSize, boxWidth is not used in this case).
|
getChartcheckAndGetDoubleValues, 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, typepublic LegendLabelsCallback getLabelsCallBack()
public void setLabelsCallBack(LegendLabelsCallback legendLabelsCallBack)
legendLabelsCallBack - the legendCallBack to setpublic LegendFilterHandler getFilterHandler()
public void setLegendFilterHandler(LegendFilterHandler filterHandler)
filterHandler - the legendFilterHandler to setpublic void setFontSize(int fontSize)
fontSize - Font size for label.public int getFontSize()
Options.getLegend().public void setFontStyle(FontStyle fontStyle)
fontStyle - Font style for the label, follows CSS font-style options (i.e. normal, italic, oblique, initial, inherit).FontStylepublic FontStyle getFontStyle()
Options.getLegend().FontStylepublic void setFontColor(IsColor fontColor)
fontColor - Font color for labelpublic void setFontColor(java.lang.String fontColor)
fontColor - Font color for labelpublic java.lang.String getFontColorAsString()
Options.getLegend().public IsColor getFontColor()
Options.getLegend().public void setFontFamily(java.lang.String fontFamily)
fontFamily - Font family for the label, follows CSS font-family options.public java.lang.String getFontFamily()
Options.getLegend().public void setUsePointStyle(boolean usePointStyle)
usePointStyle - if label style will match corresponding point style (size is based on fontSize, boxWidth is not used in this case).public boolean isUsePointStyle()
Options.getLegend().public void setBoxWidth(int boxWidth)
boxWidth - width of coloured box.public int getBoxWidth()
Options.getLegend().public void setPadding(int padding)
padding - Padding to apply around labels. Only top and bottom are implemented.public int getPadding()
Options.getLegend().protected LegendLabelItem[] generateLegendLabels()
protected boolean onFilter(GenericJavaScriptObject item)
item - legend item to check.true to maintain the item, otherwise false to hide it.