Class Options<T extends Options<T,A>,A extends Animation<A>>
java.lang.Object
software.xdev.chartjs.model.options.Options<T,A>
- Direct Known Subclasses:
BarOptions,BubbleOptions,DoughnutOptionsBase,LineOptions,PolarOptions,RadarOptions
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Objectprotected Animations<A>protected CoreInteractionOptionsprotected IndexAxisprotected CoreInteractionOptionsprotected Layoutprotected JavaScriptFunctionprotected Booleanprotected JavaScriptFunctionprotected JavaScriptFunctionprotected Pluginsprotected Booleanprotected Integerprotected Scales -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetHover()protected Tself()setAnimation(Object animation) setAnimations(Animations<A> animations) The following animation options are available.setEvents(Collection<String> events) Default["mousemove", "mouseout", "click", "touchstart", "touchmove", "touchend"]Events that the chart should listen to for tooltips and hoveringsetHover(CoreInteractionOptions hover) The hover configuration is passed into the options.hover namespace.setIndexAxis(IndexAxis indexAxis) setInteraction(CoreInteractionOptions interaction) setLegendCallback(JavaScriptFunction legendCallback) Defaultfunction (chart) { }Function to generate a legend.setMaintainAspectRatio(Boolean maintainAspectRatio) DefaulttrueMaintain the original canvas aspect ratio (width / height) when resizingsetOnClick(JavaScriptFunction onClick) DefaultnullCalled if the event is of type 'mouseup' or 'click'.setOnResize(JavaScriptFunction onResize) DefaultnullCalled when a resize occurs.setPlugins(Plugins plugins) A placeholder in which configuration options for plugins may be passed.setResponsive(Boolean responsive) DefaulttrueResizes when the canvas container does.setResponsiveAnimationDuration(Integer responsiveAnimationDuration) Default0Duration in milliseconds it takes to animate to new size after a resize event.
-
Field Details
-
events
-
indexAxis
-
responsive
-
responsiveAnimationDuration
-
maintainAspectRatio
-
onClick
-
legendCallback
-
onResize
-
interaction
-
hover
-
animations
-
animation
-
layout
-
plugins
-
scales
-
-
Constructor Details
-
Options
public Options()
-
-
Method Details
-
getScales
-
setScales
-
getIndexAxis
-
setIndexAxis
-
getResponsive
- See Also:
-
setResponsive
DefaulttrueResizes when the canvas container does. -
getAnimation
-
setAnimation
-
getResponsiveAnimationDuration
- See Also:
-
setResponsiveAnimationDuration
Default0Duration in milliseconds it takes to animate to new size after a resize event. -
getMaintainAspectRatio
- See Also:
-
setMaintainAspectRatio
DefaulttrueMaintain the original canvas aspect ratio (width / height) when resizing -
getEvents
- See Also:
-
setEvents
Default["mousemove", "mouseout", "click", "touchstart", "touchmove", "touchend"]Events that the chart should listen to for tooltips and hovering -
getOnClick
- See Also:
-
setOnClick
DefaultnullCalled if the event is of type 'mouseup' or 'click'. Called in the context of the chart and passed an array of active arcElements -
getLegendCallback
- See Also:
-
setLegendCallback
Defaultfunction (chart) { }Function to generate a legend. Receives the chart object to generate a legend from. Default implementation returns an HTML string. -
getOnResize
- See Also:
-
setOnResize
DefaultnullCalled when a resize occurs. Gets passed two arguemnts: the chart instance and the new size. -
getInteraction
-
setInteraction
-
getHover
-
setHover
The hover configuration is passed into the options.hover namespace. The global hover configuration is at Chart.defaults.global.hover. -
getAnimations
- See Also:
-
setAnimations
The following animation options are available. The global options for are defined in Chart.defaults.global.animation. -
getLayout
- Returns:
Layoutinstance ornull
-
setLayout
- Parameters:
layout-Layoutinstance ornull- Returns:
thisinstance for chaining
-
getPlugins
- See Also:
-
setPlugins
A placeholder in which configuration options for plugins may be passed.- Parameters:
plugins-Objectornull- Returns:
thisinstance for chaining
-
self
-