public final class Legend extends EventProvider
| Modifier and Type | Method and Description |
|---|---|
protected <H extends com.google.gwt.event.shared.EventHandler> |
addHandler(com.google.gwt.event.shared.GwtEvent.Type<H> type)
Notifies the event provider when a new handler has been added.
|
LegendLabels |
getLabels() |
Position |
getPosition()
Returns the position of the legend.
|
boolean |
isDisplay()
Returns if the legend is shown.
|
boolean |
isFullWidth()
Returns if marks that this box should take the full width of the canvas (pushing down other boxes)
|
boolean |
isReverse()
Returns if the legend will show datasets in reverse order.
|
protected void |
onClick(ChartNativeEvent event,
GenericJavaScriptObject item)
A callback that is called when a click event is registered on a label item
|
protected void |
onHover(ChartNativeEvent event,
GenericJavaScriptObject item)
A callback that is called when a 'mousemove' event is registered on top of a label item
|
protected <H extends com.google.gwt.event.shared.EventHandler> |
removeHandler(com.google.gwt.event.shared.GwtEvent.Type<H> type)
Notifies the event provider when a new handler has been deregistered
|
void |
setDisplay(boolean display)
Sets if the legend is shown.
|
void |
setFullWidth(boolean fullWidth)
Marks that this box should take the full width of the canvas (pushing down other boxes).
|
void |
setPosition(Position position)
Sets the position of the legend.
|
void |
setReverse(boolean reverse)
Sets the legend will show datasets in reverse order.
|
onAdd, onRemovegetChartcheckAndGetDoubleValues, 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 LegendLabels getLabels()
protected <H extends com.google.gwt.event.shared.EventHandler> void addHandler(com.google.gwt.event.shared.GwtEvent.Type<H> type)
EventProvideraddHandler in class EventProviderH - type of event handlertype - type of eventprotected <H extends com.google.gwt.event.shared.EventHandler> void removeHandler(com.google.gwt.event.shared.GwtEvent.Type<H> type)
EventProviderremoveHandler in class EventProviderH - type of event handlertype - type of event handlerpublic void setDisplay(boolean display)
display - if the legend is shown.public boolean isDisplay()
Options.getLegend().public void setFullWidth(boolean fullWidth)
fullWidth - Marks that this box should take the full width of the canvas (pushing down other boxes)public boolean isFullWidth()
Options.getLegend().public void setReverse(boolean reverse)
reverse - legend will show datasets in reverse order.public boolean isReverse()
Options.getLegend().public void setPosition(Position position)
position - Position of the legend.Positionpublic Position getPosition()
Options.getLegend().Positionprotected void onClick(ChartNativeEvent event, GenericJavaScriptObject item)
event - event generated by chart.item - legend item affected by event.protected void onHover(ChartNativeEvent event, GenericJavaScriptObject item)
event - event generated by chart.item - legend item affected by event.