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 Summary
Constructors Constructor Description DefaultChartTooltips(IsDefaultTooltips tooltip)Creates the object by tooltip option element instance.
-
Method Summary
All 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<Event>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.InteractionModegetMode()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
-
DefaultChartTooltips
public DefaultChartTooltips(IsDefaultTooltips tooltip)
Creates the object by tooltip option element instance.- Parameters:
tooltip- tooltip option element instance.
-
-
Method Detail
-
getTransitions
public IsDefaultTransitions getTransitions()
Description copied from interface:IsDefaultAnimationContainerReturns the animation transition element.- Specified by:
getTransitionsin interfaceIsDefaultAnimationContainer- Returns:
- the animation transition
-
getAnimation
public IsDefaultAnimation getAnimation()
Description copied from interface:IsDefaultAnimationTransitionReturns the animation element.- Specified by:
getAnimationin interfaceIsDefaultAnimationTransition- Returns:
- the animation
-
getAnimations
public IsDefaultAnimations getAnimations()
Description copied from interface:IsDefaultAnimationTransitionReturns the animations collection element.- Specified by:
getAnimationsin interfaceIsDefaultAnimationTransition- Returns:
- the animations collection
-
getPadding
public IsDefaultPadding getPadding()
Description copied from interface:IsDefaultTooltipsReturns padding object defaults.- Specified by:
getPaddingin interfaceIsDefaultTooltips- Returns:
- padding object defaults.
-
isEnabled
public boolean isEnabled()
Description copied from interface:IsDefaultTooltipsReturns if tooltips are enabled.- Specified by:
isEnabledin interfaceIsDefaultTooltips- Returns:
- if tooltips are enabled.
-
getEvents
public Set<Event> getEvents()
Description copied from interface:IsDefaultEventHandlerReturns the browser events that the chart should listen to.- Specified by:
getEventsin interfaceIsDefaultEventHandler- Returns:
- the browser events that the chart should listen to.
-
getMode
public InteractionMode getMode()
Description copied from interface:IsDefaultTooltipsReturns which elements appear in the tooltip.- Specified by:
getModein interfaceIsDefaultTooltips- Returns:
- which elements appear in the tooltip.
-
isIntersect
public 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 interfaceIsDefaultTooltips- 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.
-
getPosition
public IsTooltipPosition getPosition()
Description copied from interface:IsDefaultTooltipsReturns the mode for positioning the tooltip.- Specified by:
getPositionin interfaceIsDefaultTooltips- Returns:
- mode for positioning the tooltip.
-
getBackgroundColorAsString
public String getBackgroundColorAsString()
Description copied from interface:IsDefaultTooltipsReturns the background color of the tooltip.- Specified by:
getBackgroundColorAsStringin interfaceIsDefaultTooltips- Returns:
- Background color of the tooltip.
-
getTitleFont
public IsDefaultFont getTitleFont()
Description copied from interface:IsDefaultTooltipsReturns the title font.- Specified by:
getTitleFontin interfaceIsDefaultTooltips- Returns:
- the title font.
-
getTitleColorAsString
public String getTitleColorAsString()
Description copied from interface:IsDefaultTooltipsReturns the title font color as string.- Specified by:
getTitleColorAsStringin interfaceIsDefaultTooltips- Returns:
- title font color as string
-
getTitleAlign
public TextAlign getTitleAlign()
Description copied from interface:IsDefaultTooltipsReturns the title alignment.- Specified by:
getTitleAlignin interfaceIsDefaultTooltips- Returns:
- title alignment.
-
getTitleSpacing
public int getTitleSpacing()
Description copied from interface:IsDefaultTooltipsReturns the spacing to add to top and bottom of each title line.- Specified by:
getTitleSpacingin interfaceIsDefaultTooltips- Returns:
- spacing to add to top and bottom of each title line.
-
getTitleMarginBottom
public int getTitleMarginBottom()
Description copied from interface:IsDefaultTooltipsReturns the margin to add on bottom of title section.- Specified by:
getTitleMarginBottomin interfaceIsDefaultTooltips- Returns:
- margin to add on bottom of title section.
-
getBodyFont
public IsDefaultFont getBodyFont()
Description copied from interface:IsDefaultTooltipsReturns the body line font.- Specified by:
getBodyFontin interfaceIsDefaultTooltips- Returns:
- body line font.
-
getBodyColorAsString
public String getBodyColorAsString()
Description copied from interface:IsDefaultTooltipsReturns the body font color as string.- Specified by:
getBodyColorAsStringin interfaceIsDefaultTooltips- Returns:
- body font color as string
-
getBodyAlign
public TextAlign getBodyAlign()
Description copied from interface:IsDefaultTooltipsReturns the body alignment.- Specified by:
getBodyAlignin interfaceIsDefaultTooltips- Returns:
- body alignment.
-
getBodySpacing
public int getBodySpacing()
Description copied from interface:IsDefaultTooltipsReturns the spacing to add to top and bottom of each tooltip item.- Specified by:
getBodySpacingin interfaceIsDefaultTooltips- Returns:
- spacing to add to top and bottom of each tooltip item.
-
getFooterFont
public IsDefaultFont getFooterFont()
Description copied from interface:IsDefaultTooltipsReturns the footer font.- Specified by:
getFooterFontin interfaceIsDefaultTooltips- Returns:
- footer font.
-
getFooterColorAsString
public String getFooterColorAsString()
Description copied from interface:IsDefaultTooltipsReturns the footer font color as string.- Specified by:
getFooterColorAsStringin interfaceIsDefaultTooltips- Returns:
- footer font color as string
-
getFooterAlign
public TextAlign getFooterAlign()
Description copied from interface:IsDefaultTooltipsReturns the footer alignment.- Specified by:
getFooterAlignin interfaceIsDefaultTooltips- Returns:
- footer alignment.
-
getFooterSpacing
public int getFooterSpacing()
Description copied from interface:IsDefaultTooltipsReturns the spacing to add to top and bottom of each footer line.- Specified by:
getFooterSpacingin interfaceIsDefaultTooltips- Returns:
- spacing to add to top and bottom of each footer line.
-
getFooterMarginTop
public int getFooterMarginTop()
Description copied from interface:IsDefaultTooltipsReturns the margin to add before drawing the footer.- Specified by:
getFooterMarginTopin interfaceIsDefaultTooltips- Returns:
- margin to add before drawing the footer.
-
getCaretPadding
public 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 interfaceIsDefaultTooltips- Returns:
- extra distance to move the end of the tooltip arrow away from the tooltip point.
-
getCaretSize
public int getCaretSize()
Description copied from interface:IsDefaultTooltipsReturns the size, in px, of the tooltip arrow.- Specified by:
getCaretSizein interfaceIsDefaultTooltips- Returns:
- size, in px, of the tooltip arrow.
-
getCornerRadius
public int getCornerRadius()
Description copied from interface:IsDefaultTooltipsReturns the radius of tooltip corner curves.- Specified by:
getCornerRadiusin interfaceIsDefaultTooltips- Returns:
- radius of tooltip corner curves.
-
getMultiKeyBackgroundAsString
public 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 interfaceIsDefaultTooltips- Returns:
- color to draw behind the colored boxes when multiple items are in the tooltip.
-
isDisplayColors
public boolean isDisplayColors()
Description copied from interface:IsDefaultTooltipsIf true, color boxes are shown in the tooltip.- Specified by:
isDisplayColorsin interfaceIsDefaultTooltips- Returns:
- if true, color boxes are shown in the tooltip.
-
getBorderColorAsString
public String getBorderColorAsString()
Description copied from interface:IsDefaultTooltipsReturns the color of the border.- Specified by:
getBorderColorAsStringin interfaceIsDefaultTooltips- Returns:
- color of the border.
-
getBorderWidth
public int getBorderWidth()
Description copied from interface:IsDefaultTooltipsReturns the size of the border.- Specified by:
getBorderWidthin interfaceIsDefaultTooltips- Returns:
- size of the border.
-
isRtl
public boolean isRtl()
Description copied from interface:IsDefaultTextDirectionHandlerReturnstruefor rendering the object from right to left.- Specified by:
isRtlin interfaceIsDefaultTextDirectionHandler- Returns:
truefor rendering the object from right to left.
-
getTextDirection
public 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 interfaceIsDefaultTextDirectionHandler- Returns:
- the text direction that will force on the canvas for rendering the object, regardless of the CSS specified on the canvas
-
getBoxWidth
public int getBoxWidth()
Description copied from interface:IsDefaultBoxHandlerReturns the width of colored box.- Specified by:
getBoxWidthin interfaceIsDefaultBoxHandler- Returns:
- width of colored box.
-
getBoxHeight
public int getBoxHeight()
Description copied from interface:IsDefaultBoxHandlerReturns the height of colored box.- Specified by:
getBoxHeightin interfaceIsDefaultBoxHandler- Returns:
- height of colored box.
-
isUsePointStyle
public 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 interfaceIsDefaultTooltips- 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)
-
getXAlign
public TooltipAlign getXAlign()
Description copied from interface:IsDefaultTooltipsReturns the alignment of the tooltip caret in the X direction.- Specified by:
getXAlignin interfaceIsDefaultTooltips- Returns:
- the alignment of the tooltip caret in the X direction
-
getYAlign
public TooltipAlign getYAlign()
Description copied from interface:IsDefaultTooltipsReturns the alignment of the tooltip caret in the Y direction.- Specified by:
getYAlignin interfaceIsDefaultTooltips- Returns:
- the alignment of the tooltip caret in the Y direction
-
getBoxPadding
public int getBoxPadding()
Description copied from interface:IsDefaultTooltipsReturns the padding between the color box and the text.- Specified by:
getBoxPaddingin interfaceIsDefaultTooltips- Returns:
- padding between the color box and the text
-
-