public class Options extends AbstractItem
chart.defaults.global
.Constructor and Description |
---|
Options(GenericJavaScriptObject javaScriptObject)
Creates the object using the java script object with the defaults provided by CHART.JS.
It's a root element. |
Modifier and Type | Method and Description |
---|---|
Animation |
getAnimation() |
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.
|
java.lang.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.
|
java.lang.String |
getDefaultFontColorAsString()
Returns the default font color to use in the chart, on all objects, if not override by the specific configuration.
|
java.lang.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() |
JsEnumValueArrayList<Event> |
getEvents()
Returns the browser events that the chart should listen to for tooltips and hovering.
|
Hover |
getHover() |
Layout |
getLayout() |
Legend |
getLegend() |
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.
|
Scale |
getScale() |
Scales |
getScales() |
double |
getStartAngle()
Returns the starting angle to draw arcs for the first item in a dataset.
|
Title |
getTitle() |
Tooltips |
getTooltips() |
boolean |
isAnimationEnable()
Returns if should chart be animated or not.
|
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 |
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(java.lang.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(java.lang.String defaultFontColor)
Sets the default font color to use in the chart, on all objects, if not override by the specific configuration.
|
void |
setDefaultFontFamily(java.lang.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, hasProperty
checkAndGetDoubleValues, 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, type
public Options(GenericJavaScriptObject javaScriptObject)
javaScriptObject
- the java script object with the defaults provided by CHART.JS.public Hover getHover()
public Elements getElements()
public Layout getLayout()
public Animation getAnimation()
public Tooltips getTooltips()
public Title getTitle()
public Legend getLegend()
public Scale getScale()
public Scales getScales()
public void setEvents(Event... events)
events
- the browser events that the chart should listen to for tooltips and hovering.public JsEnumValueArrayList<Event> getEvents()
public boolean isAnimationEnable()
true
.public void setResponsive(boolean responsive)
responsive
- the resizing of the chart canvas when its container does.public boolean 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()
public void setMaintainAspectRatio(boolean maintainAspectRatio)
maintainAspectRatio
- the maintaining of the original canvas aspect ratio (width / height) when resizing.public boolean isMaintainAspectRatio()
public void setDevicePixelRatio(double ratio)
ratio
- the pixel ratio.public double getDevicePixelRatio()
window.devicePixelRatio
.public void setDefaultColor(IsColor defaultColor)
defaultColor
- color to use into chart.public void setDefaultColor(java.lang.String defaultColor)
defaultColor
- color to use into chart.public java.lang.String getDefaultColorAsString()
public IsColor getDefaultColor()
public void setDefaultFontColor(IsColor defaultFontColor)
defaultFontColor
- font color to use into chart.public void setDefaultFontColor(java.lang.String defaultFontColor)
defaultFontColor
- font color to use into chart.public java.lang.String getDefaultFontColorAsString()
public IsColor getDefaultFontColor()
public void setDefaultFontSize(int fontSize)
fontSize
- Font size into chart.public int getDefaultFontSize()
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).FontStyle
public FontStyle getDefaultFontStyle()
FontStyle.normal
.FontStyle
public void setDefaultFontFamily(java.lang.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 java.lang.String getDefaultFontFamily()
public void setShowLines(boolean showLine)
showLine
- If false, the lines between points are not drawn.public boolean isShowLines()
public void setSpanGaps(boolean spanGaps)
spanGaps
- If false, NaN data causes a break in the line.public boolean isSpanGaps()
public void setCutoutPercentage(double cutoutPercentage)
cutoutPercentage
- the percentage of the chart that is cut out of the middle.public double getCutoutPercentage()
public void setRotation(double rotation)
rotation
- starting angle to draw arcs from.public double getRotation()
-0.5 * Math.PI
.public void setCircumference(double circumference)
circumference
- the sweep to allow arcs to cover.public double getCircumference()
2 * Math.PI
.public void setStartAngle(double startAngle)
startAngle
- starting angle to draw arcs for the first item in a dataset.public double getStartAngle()
-0.5 * Math.PI
.