public abstract class BaseOptions extends EventProvider
charbaId property key.| Modifier | Constructor and Description |
|---|---|
protected |
BaseOptions(AbstractChart<?,?> chart)
Builds the object storing the chart instance.
Sets also the internal parts of options. |
| 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.
|
protected java.lang.String |
generateLegend()
Called to generate an HTML legend.
|
Animation |
getAnimation() |
double |
getDevicePixelRatio()
The chart's canvas will use a 1:1 pixel ratio, unless the physical display has a higher pixel ratio (e.g.
|
Elements |
getElements() |
JsEnumValueArrayList<Event> |
getEvents()
Returns the browser events that the chart should listen to for tooltips and hovering.
|
Hover |
getHover() |
Layout |
getLayout() |
Legend |
getLegend() |
LegendCallback |
getLegendCallBack() |
Plugins |
getPlugins() |
int |
getResponsiveAnimationDuration()
Returns the duration in milliseconds it takes to animate to new size after a resize event.
|
Title |
getTitle() |
Tooltips |
getTooltips() |
boolean |
isAnimationEnable()
Returns if should chart be animated or not Default value is
true. |
boolean |
isMaintainAspectRatio()
Returns the the maintaining of the original canvas aspect ratio (width / height) when resizing.
|
boolean |
isResponsive()
Returns the resizing of the chart canvas when its container does.
|
protected void |
onClick(ChartNativeEvent event,
GenericJavaScriptObject metadata)
Called if the event is of type 'mouseup' or 'click'.
|
protected void |
onHover(ChartNativeEvent event,
GenericJavaScriptObject metadata)
Called when any of the events fire.
|
protected void |
onItemClick(ChartNativeEvent event,
GenericJavaScriptObject object)
Called if the event is of type 'mouseup' or 'click'.
|
protected void |
onResize(GenericJavaScriptObject item)
Called when a resize occurs.
|
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 |
setAnimationEnabled(boolean enabled)
Specify should chart be animated or not Default value is
true. |
void |
setDevicePixelRatio(double ratio)
The chart's canvas will use a 1:1 pixel ratio, unless the physical display has a higher pixel ratio (e.g.
|
void |
setEvents(Event... events)
Sets the browser events that the chart should listen to for tooltips and hovering.
|
void |
setLegendCallBack(LegendCallback legendCallBack) |
void |
setMaintainAspectRatio(boolean maintainAspectRatio)
Sets the maintaining of the original canvas aspect ratio (width / height) when resizing.
|
void |
setResponsive(boolean responsive)
Sets the resizing of the chart canvas when its container does.
|
void |
setResponsiveAnimationDuration(int milliseconds)
Sets the duration in milliseconds it takes to animate to new size after a resize event.
|
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, typeprotected BaseOptions(AbstractChart<?,?> chart)
chart - chart instancepublic Animation getAnimation()
public Hover getHover()
public Layout getLayout()
public Legend getLegend()
public Title getTitle()
public Tooltips getTooltips()
public Elements getElements()
public Plugins getPlugins()
public void setEvents(Event... events)
events - the browser events that the chart should listen to for tooltips and hovering.public JsEnumValueArrayList<Event> getEvents()
Options.getEvents().public LegendCallback getLegendCallBack()
public void setLegendCallBack(LegendCallback legendCallBack)
legendCallBack - the legendCallBack to setpublic void setAnimationEnabled(boolean enabled)
true.enabled - Specify should chart be animated or not.public boolean isAnimationEnable()
true.true.public void setResponsive(boolean responsive)
responsive - the resizing of the chart canvas when its container does.public boolean isResponsive()
Options.isResponsive().public void setResponsiveAnimationDuration(int milliseconds)
milliseconds - the duration in milliseconds it takes to animate to new size after a resize event.public int getResponsiveAnimationDuration()
Options.getResponsiveAnimationDuration().public void setMaintainAspectRatio(boolean maintainAspectRatio)
maintainAspectRatio - the maintaining of the original canvas aspect ratio (width / height) when resizing.public boolean isMaintainAspectRatio()
Options.isMaintainAspectRatio().public void setDevicePixelRatio(double ratio)
ratio - the pixel ratio.public double getDevicePixelRatio()
Options.getDevicePixelRatio()..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 handlerprotected void onHover(ChartNativeEvent event, GenericJavaScriptObject metadata)
event - event generated by chart.metadata - dataset meta data.protected void onClick(ChartNativeEvent event, GenericJavaScriptObject metadata)
event - event generated by chart.metadata - dataset meta data.protected void onItemClick(ChartNativeEvent event, GenericJavaScriptObject object)
event - event generated by chart.object - java script object dataset meta data.protected void onResize(GenericJavaScriptObject item)
item - the new size item.protected java.lang.String generateLegend()