public class Options extends AbstractModel<Options,IsDefaultOptions> implements IsDefaultOptions
Modifier | Constructor and Description |
---|---|
protected |
Options(IsDefaultOptions defaultValues)
Creates the object only with default provider.
|
protected |
Options(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.
|
double |
getAspectRatio()
Canvas aspect ratio (i.e.
|
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.
|
double |
getCutoutPercentage()
Returns the the percentage of the chart that is cut out of the middle.
|
IsColor |
getDefaultColor()
Returns the default color to use in the chart, on all objects, if not override by the specific configuration.
|
String |
getDefaultColorAsString()
Returns the default color to use in the chart, on all objects, if not override by the specific configuration.
|
IsColor |
getDefaultFontColor()
Returns the default font color to use in the chart, on all objects, if not override by the specific configuration.
|
String |
getDefaultFontColorAsString()
Returns the default font color to use in the chart, on all objects, if not override by the specific configuration.
|
String |
getDefaultFontFamily()
Returns the font family to use in the chart, on all objects, if not override by the specific configuration, follows CSS
font-family options.
|
int |
getDefaultFontSize()
Returns the font size to use in the chart, on all objects, if not override by the specific configuration.
|
FontStyle |
getDefaultFontStyle()
Returns the font style to use in the chart, on all objects, if not override by the specific configuration, follows CSS
font-style options (i.e.
|
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.
|
List<Event> |
getEvents()
Returns the browser events that the chart should listen to for tooltips and hovering.
|
Hover |
getHover()
Returns the hover element.
|
Layout |
getLayout()
Returns the layout element.
|
Legend |
getLegend()
Returns the legend element.
|
Plugins |
getPlugins()
Returns the plugins element.
|
int |
getResponsiveAnimationDuration()
Returns the duration in milliseconds it takes to animate to new size after a resize event.
|
double |
getRotation()
Returns the starting angle to draw arcs from.
|
double |
getStartAngle()
Returns the starting angle to draw arcs for the first item in a dataset.
|
Title |
getTitle()
Returns the title element.
|
Tooltips |
getTooltips()
Returns the tooltips element.
|
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 |
isShowLines()
If
false , the lines between points are not drawn. |
boolean |
isSpanGaps()
If
false , NaN data causes a break in the line. |
void |
setAspectRatio(double ratio)
Canvas aspect ratio (i.e.
|
void |
setCircumference(double circumference)
Sets the sweep to allow arcs to cover.
|
void |
setCutoutPercentage(double cutoutPercentage)
Sets the percentage of the chart that is cut out of the middle.
|
void |
setDefaultColor(IsColor defaultColor)
Sets the default color to use in the chart, on all objects, if not override by the specific configuration.
|
void |
setDefaultColor(String defaultColor)
Sets the default color to use in the chart, on all objects, if not override by the specific configuration.
|
void |
setDefaultFontColor(IsColor defaultFontColor)
Sets the default font color to use in the chart, on all objects, if not override by the specific configuration.
|
void |
setDefaultFontColor(String defaultFontColor)
Sets the default font color to use in the chart, on all objects, if not override by the specific configuration.
|
void |
setDefaultFontFamily(String fontFamily)
Sets the font family to use in the chart, on all objects, if not override by the specific configuration, follows CSS
font-family options.
|
void |
setDefaultFontSize(int fontSize)
Sets the font size to use in the chart, on all objects, if not override by the specific configuration.
|
void |
setDefaultFontStyle(FontStyle fontStyle)
Sets the font style to use in the chart, on all objects, if not override by the specific configuration, follows CSS
font-style options (i.e.
|
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 |
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.
|
void |
setRotation(double rotation)
Sets the starting angle to draw arcs from.
|
void |
setShowLines(boolean showLine)
If
false , the lines between points are not drawn. |
void |
setSpanGaps(boolean spanGaps)
If
false , NaN data causes a break in the line. |
void |
setStartAngle(double startAngle)
Sets the starting angle to draw arcs for the first item in a dataset.
|
checkAndAddToParent, getChildKey, getDefaultValues, getParent, setCallbackToModel, setEventToModel
getArrayValue, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, 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
protected Options(IsDefaultOptions defaultValues)
defaultValues
- default provider instance.protected Options(IsDefaultOptions defaultValues, NativeObject nativeObject)
defaultValues
- default provider instance.nativeObject
- native object to store properties.public Animation getAnimation()
getAnimation
in interface IsDefaultOptions
public Legend getLegend()
getLegend
in interface IsDefaultOptions
public final Hover getHover()
getHover
in interface IsDefaultOptions
public final Layout getLayout()
getLayout
in interface IsDefaultOptions
public final Elements getElements()
getElements
in interface IsDefaultOptions
public final Title getTitle()
getTitle
in interface IsDefaultOptions
public final Tooltips getTooltips()
getTooltips
in interface IsDefaultOptions
public final Plugins getPlugins()
public String getCharbaId()
UndefinedValues.STRING
.public void setEvents(Event... events)
events
- the browser events that the chart should listen to for tooltips and hovering.public List<Event> getEvents()
public void setResponsive(boolean responsive)
responsive
- the resizing of the chart canvas when its container does.public boolean isResponsive()
isResponsive
in interface IsDefaultOptions
public void setResponsiveAnimationDuration(int milliseconds)
milliseconds
- the duration in milliseconds it takes to animate to new size after a resize event.public int getResponsiveAnimationDuration()
getResponsiveAnimationDuration
in interface IsDefaultOptions
public void setMaintainAspectRatio(boolean maintainAspectRatio)
maintainAspectRatio
- the maintaining of the original canvas aspect ratio (width / height) when resizing.public boolean isMaintainAspectRatio()
isMaintainAspectRatio
in interface IsDefaultOptions
public void setAspectRatio(double ratio)
ratio
- the aspect ratio.public double getAspectRatio()
getAspectRatio
in interface IsDefaultOptions
public void setDevicePixelRatio(double ratio)
ratio
- the pixel ratio.public double getDevicePixelRatio()
getDevicePixelRatio
in interface IsDefaultOptions
public void setDefaultColor(IsColor defaultColor)
defaultColor
- color to use into chart.public void setDefaultColor(String defaultColor)
defaultColor
- color to use into chart.public String getDefaultColorAsString()
getDefaultColorAsString
in interface IsDefaultOptions
public IsColor getDefaultColor()
public void setDefaultFontColor(IsColor defaultFontColor)
defaultFontColor
- font color to use into chart.public void setDefaultFontColor(String defaultFontColor)
defaultFontColor
- font color to use into chart.public String getDefaultFontColorAsString()
getDefaultFontColorAsString
in interface IsDefaultOptions
public IsColor getDefaultFontColor()
public void setDefaultFontSize(int fontSize)
fontSize
- Font size into chart.public int getDefaultFontSize()
getDefaultFontSize
in interface IsDefaultOptions
public void setDefaultFontStyle(FontStyle fontStyle)
fontStyle
- font style to use in the chart, on all objects, if not override by the specific configuration, follows
CSS font-style options (i.e. normal, italic, oblique, initial, inherit).public FontStyle getDefaultFontStyle()
getDefaultFontStyle
in interface IsDefaultOptions
public void setDefaultFontFamily(String fontFamily)
fontFamily
- Font family to use in the chart, on all objects, if not override by the specific configuration, follows
CSS font-family options.public String getDefaultFontFamily()
getDefaultFontFamily
in interface IsDefaultOptions
public void setShowLines(boolean showLine)
false
, the lines between points are not drawn.showLine
- if false
, the lines between points are not drawn.public boolean isShowLines()
false
, the lines between points are not drawn.isShowLines
in interface IsDefaultOptions
false
, the lines between points are not drawn..public void setSpanGaps(boolean spanGaps)
false
, NaN
data causes a break in the line.spanGaps
- if false
, NaN
data causes a break in the line.public boolean isSpanGaps()
false
, NaN
data causes a break in the line.isSpanGaps
in interface IsDefaultOptions
false
, NaN
data causes a break in the line.public void setCutoutPercentage(double cutoutPercentage)
cutoutPercentage
- the percentage of the chart that is cut out of the middle.public double getCutoutPercentage()
getCutoutPercentage
in interface IsDefaultOptions
public void setRotation(double rotation)
rotation
- starting angle to draw arcs from.public double getRotation()
getRotation
in interface IsDefaultOptions
public void setCircumference(double circumference)
circumference
- the sweep to allow arcs to cover.public double getCircumference()
getCircumference
in interface IsDefaultOptions
public void setStartAngle(double startAngle)
startAngle
- starting angle to draw arcs for the first item in a dataset.public double getStartAngle()
getStartAngle
in interface IsDefaultOptions