Class DefaultChartOptions
- java.lang.Object
- 
- org.pepstock.charba.client.defaults.globals.AbstractDefaultOptions
- 
- org.pepstock.charba.client.defaults.chart.DefaultChartOptions
 
 
- 
- All Implemented Interfaces:
- IsDefaultAnimationContainer,- IsDefaultAnimationTransition,- IsDefaultEventHandler,- IsDefaultOptions,- IsDefaultScaledOptions
 
 public final class DefaultChartOptions extends AbstractDefaultOptions implements IsDefaultScaledOptions Defaults for options element, based on chart type. THIS IS THE ROOT OF ALL ELEMENTS DEFAULTS, for chart defaults.- Author:
- Andrea "Stock" Stocchero
 
- 
- 
Constructor SummaryConstructors Constructor Description DefaultChartOptions(ChartEnvelop<ExtendedOptions> envelop)Creates the default by an extended options instance, which represents the whole options of a chart.DefaultChartOptions(ChartOptions chartOptions)Creates the default by a chart options instance, which represents the global options of a chart.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetAspectRatio()Canvas aspect ratio (i.e.StringgetBackgroundColorAsString()Returns the default background color to use in the chart, on all objects, if not override by the specific configuration.StringgetBorderColorAsString()Returns the default border color to use in the chart, on all objects, if not override by the specific configuration.doublegetCircumference()Returns the sweep to allow arcs to cover.StringgetColorAsString()Returns the default color to use in the chart, on all objects, if not override by the specific configuration.doublegetCutout()Returns the portion of the chart that is cut out of the middle.
 AsDouble, it is considered to be pixels.StringgetCutoutPercentage()Returns the portion of the chart that is cut out of the middle.
 AsStringand ending with '%', percentage of the chart radius.doublegetDevicePixelRatio()The chart's canvas will use a 1:1 pixel ratio, unless the physical display has a higher pixel ratio (e.g.Set<IsEvent>getEvents()Returns the browser events that the chart should listen to.IndexAxisgetIndexAxis()Returns the base axis for the dataset, only for bar options.CLocalegetLocale()Returns the locale instance for internationalization.doublegetRadius()Returns the outer radius of the chart.
 AsDouble, it is considered to be pixels.StringgetRadiusPercentage()Returns the outer radius of the chart.
 AsStringand ending with '%', percentage of the maximum radius.doublegetResizeDelay()Returns the delay the resize update by give amount of milliseconds.
 This can ease the resize process by debouncing update of the elements.doublegetRotation()Returns the starting angle to draw arcs from.IsDefaultScalesgetScales()Returns the scale/axis defaults.booleanisAutoColors()Returnstruewhen the auto colors plugin has been enabled and CHART.JS apply the default colors to datasets.booleanisAutoColorsForceOverride()By default the colors plugin only works when you initialize the chart without any colors for the border or background specified.
 If you want to force the colors plugin to always color your datasets, for example when using dynamic datasets at runtime you will need to set theforceOverrideoption totrue.booleanisDestroyOnDetach()Returnstrueif the chart is configured to be destroyed on the attach of DIV element, otherwisefalse.booleanisDrawOnAttach()Returnstrueif the chart is configured to be drawn on the attach of DIV element, otherwisefalse.booleanisMaintainAspectRatio()Returns the maintaining of the original canvas aspect ratio (width / height) when resizing.booleanisResponsive()Returns the resizing of the chart canvas when its container does.booleanisShowLine()If false, the lines between points are not drawn.booleanisSkipNull()If true, null or undefined values will not be drawn.booleanisSpanGaps()If false,Double.NaNdata causes a break in the line.- 
Methods inherited from class org.pepstock.charba.client.defaults.globals.AbstractDefaultOptionsgetAnimation, getAnimations, getDatasets, getDecimation, getElements, getFiller, getFont, getHover, getInteraction, getLayout, getLegend, getPlugins, getSubtitle, getTitle, getTooltips, getTransitions
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.pepstock.charba.client.defaults.IsDefaultAnimationContainergetTransitions
 - 
Methods inherited from interface org.pepstock.charba.client.defaults.IsDefaultAnimationTransitiongetAnimation, getAnimations
 - 
Methods inherited from interface org.pepstock.charba.client.defaults.IsDefaultEventHandlergetEvents
 - 
Methods inherited from interface org.pepstock.charba.client.defaults.IsDefaultOptionsgetAspectRatio, getBackgroundColorAsString, getBorderColorAsString, getCircumference, getColorAsString, getCutout, getCutoutPercentage, getDatasets, getDecimation, getDevicePixelRatio, getElements, getFiller, getFont, getHover, getIndexAxis, getInteraction, getLayout, getLegend, getLocale, getPlugins, getRadius, getRadiusPercentage, getResizeDelay, getRotation, getSubtitle, getTitle, getTooltips, isAutoColors, isAutoColorsForceOverride, isDestroyOnDetach, isDrawOnAttach, isMaintainAspectRatio, isResponsive, isShowLine, isSkipNull, isSpanGaps
 
- 
 
- 
- 
- 
Constructor Detail- 
DefaultChartOptionspublic DefaultChartOptions(ChartEnvelop<ExtendedOptions> envelop) Creates the default by an extended options instance, which represents the whole options of a chart.- Parameters:
- envelop- contains the whole chart options instance.
 
 - 
DefaultChartOptionspublic DefaultChartOptions(ChartOptions chartOptions) Creates the default by a chart options instance, which represents the global options of a chart.- Parameters:
- chartOptions- global chart options instance.
 
 
- 
 - 
Method Detail- 
getScalespublic IsDefaultScales getScales() Description copied from interface:IsDefaultScaledOptionsReturns the scale/axis defaults.- Specified by:
- getScalesin interface- IsDefaultScaledOptions
- Returns:
- the scale/axis defaults.
 
 - 
getEventspublic Set<IsEvent> getEvents() Description copied from interface:IsDefaultEventHandlerReturns the browser events that the chart should listen to.- Returns:
- the browser events that the chart should listen to.
 
 - 
getLocalepublic CLocale getLocale() Description copied from interface:IsDefaultOptionsReturns the locale instance for internationalization.- Returns:
- the locale instance
 
 - 
isResponsivepublic final boolean isResponsive() Description copied from interface:IsDefaultOptionsReturns the resizing of the chart canvas when its container does.- Returns:
- the resizing of the chart canvas when its container does.
 
 - 
isMaintainAspectRatiopublic final boolean isMaintainAspectRatio() Description copied from interface:IsDefaultOptionsReturns the maintaining of the original canvas aspect ratio (width / height) when resizing.- Returns:
- the maintaining of the original canvas aspect ratio (width / height) when resizing.
 
 - 
getAspectRatiopublic final double getAspectRatio() Description copied from interface:IsDefaultOptionsCanvas aspect ratio (i.e. width / height, a value of 1 representing a square canvas).
 Note that this option is ignored if the height is explicitly defined either as attribute or via the style.- Returns:
- the aspect ratio.
 
 - 
getResizeDelaypublic double getResizeDelay() Description copied from interface:IsDefaultOptionsReturns the delay the resize update by give amount of milliseconds.
 This can ease the resize process by debouncing update of the elements.- Returns:
- the delay the resize update by give amount of milliseconds
 
 - 
getDevicePixelRatiopublic final double getDevicePixelRatio() Description copied from interface:IsDefaultOptionsThe chart's canvas will use a 1:1 pixel ratio, unless the physical display has a higher pixel ratio (e.g. Retina displays). Setting devicePixelRatio to a value other than 1 will force the canvas size to be scaled by that amount. Returns the pixel ratio.- Returns:
- the pixel ratio.
 
 - 
getColorAsStringpublic final String getColorAsString() Description copied from interface:IsDefaultOptionsReturns the default color to use in the chart, on all objects, if not override by the specific configuration.- Returns:
- color to use in the chart.
 
 - 
getBackgroundColorAsStringpublic String getBackgroundColorAsString() Description copied from interface:IsDefaultOptionsReturns the default background color to use in the chart, on all objects, if not override by the specific configuration.- Returns:
- background color to use in the chart.
 
 - 
getBorderColorAsStringpublic String getBorderColorAsString() Description copied from interface:IsDefaultOptionsReturns the default border color to use in the chart, on all objects, if not override by the specific configuration.- Returns:
- border color to use in the chart.
 
 - 
isAutoColorspublic boolean isAutoColors() Description copied from interface:IsDefaultOptionsReturnstruewhen the auto colors plugin has been enabled and CHART.JS apply the default colors to datasets.- Returns:
- truewhen the auto colors plugin has been enabled and CHART.JS apply the default colors to datasets
 
 - 
isAutoColorsForceOverridepublic boolean isAutoColorsForceOverride() Description copied from interface:IsDefaultOptionsBy default the colors plugin only works when you initialize the chart without any colors for the border or background specified.
 If you want to force the colors plugin to always color your datasets, for example when using dynamic datasets at runtime you will need to set theforceOverrideoption totrue.- Returns:
- trueif auto color plugin forces setting palette.
 
 - 
isShowLinepublic final boolean isShowLine() Description copied from interface:IsDefaultOptionsIf false, the lines between points are not drawn.- Returns:
- If false, the lines between points are not drawn.
 
 - 
isSpanGapspublic final boolean isSpanGaps() Description copied from interface:IsDefaultOptionsIf false,Double.NaNdata causes a break in the line.- Returns:
- If false, Double.NaNdata causes a break in the line.
 
 - 
getCutoutpublic double getCutout() Description copied from interface:IsDefaultOptionsReturns the portion of the chart that is cut out of the middle.
 AsDouble, it is considered to be pixels.- Returns:
- the portion of the chart that is cut out of the middle.
 AsDouble, it is considered to be pixels.
 
 - 
getCutoutPercentagepublic String getCutoutPercentage() Description copied from interface:IsDefaultOptionsReturns the portion of the chart that is cut out of the middle.
 AsStringand ending with '%', percentage of the chart radius.- Returns:
- the portion of the chart that is cut out of the middle.
 AsStringand ending with '%', percentage of the chart radius.
 
 - 
getRadiuspublic double getRadius() Description copied from interface:IsDefaultOptionsReturns the outer radius of the chart.
 AsDouble, it is considered to be pixels.- Returns:
- the outer radius of the chart.
 AsDouble, it is considered to be pixels.
 
 - 
getRadiusPercentagepublic String getRadiusPercentage() Description copied from interface:IsDefaultOptionsReturns the outer radius of the chart.
 AsStringand ending with '%', percentage of the maximum radius.- Returns:
- the outer radius of the chart.
 AsStringand ending with '%', percentage of the maximum radius.
 
 - 
getRotationpublic final double getRotation() Description copied from interface:IsDefaultOptionsReturns the starting angle to draw arcs from.- Returns:
- starting angle to draw arcs from.
 
 - 
getCircumferencepublic final double getCircumference() Description copied from interface:IsDefaultOptionsReturns the sweep to allow arcs to cover.- Returns:
- the sweep to allow arcs to cover.
 
 - 
isDrawOnAttachpublic final boolean isDrawOnAttach() Description copied from interface:IsDefaultOptionsReturnstrueif the chart is configured to be drawn on the attach of DIV element, otherwisefalse.- Returns:
- the drawOnAttach trueif the chart is configured to be drawn on the attach of DIV element, otherwisefalse.
 
 - 
isDestroyOnDetachpublic final boolean isDestroyOnDetach() Description copied from interface:IsDefaultOptionsReturnstrueif the chart is configured to be destroyed on the attach of DIV element, otherwisefalse.- Returns:
- the destroyOnDetach trueif the chart is configured to be destroyed on the attach of DIV element, otherwisefalse.
 
 - 
isSkipNullpublic final boolean isSkipNull() Description copied from interface:IsDefaultOptionsIf true, null or undefined values will not be drawn.- Returns:
- If true, null or undefined values will not be drawn.
 
 - 
getIndexAxispublic final IndexAxis getIndexAxis() Description copied from interface:IsDefaultOptionsReturns the base axis for the dataset, only for bar options.- Returns:
- the base axis for the dataset, only for bar options
 
 
- 
 
-