public final class HtmlLegendOptions extends AbstractPluginOptions
HtmlLegend.ID
plugin.Modifier and Type | Field and Description |
---|---|
static Style.Cursor |
DEFAULT_CURSOR_POINTER
Default cursor type when the cursor is over the legend,
Style.Cursor.POINTER . |
static boolean |
DEFAULT_DISPLAY
Default display if legend must be showed.
|
static int |
DEFAULT_MAXIMUM_LEGEND_COLUMNS
Default maximum legends columns to show.
|
Constructor and Description |
---|
HtmlLegendOptions()
Builds the object with new java script object setting the default value of plugin.
The global plugin options is used, if exists, as defaults values. |
HtmlLegendOptions(IsChart chart)
Builds the object with a chart instance in order to get the right defaults.
If the plugin options have not been set by chart type, it will use the global. |
Modifier and Type | Method and Description |
---|---|
Style.Cursor |
getCursorPointer()
Returns the cursor type when the cursor is over the dataset item.
|
HtmlLegendTextCallback |
getLegendTextCallback()
Returns the callback which can be implemented to change the text of legend for a specific item, as HTML.
|
int |
getMaximumLegendColumns()
Returns the maximum amount of columns of legend.
|
boolean |
isDisplay()
Returns if the legend is shown.
|
void |
setCursorPointer(Style.Cursor cursor)
Sets the cursor type when the cursor is over the dataset item.
|
void |
setDisplay(boolean display)
Sets if the legend is shown.
|
void |
setLegendTextCallback(HtmlLegendTextCallback legendTextCallback)
Sets the callback which can be implemented to change the text of legend for a specific item, as HTML.
|
void |
setMaximumLegendColumns(int maxColumns)
Sets the maximum amount of columns of legend.
|
getId, getPluginId, loadGlobalsPluginOptions, store, store, store, store
checkValue, empty, getArrayValue, 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, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
public static final Style.Cursor DEFAULT_CURSOR_POINTER
Style.Cursor.POINTER
.public static final int DEFAULT_MAXIMUM_LEGEND_COLUMNS
public static final boolean DEFAULT_DISPLAY
public HtmlLegendOptions()
public HtmlLegendOptions(IsChart chart)
chart
- chart type to use to get the default values by chartpublic void setDisplay(boolean display)
display
- if the legend is shown.public boolean isDisplay()
true
if the legend is shown.public HtmlLegendTextCallback getLegendTextCallback()
public void setLegendTextCallback(HtmlLegendTextCallback legendTextCallback)
legendTextCallback
- the callback which can be implemented to change the text of legend for a specific item, as HTMLpublic void setMaximumLegendColumns(int maxColumns)
maxColumns
- the maximum amount of columns of legendpublic int getMaximumLegendColumns()
public final void setCursorPointer(Style.Cursor cursor)
cursor
- cursor typeStyle.Cursor
public final Style.Cursor getCursorPointer()
Style.Cursor