Class DefaultChartTooltips
- java.lang.Object
- 
- org.pepstock.charba.client.defaults.chart.DefaultChartTooltips
 
- 
- All Implemented Interfaces:
- IsDefaultAnimationContainer,- IsDefaultAnimationTransition,- IsDefaultBoxHandler,- IsDefaultEventHandler,- IsDefaultTextDirectionHandler,- IsDefaultTooltips
 
 public final class DefaultChartTooltips extends Object implements IsDefaultTooltips Defaults for tooltips option element, based on chart type.- Author:
- Andrea "Stock" Stocchero
 
- 
- 
Constructor SummaryConstructors Constructor Description DefaultChartTooltips(IsDefaultTooltips tooltip)Creates the object by tooltip option element instance.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description IsDefaultAnimationgetAnimation()Returns the animation element.IsDefaultAnimationsgetAnimations()Returns the animations collection element.StringgetBackgroundColorAsString()Returns the background color of the tooltip.TextAligngetBodyAlign()Returns the body alignment.StringgetBodyColorAsString()Returns the body font color as string.IsDefaultFontgetBodyFont()Returns the body line font.intgetBodySpacing()Returns the spacing to add to top and bottom of each tooltip item.StringgetBorderColorAsString()Returns the color of the border.intgetBorderWidth()Returns the size of the border.intgetBoxHeight()Returns the height of colored box.intgetBoxPadding()Returns the padding between the color box and the text.intgetBoxWidth()Returns the width of colored box.intgetCaretPadding()Returns the extra distance to move the end of the tooltip arrow away from the tooltip point.intgetCaretSize()Returns the size, in px, of the tooltip arrow.intgetCornerRadius()Returns the radius of tooltip corner curves.Set<IsEvent>getEvents()Returns the browser events that the chart should listen to.TextAligngetFooterAlign()Returns the footer alignment.StringgetFooterColorAsString()Returns the footer font color as string.IsDefaultFontgetFooterFont()Returns the footer font.intgetFooterMarginTop()Returns the margin to add before drawing the footer.intgetFooterSpacing()Returns the spacing to add to top and bottom of each footer line.IsInteractionModegetMode()Returns which elements appear in the tooltip.StringgetMultiKeyBackgroundAsString()Returns the color to draw behind the colored boxes when multiple items are in the tooltip.IsDefaultPaddinggetPadding()Returns padding object defaults.IsTooltipPositiongetPosition()Returns the mode for positioning the tooltip.TextDirectiongetTextDirection()Returns the text direction that will force on the canvas for rendering the object, regardless of the CSS specified on the canvas.TextAligngetTitleAlign()Returns the title alignment.StringgetTitleColorAsString()Returns the title font color as string.IsDefaultFontgetTitleFont()Returns the title font.intgetTitleMarginBottom()Returns the margin to add on bottom of title section.intgetTitleSpacing()Returns the spacing to add to top and bottom of each title line.IsDefaultTransitionsgetTransitions()Returns the animation transition element.TooltipAligngetXAlign()Returns the alignment of the tooltip caret in the X direction.TooltipAligngetYAlign()Returns the alignment of the tooltip caret in the Y direction.booleanisDisplayColors()If true, color boxes are shown in the tooltip.booleanisEnabled()Returns if tooltips are enabled.booleanisIntersect()if true, the tooltip mode applies only when the mouse position intersects with an element.booleanisRtl()Returnstruefor rendering the object from right to left.booleanisUsePointStyle()Returns if to use the corresponding point style (from data set options) instead of color boxes (size is based on the minimum value between boxWidth and boxHeight).
 
- 
- 
- 
Constructor Detail- 
DefaultChartTooltipspublic DefaultChartTooltips(IsDefaultTooltips tooltip) Creates the object by tooltip option element instance.- Parameters:
- tooltip- tooltip option element instance.
 
 
- 
 - 
Method Detail- 
getTransitionspublic IsDefaultTransitions getTransitions() Description copied from interface:IsDefaultAnimationContainerReturns the animation transition element.- Specified by:
- getTransitionsin interface- IsDefaultAnimationContainer
- Returns:
- the animation transition
 
 - 
getAnimationpublic IsDefaultAnimation getAnimation() Description copied from interface:IsDefaultAnimationTransitionReturns the animation element.- Specified by:
- getAnimationin interface- IsDefaultAnimationTransition
- Returns:
- the animation
 
 - 
getAnimationspublic IsDefaultAnimations getAnimations() Description copied from interface:IsDefaultAnimationTransitionReturns the animations collection element.- Specified by:
- getAnimationsin interface- IsDefaultAnimationTransition
- Returns:
- the animations collection
 
 - 
getPaddingpublic IsDefaultPadding getPadding() Description copied from interface:IsDefaultTooltipsReturns padding object defaults.- Specified by:
- getPaddingin interface- IsDefaultTooltips
- Returns:
- padding object defaults.
 
 - 
isEnabledpublic boolean isEnabled() Description copied from interface:IsDefaultTooltipsReturns if tooltips are enabled.- Specified by:
- isEnabledin interface- IsDefaultTooltips
- Returns:
- if tooltips are enabled.
 
 - 
getEventspublic Set<IsEvent> getEvents() Description copied from interface:IsDefaultEventHandlerReturns the browser events that the chart should listen to.- Specified by:
- getEventsin interface- IsDefaultEventHandler
- Returns:
- the browser events that the chart should listen to.
 
 - 
getModepublic IsInteractionMode getMode() Description copied from interface:IsDefaultTooltipsReturns which elements appear in the tooltip.- Specified by:
- getModein interface- IsDefaultTooltips
- Returns:
- which elements appear in the tooltip.
 
 - 
isIntersectpublic boolean isIntersect() Description copied from interface:IsDefaultTooltipsif true, the tooltip mode applies only when the mouse position intersects with an element. If false, the mode will be applied at all times.- Specified by:
- isIntersectin interface- IsDefaultTooltips
- Returns:
- if true, the tooltip mode applies only when the mouse position intersects with an element. If false, the mode will be applied at all times.
 
 - 
getPositionpublic IsTooltipPosition getPosition() Description copied from interface:IsDefaultTooltipsReturns the mode for positioning the tooltip.- Specified by:
- getPositionin interface- IsDefaultTooltips
- Returns:
- mode for positioning the tooltip.
 
 - 
getBackgroundColorAsStringpublic String getBackgroundColorAsString() Description copied from interface:IsDefaultTooltipsReturns the background color of the tooltip.- Specified by:
- getBackgroundColorAsStringin interface- IsDefaultTooltips
- Returns:
- Background color of the tooltip.
 
 - 
getTitleFontpublic IsDefaultFont getTitleFont() Description copied from interface:IsDefaultTooltipsReturns the title font.- Specified by:
- getTitleFontin interface- IsDefaultTooltips
- Returns:
- the title font.
 
 - 
getTitleColorAsStringpublic String getTitleColorAsString() Description copied from interface:IsDefaultTooltipsReturns the title font color as string.- Specified by:
- getTitleColorAsStringin interface- IsDefaultTooltips
- Returns:
- title font color as string
 
 - 
getTitleAlignpublic TextAlign getTitleAlign() Description copied from interface:IsDefaultTooltipsReturns the title alignment.- Specified by:
- getTitleAlignin interface- IsDefaultTooltips
- Returns:
- title alignment.
 
 - 
getTitleSpacingpublic int getTitleSpacing() Description copied from interface:IsDefaultTooltipsReturns the spacing to add to top and bottom of each title line.- Specified by:
- getTitleSpacingin interface- IsDefaultTooltips
- Returns:
- spacing to add to top and bottom of each title line.
 
 - 
getTitleMarginBottompublic int getTitleMarginBottom() Description copied from interface:IsDefaultTooltipsReturns the margin to add on bottom of title section.- Specified by:
- getTitleMarginBottomin interface- IsDefaultTooltips
- Returns:
- margin to add on bottom of title section.
 
 - 
getBodyFontpublic IsDefaultFont getBodyFont() Description copied from interface:IsDefaultTooltipsReturns the body line font.- Specified by:
- getBodyFontin interface- IsDefaultTooltips
- Returns:
- body line font.
 
 - 
getBodyColorAsStringpublic String getBodyColorAsString() Description copied from interface:IsDefaultTooltipsReturns the body font color as string.- Specified by:
- getBodyColorAsStringin interface- IsDefaultTooltips
- Returns:
- body font color as string
 
 - 
getBodyAlignpublic TextAlign getBodyAlign() Description copied from interface:IsDefaultTooltipsReturns the body alignment.- Specified by:
- getBodyAlignin interface- IsDefaultTooltips
- Returns:
- body alignment.
 
 - 
getBodySpacingpublic int getBodySpacing() Description copied from interface:IsDefaultTooltipsReturns the spacing to add to top and bottom of each tooltip item.- Specified by:
- getBodySpacingin interface- IsDefaultTooltips
- Returns:
- spacing to add to top and bottom of each tooltip item.
 
 - 
getFooterFontpublic IsDefaultFont getFooterFont() Description copied from interface:IsDefaultTooltipsReturns the footer font.- Specified by:
- getFooterFontin interface- IsDefaultTooltips
- Returns:
- footer font.
 
 - 
getFooterColorAsStringpublic String getFooterColorAsString() Description copied from interface:IsDefaultTooltipsReturns the footer font color as string.- Specified by:
- getFooterColorAsStringin interface- IsDefaultTooltips
- Returns:
- footer font color as string
 
 - 
getFooterAlignpublic TextAlign getFooterAlign() Description copied from interface:IsDefaultTooltipsReturns the footer alignment.- Specified by:
- getFooterAlignin interface- IsDefaultTooltips
- Returns:
- footer alignment.
 
 - 
getFooterSpacingpublic int getFooterSpacing() Description copied from interface:IsDefaultTooltipsReturns the spacing to add to top and bottom of each footer line.- Specified by:
- getFooterSpacingin interface- IsDefaultTooltips
- Returns:
- spacing to add to top and bottom of each footer line.
 
 - 
getFooterMarginToppublic int getFooterMarginTop() Description copied from interface:IsDefaultTooltipsReturns the margin to add before drawing the footer.- Specified by:
- getFooterMarginTopin interface- IsDefaultTooltips
- Returns:
- margin to add before drawing the footer.
 
 - 
getCaretPaddingpublic int getCaretPadding() Description copied from interface:IsDefaultTooltipsReturns the extra distance to move the end of the tooltip arrow away from the tooltip point.- Specified by:
- getCaretPaddingin interface- IsDefaultTooltips
- Returns:
- extra distance to move the end of the tooltip arrow away from the tooltip point.
 
 - 
getCaretSizepublic int getCaretSize() Description copied from interface:IsDefaultTooltipsReturns the size, in px, of the tooltip arrow.- Specified by:
- getCaretSizein interface- IsDefaultTooltips
- Returns:
- size, in px, of the tooltip arrow.
 
 - 
getCornerRadiuspublic int getCornerRadius() Description copied from interface:IsDefaultTooltipsReturns the radius of tooltip corner curves.- Specified by:
- getCornerRadiusin interface- IsDefaultTooltips
- Returns:
- radius of tooltip corner curves.
 
 - 
getMultiKeyBackgroundAsStringpublic String getMultiKeyBackgroundAsString() Description copied from interface:IsDefaultTooltipsReturns the color to draw behind the colored boxes when multiple items are in the tooltip.- Specified by:
- getMultiKeyBackgroundAsStringin interface- IsDefaultTooltips
- Returns:
- color to draw behind the colored boxes when multiple items are in the tooltip.
 
 - 
isDisplayColorspublic boolean isDisplayColors() Description copied from interface:IsDefaultTooltipsIf true, color boxes are shown in the tooltip.- Specified by:
- isDisplayColorsin interface- IsDefaultTooltips
- Returns:
- if true, color boxes are shown in the tooltip.
 
 - 
getBorderColorAsStringpublic String getBorderColorAsString() Description copied from interface:IsDefaultTooltipsReturns the color of the border.- Specified by:
- getBorderColorAsStringin interface- IsDefaultTooltips
- Returns:
- color of the border.
 
 - 
getBorderWidthpublic int getBorderWidth() Description copied from interface:IsDefaultTooltipsReturns the size of the border.- Specified by:
- getBorderWidthin interface- IsDefaultTooltips
- Returns:
- size of the border.
 
 - 
isRtlpublic boolean isRtl() Description copied from interface:IsDefaultTextDirectionHandlerReturnstruefor rendering the object from right to left.- Specified by:
- isRtlin interface- IsDefaultTextDirectionHandler
- Returns:
- truefor rendering the object from right to left.
 
 - 
getTextDirectionpublic TextDirection getTextDirection() Description copied from interface:IsDefaultTextDirectionHandlerReturns the text direction that will force on the canvas for rendering the object, regardless of the CSS specified on the canvas.- Specified by:
- getTextDirectionin interface- IsDefaultTextDirectionHandler
- Returns:
- the text direction that will force on the canvas for rendering the object, regardless of the CSS specified on the canvas
 
 - 
getBoxWidthpublic int getBoxWidth() Description copied from interface:IsDefaultBoxHandlerReturns the width of colored box.- Specified by:
- getBoxWidthin interface- IsDefaultBoxHandler
- Returns:
- width of colored box.
 
 - 
getBoxHeightpublic int getBoxHeight() Description copied from interface:IsDefaultBoxHandlerReturns the height of colored box.- Specified by:
- getBoxHeightin interface- IsDefaultBoxHandler
- Returns:
- height of colored box.
 
 - 
isUsePointStylepublic boolean isUsePointStyle() Description copied from interface:IsDefaultTooltipsReturns if to use the corresponding point style (from data set options) instead of color boxes (size is based on the minimum value between boxWidth and boxHeight).- Specified by:
- isUsePointStylein interface- IsDefaultTooltips
- Returns:
- trueif to use the corresponding point style (from data set options) instead of color boxes (size is based on the minimum value between boxWidth and boxHeight)
 
 - 
getXAlignpublic TooltipAlign getXAlign() Description copied from interface:IsDefaultTooltipsReturns the alignment of the tooltip caret in the X direction.- Specified by:
- getXAlignin interface- IsDefaultTooltips
- Returns:
- the alignment of the tooltip caret in the X direction
 
 - 
getYAlignpublic TooltipAlign getYAlign() Description copied from interface:IsDefaultTooltipsReturns the alignment of the tooltip caret in the Y direction.- Specified by:
- getYAlignin interface- IsDefaultTooltips
- Returns:
- the alignment of the tooltip caret in the Y direction
 
 - 
getBoxPaddingpublic int getBoxPadding() Description copied from interface:IsDefaultTooltipsReturns the padding between the color box and the text.- Specified by:
- getBoxPaddingin interface- IsDefaultTooltips
- Returns:
- padding between the color box and the text
 
 
- 
 
-