public class Options extends AbstractModel<Options,IsDefaultOptions> implements IsDefaultOptions, HasSpanGaps, HasAnimationOptions, HasCallbackScope
| Modifier and Type | Class and Description |
|---|---|
protected static class |
Options.CommonProperty
Name of properties of native object.
Properties common with which extends this class. |
| Modifier | Constructor and Description |
|---|---|
protected |
Options(String scope,
IsDefaultOptions defaultValues)
Creates the object only with default provider.
|
protected |
Options(String scope,
IsDefaultOptions defaultValues,
NativeObject nativeObject)
Creates the object only with default provider and native object.
|
| Modifier and Type | Method and Description |
|---|---|
Animation |
getAnimation()
Returns the animation element.
|
AnimationContainer |
getAnimationContainer()
Returns an animation container instance to use in the default methods of this interface.
|
double |
getAspectRatio()
Canvas aspect ratio (i.e.
|
IsColor |
getBackgroundColor()
Returns the default background color to use in the chart, on all objects, if not override by the specific configuration.
|
String |
getBackgroundColorAsString()
Returns the default background color to use in the chart, on all objects, if not override by the specific configuration.
|
IsColor |
getBorderColor()
Returns the default border color to use in the chart, on all objects, if not override by the specific configuration.
|
String |
getBorderColorAsString()
Returns the default border color to use in the chart, on all objects, if not override by the specific configuration.
|
String |
getCharbaId()
Returns the CHARBA id when the options are related to a chart instance.
|
double |
getCircumference()
Returns the the sweep to allow arcs to cover.
|
IsColor |
getColor()
Returns the default color to use in the chart, on all objects, if not override by the specific configuration.
|
String |
getColorAsString()
Returns the default color to use in the chart, on all objects, if not override by the specific configuration.
|
double |
getCutout()
Returns the portion of the chart that is cut out of the middle.
As Double, it is considered to be pixels. |
String |
getCutoutPercentage()
Returns the portion of the chart that is cut out of the middle.
As String and ending with '%', percentage of the chart radius. |
Datasets |
getDatasets()
Returns the data sets element.
|
Decimation |
getDecimation()
Returns the decimation plugin element.
|
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()
Returns the elements element.
|
Set<Event> |
getEvents()
Returns the browser events that the chart should listen to.
|
Filler |
getFiller()
Returns the filler plugin element.
|
Font |
getFont()
Returns the font element.
|
Hover |
getHover()
Returns the hover element.
|
IndexAxis |
getIndexAxis()
Returns the base axis for the dataset, only for bar options.
|
Interaction |
getInteraction()
Returns the interaction element.
|
Layout |
getLayout()
Returns the layout element.
|
Legend |
getLegend()
Returns the legend element.
|
CLocale |
getLocale()
Returns the locale instance for internationalization.
|
Plugins |
getPlugins()
Returns the plugins element.
|
double |
getRadius()
Returns the outer radius of the chart.
As Double, it is considered to be pixels. |
String |
getRadiusPercentage()
Returns the outer radius of the chart.
As String and ending with '%', percentage of the maximum radius. |
double |
getResizeDelay()
Returns the delay the resize update by give amount of milliseconds.
This can ease the resize process by debouncing update of the elements. |
double |
getRotation()
Returns the starting angle to draw arcs from.
|
String |
getScope()
Returns the scope of the options, which is the options are used for defaults, chart defaults or chart.
|
SpanGapHandler |
getSpanGapHandler()
Returns a span gap handler instance to use in the default methods of this interface.
|
Subtitle |
getSubtitle()
Returns the title element.
|
Title |
getTitle()
Returns the title element.
|
Tooltips |
getTooltips()
Returns the tooltips element.
|
boolean |
isDestroyOnDetach()
Returns
true if the chart is configured to be destroyed on the detach from DIV element, otherwise false. |
boolean |
isDrawOnAttach()
Returns
true if the chart is configured to be drawn on the attach of DIV element, otherwise false. |
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.
|
boolean |
isShowLine()
If
false, the lines between points are not drawn. |
boolean |
isSkipNull()
If
true, null or undefined values will not be drawn. |
boolean |
isSpanGaps()
If false,
Double.NaN data causes a break in the line. |
void |
setAspectRatio(double ratio)
Canvas aspect ratio (i.e.
|
void |
setBackgroundColor(IsColor backgroundColor)
Sets the default background color to use in the chart, on all objects, if not override by the specific configuration.
|
void |
setBackgroundColor(String backgroundColor)
Sets the default background color to use in the chart, on all objects, if not override by the specific configuration.
|
void |
setBorderColor(IsColor borderColor)
Sets the default border color to use in the chart, on all objects, if not override by the specific configuration.
|
void |
setBorderColor(String borderColor)
Sets the default border color to use in the chart, on all objects, if not override by the specific configuration.
|
void |
setCircumference(double circumference)
Sets the sweep to allow arcs to cover.
|
void |
setColor(IsColor color)
Sets the default color to use in the chart, on all objects, if not override by the specific configuration.
|
void |
setColor(String color)
Sets the default color to use in the chart, on all objects, if not override by the specific configuration.
|
void |
setCutout(double cutout)
Sets the portion of the chart that is cut out of the middle.
As Double, it is considered to be pixels. |
void |
setCutoutPercentage(String cutout)
Sets the portion of the chart that is cut out of the middle.
As String and ending with '%', percentage of the chart radius. |
void |
setDestroyOnDetach(boolean destroyOnDetach)
Sets
true if the chart is configured to be destroyed on the detach from DIV element, otherwise false. |
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 |
setDrawOnAttach(boolean drawOnAttach)
Sets
true if the chart is configured to be draw on the attach of DIV element, otherwise false. |
void |
setEvents(Event... events)
Sets the browser events that the chart should listen to.
|
void |
setEvents(Set<Event> events)
Sets the browser events that the legend should listen to.
|
void |
setIndexAxis(IndexAxis indexAxis)
Sets the base axis for the dataset.
|
void |
setLocale(CLocale locale)
Sets the locale instance for internationalization.
|
void |
setMaintainAspectRatio(boolean maintainAspectRatio)
Sets the maintaining of the original canvas aspect ratio (width / height) when resizing.
|
void |
setRadius(double radius)
Sets the outer radius of the chart.
As Double, it is considered to be pixels. |
void |
setRadiusPercentage(String radius)
Sets the outer radius of the chart.
As String and ending with '%', percentage of the maximum radius. |
void |
setResizeDelay(int delay)
Sets the delay the resize update by give amount of milliseconds.
This can ease the resize process by debouncing update of the elements. |
void |
setResponsive(boolean responsive)
Sets the resizing of the chart canvas when its container does.
|
void |
setRotation(double rotation)
Sets the starting angle to draw arcs from.
|
void |
setShowLine(boolean showLine)
If
false, the lines between points are not drawn. |
void |
setSkipNull(boolean skipNull)
If
true, null or undefined values will not be drawn. |
getDefaultValues, getParent, loadPadding, setCallbackToModel, setCallbackToModel, setEventToModelcheckAndAddToParent, getChildKey, getParentNode, getRootNode, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParentcheckDefaultValuesArgument, empty, getArrayValue, getElement, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setElement, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, typeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSpanGaps, setSpanGaps, setSpanGapsgetAnimations, getTransitions, isAnimationEnabled, setAnimationEnabledextractScopeprotected Options(String scope, IsDefaultOptions defaultValues)
scope - scope of the optionsdefaultValues - default provider instance.protected Options(String scope, IsDefaultOptions defaultValues, NativeObject nativeObject)
scope - scope of the optionsdefaultValues - default provider instance.nativeObject - native object to store properties.public final Font getFont()
getFont in interface IsDefaultOptionspublic final SpanGapHandler getSpanGapHandler()
HasSpanGapsgetSpanGapHandler in interface HasSpanGapspublic final String getScope()
getScope in interface HasCallbackScopepublic Animation getAnimation()
getAnimation in interface IsDefaultAnimationTransitiongetAnimation in interface HasAnimationOptionspublic final AnimationContainer getAnimationContainer()
HasAnimationOptionsgetAnimationContainer in interface HasAnimationOptionspublic Legend getLegend()
getLegend in interface IsDefaultOptionspublic final Hover getHover()
getHover in interface IsDefaultOptionspublic final Interaction getInteraction()
getInteraction in interface IsDefaultOptionspublic final Layout getLayout()
getLayout in interface IsDefaultOptionspublic final Decimation getDecimation()
getDecimation in interface IsDefaultOptionspublic final Filler getFiller()
getFiller in interface IsDefaultOptionspublic final Elements getElements()
getElements in interface IsDefaultOptionspublic final Title getTitle()
getTitle in interface IsDefaultOptionspublic final Subtitle getSubtitle()
getSubtitle in interface IsDefaultOptionspublic final Tooltips getTooltips()
getTooltips in interface IsDefaultOptionspublic Plugins getPlugins()
getPlugins in interface IsDefaultOptionspublic Datasets getDatasets()
getDatasets in interface IsDefaultOptionspublic String getCharbaId()
Undefined.STRING.public void setEvents(Event... events)
events - the browser events that the chart should listen to.public void setEvents(Set<Event> events)
events - the browser events that the legend should listen to.public Set<Event> getEvents()
getEvents in interface IsDefaultOptionspublic void setLocale(CLocale locale)
locale - the locale instancepublic CLocale getLocale()
getLocale in interface IsDefaultOptionspublic void setResponsive(boolean responsive)
responsive - the resizing of the chart canvas when its container does.public boolean isResponsive()
isResponsive in interface IsDefaultOptionspublic void setMaintainAspectRatio(boolean maintainAspectRatio)
maintainAspectRatio - the maintaining of the original canvas aspect ratio (width / height) when resizing.public boolean isMaintainAspectRatio()
isMaintainAspectRatio in interface IsDefaultOptionspublic void setAspectRatio(double ratio)
ratio - the aspect ratio.public double getAspectRatio()
getAspectRatio in interface IsDefaultOptionspublic void setResizeDelay(int delay)
delay - the delay the resize update by give amount of millisecondspublic double getResizeDelay()
getResizeDelay in interface IsDefaultOptionspublic void setDevicePixelRatio(double ratio)
ratio - the pixel ratio.public double getDevicePixelRatio()
getDevicePixelRatio in interface IsDefaultOptionspublic boolean isDrawOnAttach()
true if the chart is configured to be drawn on the attach of DIV element, otherwise false.isDrawOnAttach in interface IsDefaultOptionstrue if the chart is configured to be drawn on the attach of DIV element, otherwise false.public void setDrawOnAttach(boolean drawOnAttach)
true if the chart is configured to be draw on the attach of DIV element, otherwise false.drawOnAttach - the drawOnAttach to setpublic boolean isDestroyOnDetach()
true if the chart is configured to be destroyed on the detach from DIV element, otherwise false.isDestroyOnDetach in interface IsDefaultOptionstrue if the chart is configured to be destroyed on the attach of DIV element, otherwise false.public void setDestroyOnDetach(boolean destroyOnDetach)
true if the chart is configured to be destroyed on the detach from DIV element, otherwise false.destroyOnDetach - the destroyOnDetach to setpublic void setColor(IsColor color)
color - color to use in the chart.public void setColor(String color)
color - color to use in the chart.public String getColorAsString()
getColorAsString in interface IsDefaultOptionspublic IsColor getColor()
public void setBackgroundColor(IsColor backgroundColor)
backgroundColor - background color to use in the chart.public void setBackgroundColor(String backgroundColor)
backgroundColor - background color to use in the chart.public String getBackgroundColorAsString()
getBackgroundColorAsString in interface IsDefaultOptionspublic IsColor getBackgroundColor()
public void setBorderColor(IsColor borderColor)
borderColor - border color to use in the chart.public void setBorderColor(String borderColor)
borderColor - border color to use in the chart.public String getBorderColorAsString()
getBorderColorAsString in interface IsDefaultOptionspublic IsColor getBorderColor()
public void setShowLine(boolean showLine)
false, the lines between points are not drawn.showLine - if false, the lines between points are not drawn.public boolean isShowLine()
false, the lines between points are not drawn.isShowLine in interface IsDefaultOptionsfalse, the lines between points are not drawn.public void setSkipNull(boolean skipNull)
true, null or undefined values will not be drawn.skipNull - if true, null or undefined values will not be drawnpublic boolean isSkipNull()
true, null or undefined values will not be drawn.isSkipNull in interface IsDefaultOptionstrue, null or undefined values will not be drawnpublic void setCutout(double cutout)
Double, it is considered to be pixels.cutout - the portion of the chart that is cut out of the middle.Double, it is considered to be pixels.public double getCutout()
Double, it is considered to be pixels.getCutout in interface IsDefaultOptionsDouble, it is considered to be pixels.public void setCutoutPercentage(String cutout)
String and ending with '%', percentage of the chart radius.cutout - the portion of the chart that is cut out of the middle.String and ending with '%', percentage of the chart radius.public String getCutoutPercentage()
String and ending with '%', percentage of the chart radius.getCutoutPercentage in interface IsDefaultOptionsString and ending with '%', percentage of the chart radius.public void setRadius(double radius)
Double, it is considered to be pixels.radius - the outer radius of the chart.Double, it is considered to be pixels.public double getRadius()
Double, it is considered to be pixels.getRadius in interface IsDefaultOptionsDouble, it is considered to be pixels.public void setRadiusPercentage(String radius)
String and ending with '%', percentage of the maximum radius.radius - the outer radius of the chart.String and ending with '%', percentage of the maximum radius.public String getRadiusPercentage()
String and ending with '%', percentage of the maximum radius.getRadiusPercentage in interface IsDefaultOptionsString and ending with '%', percentage of the maximum radius.public void setRotation(double rotation)
rotation - starting angle to draw arcs from.public double getRotation()
getRotation in interface IsDefaultOptionspublic void setCircumference(double circumference)
circumference - the sweep to allow arcs to cover.public double getCircumference()
getCircumference in interface IsDefaultOptionspublic void setIndexAxis(IndexAxis indexAxis)
IndexAxis.Y for horizontal bar.indexAxis - the base axis for the datasetpublic IndexAxis getIndexAxis()
getIndexAxis in interface IsDefaultOptionspublic boolean isSpanGaps()
IsDefaultOptionsDouble.NaN data causes a break in the line.isSpanGaps in interface IsDefaultOptionsisSpanGaps in interface HasSpanGapsDouble.NaN data causes a break in the line.