Class LineLabel

    • Field Detail

      • AUTO_ROTATION

        public static final double AUTO_ROTATION
        Constant to use to set AUTO rotation of the label, to use in the rotation callback.
        See Also:
        Constant Field Values
      • DEFAULT_DISPLAY

        public static final boolean DEFAULT_DISPLAY
        Default line label display, false.
        See Also:
        Constant Field Values
      • DEFAULT_BACKGROUND_COLOR

        public static final IsColor DEFAULT_BACKGROUND_COLOR
        Default line label background color, rgba(0, 0, 0, 0.8).
      • DEFAULT_BACKGROUND_COLOR_AS_STRING

        public static final String DEFAULT_BACKGROUND_COLOR_AS_STRING
        Default line label background color as string, rgba(0, 0, 0, 0.8).
      • DEFAULT_FONT_WEIGHT

        public static final Weight DEFAULT_FONT_WEIGHT
        Default line label font weight, Weight.BOLD.
      • DEFAULT_COLOR_AS_STRING

        public static final String DEFAULT_COLOR_AS_STRING
        Default line label font color as string, rgb(255, 255, 255).
      • DEFAULT_PADDING

        public static final int DEFAULT_PADDING
        Default line label padding, 6.
        See Also:
        Constant Field Values
      • DEFAULT_BORDER_COLOR

        public static final IsColor DEFAULT_BORDER_COLOR
        Default line label background color, black.
      • DEFAULT_BORDER_COLOR_AS_STRING

        public static final String DEFAULT_BORDER_COLOR_AS_STRING
        Default line label background color as string, black.
      • DEFAULT_BORDER_WIDTH

        public static final int DEFAULT_BORDER_WIDTH
        Default line label border width, 0.
        See Also:
        Constant Field Values
      • DEFAULT_BORDER_RADIUS

        public static final int DEFAULT_BORDER_RADIUS
        Default line label border radius, 6.
        See Also:
        Constant Field Values
      • DEFAULT_BORDER_CAP_STYLE

        public static final CapStyle DEFAULT_BORDER_CAP_STYLE
        Default line label border cap style, CapStyle.BUTT.
      • DEFAULT_BORDER_JOIN_STYLE

        public static final JoinStyle DEFAULT_BORDER_JOIN_STYLE
        Default line label border join style, JoinStyle.MITER.
      • DEFAULT_BORDER_DASH_OFFSET

        public static final int DEFAULT_BORDER_DASH_OFFSET
        Default line label border dash offset, 0.
        See Also:
        Constant Field Values
      • DEFAULT_X_ADJUST

        public static final double DEFAULT_X_ADJUST
        Default line label X adjust, 0.0.
        See Also:
        Constant Field Values
      • DEFAULT_Y_ADJUST

        public static final double DEFAULT_Y_ADJUST
        Default line label Y adjust, 0.0.
        See Also:
        Constant Field Values
      • DEFAULT_ROTATION

        public static final double DEFAULT_ROTATION
        Default line label rotation, 0.0.
        See Also:
        Constant Field Values
      • AUTO_ROTATION_AS_STRING

        public static final String AUTO_ROTATION_AS_STRING
        Value to set when auto rotation is requested, "auto".
        See Also:
        Constant Field Values
    • Method Detail

      • getBackgroundColorHandler

        public org.pepstock.charba.client.annotation.BackgroundColorHandler getBackgroundColorHandler()
      • getBorderRadiusHandler

        public org.pepstock.charba.client.annotation.BorderRadiusHandler getBorderRadiusHandler()
      • getBorderOptionsHandler

        public org.pepstock.charba.client.annotation.BorderOptionsHandler getBorderOptionsHandler()
      • getExtendedBorderOptionsHandler

        public org.pepstock.charba.client.annotation.ExtendedBorderOptionsHandler getExtendedBorderOptionsHandler()
      • getShadowOptionsHandler

        public org.pepstock.charba.client.annotation.ShadowOptionsHandler getShadowOptionsHandler()
      • getExtendedShadowOptionsHandler

        public org.pepstock.charba.client.annotation.ExtendedShadowOptionsHandler getExtendedShadowOptionsHandler()
      • setPosition

        public void setPosition​(LabelPosition position)
        Sets the anchor position of label on line.
        Parameters:
        position - the anchor position of label on line
      • getPosition

        public LabelPosition getPosition()
        Returns the anchor position of label on line.
        Returns:
        the anchor position of label on line
      • setPositionAsPercentage

        public void setPositionAsPercentage​(double percentage)
        Sets the position of label on line by the percentage (value between 0 and 1) of the line dimension.
        Parameters:
        percentage - the position of label on line by the percentage (value between 0 and 1) of the line dimension
      • getPositionAsPercentage

        public double getPositionAsPercentage()
        Returns the position of label on line by the percentage (value between 0 and 1) of the line dimension.
        Returns:
        the position of label on line by the percentage (value between 0 and 1) of the line dimension
      • setRotation

        public void setRotation​(double rotation)
        Sets the rotation of label in degrees.
        Parameters:
        rotation - the rotation of label in degrees
      • getRotation

        public double getRotation()
        Returns the rotation of label in degrees.
        Returns:
        the rotation of label in degrees
      • setAutoRotation

        public void setAutoRotation​(boolean autoRotation)
        Sets true whether the rotation of label must calculates automatically.
        Parameters:
        autoRotation - true whether the rotation of label must calculates automatically
      • isAutoRotation

        public boolean isAutoRotation()
        Returns true whether the rotation of label must calculates automatically.
        Returns:
        true whether the rotation of label must calculates automatically
      • getRotationCallback

        public RotationCallback<AnnotationContext> getRotationCallback()
        Returns the callback called to set the rotation of label in degrees.
        Returns:
        the callback called to set the rotation of label in degrees
      • setRotation

        public void setRotation​(RotationCallback<AnnotationContext> rotationCallback)
        Sets the callback to set the rotation of label in degrees.
        Parameters:
        rotationCallback - to set the rotation of label in degrees
      • setRotation

        public void setRotation​(NativeCallback rotationCallback)
        Sets the callback to set the rotation of label in degrees.
        Parameters:
        rotationCallback - to set the rotation of label in degrees
      • getPositionCallback

        public LabelPositionCallback getPositionCallback()
        Returns the callback called to set the anchor position of label on line.
        Returns:
        the callback called to set the anchor position of label on line
      • setPosition

        public void setPosition​(LabelPositionCallback positionCallback)
        Sets the callback to set the anchor position of label on line.
        Parameters:
        positionCallback - to set the anchor position of label on line
      • setPosition

        public void setPosition​(NativeCallback positionCallback)
        Sets the callback to set the anchor position of label on line.
        Parameters:
        positionCallback - to set the anchor position of label on line
      • isDisplay

        public abstract boolean isDisplay()
        Returns true whether the label should be displayed.
        Returns:
        true whether the label should be displayed
      • getDrawTime

        public abstract DrawTime getDrawTime()
        Returns the draw time which defines when the annotations are drawn.
        Returns:
        the draw time which defines when the annotations are drawn
      • getXAdjust

        public abstract double getXAdjust()
        Returns the adjustment along x-axis (left-right) of label relative to above number (can be negative).
        For horizontal lines positioned left or right, negative values move the label toward the edge, and positive values toward the center.
        Returns:
        the adjustment along x-axis (left-right) of label
      • getYAdjust

        public abstract double getYAdjust()
        Returns the adjustment along y-axis (top-bottom) of label relative to above number (can be negative).
        For vertical lines positioned top or bottom, negative values move the label toward the edge, and positive values toward the center.
        Returns:
        the adjustment along y-axis (top-bottom) of label
      • getDisplayCallback

        public default DisplayCallback<AnnotationContext> getDisplayCallback()
        Returns the callback called to set whether the label should be displayed.
        Returns:
        the callback called to set whether the label should be displayed
      • getXAdjustCallback

        public default AdjustSizeCallback getXAdjustCallback()
        Returns the callback called to set the adjustment along x-axis (left-right) of label relative to above number (can be negative).
        Returns:
        the callback called to set the adjustment along x-axis (left-right) of label relative to above number (can be negative)
      • getYAdjustCallback

        public default AdjustSizeCallback getYAdjustCallback()
        Returns the callback called to set the adjustment along y-axis (top-bottom) of label relative to above number (can be negative).
        Returns:
        the callback called to set the adjustment along y-axis (top-bottom) of label relative to above number (can be negative)
      • setBackgroundColor

        public default void setBackgroundColor​(IsColor backgroundColor)
        Sets the color of the background of annotation.
        Parameters:
        backgroundColor - the color of the background of annotation
      • setBackgroundColor

        public default void setBackgroundColor​(String backgroundColor)
        Sets the color of the background of annotation.
        Parameters:
        backgroundColor - the color of the background of annotation
      • getBackgroundColorAsString

        public default String getBackgroundColorAsString()
        Returns the color of the background of annotation.
        Returns:
        the color of the background of annotation
      • getBackgroundColor

        public default IsColor getBackgroundColor()
        Returns the color of the background of annotation.
        Returns:
        the color of the background of annotation
      • getBackgroundColorCallback

        public default ColorCallback<AnnotationContext> getBackgroundColorCallback()
        Returns the callback called to set the color of the background of annotation.
        Returns:
        the callback called to set the color of the background of annotation
      • setBackgroundColor

        public default void setBackgroundColor​(ColorCallback<AnnotationContext> backgroundColorCallback)
        Sets the callback to set the color of the background of annotation.
        Parameters:
        backgroundColorCallback - to set the color of the background of annotation
      • setBackgroundColor

        public default void setBackgroundColor​(NativeCallback backgroundColorCallback)
        Sets the callback to set the color of the background of annotation.
        Parameters:
        backgroundColorCallback - to set the color of the background of annotation
      • setBorderRadius

        public default void setBorderRadius​(int radius)
        Sets the border radius.
        Parameters:
        radius - the border radius.
      • setBorderRadius

        public default void setBorderRadius​(BarBorderRadius borderRadius)
        Sets the border radius (in pixels).
        Parameters:
        borderRadius - the border radius (in pixels).
      • getBorderRadius

        public default int getBorderRadius()
        Returns the border radius (in pixels).
        Returns:
        the border radius (in pixels).
      • getBorderRadiusAsObject

        public default BarBorderRadius getBorderRadiusAsObject()
        Returns the border radius (in pixels).
        Returns:
        the border radius (in pixels).
      • getBorderRadiusCallback

        public default BorderRadiusCallback<AnnotationContext> getBorderRadiusCallback()
        Returns the callback called to set the border radius.
        Returns:
        the callback called to set the border radius
      • setBorderRadius

        public default void setBorderRadius​(BorderRadiusCallback<AnnotationContext> borderRadiusCallback)
        Sets the callback to set the border radius.
        Parameters:
        borderRadiusCallback - to set the border radius
      • setBorderRadius

        public default void setBorderRadius​(NativeCallback borderRadiusCallback)
        Sets the callback to set the border radius.
        Parameters:
        borderRadiusCallback - to set the border radius
      • setBorderColor

        public default void setBorderColor​(IsColor borderColor)
        Sets the color of the border of annotation.
        Parameters:
        borderColor - the color of the border of annotation
      • setBorderColor

        public default void setBorderColor​(String borderColor)
        Sets the color of the border of annotation.
        Parameters:
        borderColor - the color of the border of annotation
      • getBorderColorAsString

        public default String getBorderColorAsString()
        Returns the color of the border of annotation.
        Returns:
        the color of the border of annotation
      • getBorderColor

        public default IsColor getBorderColor()
        Returns the color of the border of annotation.
        Returns:
        the color of the border of annotation
      • setBorderWidth

        public default void setBorderWidth​(int borderWidth)
        Sets the width of the border in pixels.
        Parameters:
        borderWidth - the width of the border in pixels.
      • getBorderWidth

        public default int getBorderWidth()
        Returns the width of the border in pixels.
        Returns:
        the width of the border in pixels.
      • setBorderDash

        public default void setBorderDash​(int... borderDash)
        Sets the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.
        Parameters:
        borderDash - the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.
      • getBorderDash

        public default List<Integer> getBorderDash()
        Returns the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.
        Returns:
        the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.
      • setBorderDashOffset

        public default void setBorderDashOffset​(double borderDashOffset)
        Sets the line dash pattern offset.
        Parameters:
        borderDashOffset - the line dash pattern offset.
      • getBorderDashOffset

        public default double getBorderDashOffset()
        Returns the line dash pattern offset.
        Returns:
        the line dash pattern offset.
      • getBorderColorCallback

        public default ColorCallback<AnnotationContext> getBorderColorCallback()
        Returns the callback called to set the color of the border of annotation.
        Returns:
        the callback called to set the color of the border of annotation
      • setBorderColor

        public default void setBorderColor​(ColorCallback<AnnotationContext> borderColorCallback)
        Sets the callback to set the color of the border of annotation.
        Parameters:
        borderColorCallback - to set the color of the border of annotation
      • setBorderColor

        public default void setBorderColor​(NativeCallback borderColorCallback)
        Sets the callback to set the color of the border of annotation.
        Parameters:
        borderColorCallback - to set the color of the border of annotation
      • getBorderWidthCallback

        public default WidthCallback<AnnotationContext> getBorderWidthCallback()
        Returns the callback called to set the width of the border in pixels.
        Returns:
        the callback called to set the width of the border in pixels
      • setBorderWidth

        public default void setBorderWidth​(WidthCallback<AnnotationContext> borderWidthCallback)
        Sets the callback to set the color of the width of the border in pixels.
        Parameters:
        borderWidthCallback - to set the width of the border in pixels
      • setBorderWidth

        public default void setBorderWidth​(NativeCallback borderWidthCallback)
        Sets the callback to set the color of the width of the border in pixels.
        Parameters:
        borderWidthCallback - to set the width of the border in pixels
      • getBorderDashCallback

        public default BorderDashCallback<AnnotationContext> getBorderDashCallback()
        Returns the callback called to set the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.
        Returns:
        the callback called to set the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern
      • setBorderDash

        public default void setBorderDash​(BorderDashCallback<AnnotationContext> borderDashCallback)
        Sets the callback to set the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.
        Parameters:
        borderDashCallback - to set the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern
      • setBorderDash

        public default void setBorderDash​(NativeCallback borderDashCallback)
        Sets the callback to set the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.
        Parameters:
        borderDashCallback - to set the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern
      • getBorderDashOffsetCallback

        public default BorderDashOffsetCallback<AnnotationContext> getBorderDashOffsetCallback()
        Returns the callback called to set the line dash pattern offset.
        Returns:
        the callback called to set the line dash pattern offset
      • setBorderDashOffset

        public default void setBorderDashOffset​(BorderDashOffsetCallback<AnnotationContext> borderDashOffsetCallback)
        Sets the callback to set the line dash pattern offset.
        Parameters:
        borderDashOffsetCallback - to set the line dash pattern offset
      • setBorderDashOffset

        public default void setBorderDashOffset​(NativeCallback borderDashOffsetCallback)
        Sets the callback to set the line dash pattern offset.
        Parameters:
        borderDashOffsetCallback - to set the line dash pattern offset
      • setBorderCapStyle

        public default void setBorderCapStyle​(CapStyle borderCapStyle)
        Sets how the end points of every line are drawn.
        Parameters:
        borderCapStyle - how the end points of every line are drawn.
      • getBorderCapStyle

        public default CapStyle getBorderCapStyle()
        Returns how the end points of every line are drawn.
        Returns:
        how the end points of every line are drawn.
      • setBorderJoinStyle

        public default void setBorderJoinStyle​(JoinStyle borderJoinStyle)
        Sets how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together (degenerate segments with zero lengths, whose specified end points and control points are exactly at the same position, are skipped).
        Parameters:
        borderJoinStyle - how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together
      • getBorderJoinStyle

        public default JoinStyle getBorderJoinStyle()
        Returns how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together (degenerate segments with zero lengths, whose specified end points and control points are exactly at the same position, are skipped).
        Returns:
        how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together
      • getBorderCapStyleCallback

        public default CapStyleCallback<AnnotationContext> getBorderCapStyleCallback()
        Returns the border capstyle callback, if set, otherwise null.
        Returns:
        the border capstyle callback, if set, otherwise null.
      • setBorderCapStyle

        public default void setBorderCapStyle​(CapStyleCallback<AnnotationContext> borderCapStyleCallback)
        Sets the border capstyle callback.
        Parameters:
        borderCapStyleCallback - the border capstyle callback.
      • setBorderCapStyle

        public default void setBorderCapStyle​(NativeCallback borderCapStyleCallback)
        Sets the border capstyle callback.
        Parameters:
        borderCapStyleCallback - the border capstyle callback.
      • getBorderJoinStyleCallback

        public default JoinStyleCallback<AnnotationContext> getBorderJoinStyleCallback()
        Returns the border join style callback, if set, otherwise null.
        Returns:
        the border join style callback, if set, otherwise null.
      • setBorderJoinStyle

        public default void setBorderJoinStyle​(JoinStyleCallback<AnnotationContext> borderJoinStyleCallback)
        Sets the border join style callback.
        Parameters:
        borderJoinStyleCallback - the border join style callback.
      • setBorderJoinStyle

        public default void setBorderJoinStyle​(NativeCallback borderJoinStyleCallback)
        Sets the border join style callback.
        Parameters:
        borderJoinStyleCallback - the border join style callback.
      • setBorderShadowColor

        public default void setBorderShadowColor​(IsColor borderColor)
        Sets the color of the border shadow of annotation.
        Parameters:
        borderColor - the color of the border shadow of annotation
      • setBorderShadowColor

        public default void setBorderShadowColor​(String borderColor)
        Sets the color of the border shadow of annotation.
        Parameters:
        borderColor - the color of the border shadow of annotation
      • getBorderShadowColorAsString

        public default String getBorderShadowColorAsString()
        Returns the color of the border shadow of annotation.
        Returns:
        the color of the border shadow of annotation
      • getBorderShadowColor

        public default IsColor getBorderShadowColor()
        Returns the color of the border shadow of annotation.
        Returns:
        the color of the border shadow of annotation
      • setShadowBlur

        public default void setShadowBlur​(double shadowBlur)
        Sets the amount of blur applied to shadows.
        Parameters:
        shadowBlur - the amount of blur applied to shadows
      • getShadowBlur

        public default double getShadowBlur()
        Returns the amount of blur applied to shadows.
        Returns:
        the amount of blur applied to shadows
      • setShadowOffsetX

        public default void setShadowOffsetX​(int shadowOffset)
        Sets the distance that shadows will be offset horizontally.
        Parameters:
        shadowOffset - the distance that shadows will be offset horizontally.
      • getShadowOffsetX

        public default int getShadowOffsetX()
        Returns the distance that shadows will be offset horizontally.
        Returns:
        the distance that shadows will be offset horizontally.
      • setShadowOffsetY

        public default void setShadowOffsetY​(int shadowOffset)
        Sets the distance that shadows will be offset vertically.
        Parameters:
        shadowOffset - the distance that shadows will be offset vertically.
      • getShadowOffsetY

        public default int getShadowOffsetY()
        Returns the distance that shadows will be offset vertically.
        Returns:
        the distance that shadows will be offset vertically.
      • getBorderShadowColorCallback

        public default ColorCallback<AnnotationContext> getBorderShadowColorCallback()
        Returns the callback called to set the color of the border shadow of annotation.
        Returns:
        the callback called to set the color of the border shadow of annotation
      • setBorderShadowColor

        public default void setBorderShadowColor​(ColorCallback<AnnotationContext> borderShadowColorCallback)
        Sets the callback to set the color of the border shadow of annotation.
        Parameters:
        borderShadowColorCallback - to set the color of the border shadow of annotation
      • setBorderShadowColor

        public default void setBorderShadowColor​(NativeCallback borderShadowColorCallback)
        Sets the callback to set the color of the border shadow of annotation.
        Parameters:
        borderShadowColorCallback - to set the color of the border shadow of annotation
      • getShadowBlurCallback

        public default ShadowBlurCallback getShadowBlurCallback()
        Returns the callback called to set the amount of blur applied to shadows.
        Returns:
        the callback called to set the amount of blur applied to shadows.
      • setShadowBlur

        public default void setShadowBlur​(ShadowBlurCallback shadowBlurCallback)
        Sets the callback to set the amount of blur applied to shadows.
        Parameters:
        shadowBlurCallback - to set the amount of blur applied to shadows.
      • setShadowBlur

        public default void setShadowBlur​(NativeCallback shadowBlurCallback)
        Sets the callback to set the amount of blur applied to shadows.
        Parameters:
        shadowBlurCallback - to set the amount of blur applied to shadows.
      • getShadowOffsetXCallback

        public default ShadowOffsetCallback getShadowOffsetXCallback()
        Returns the callback called to set the distance that shadows will be offset horizontally.
        Returns:
        the callback called to set the distance that shadows will be offset horizontally.
      • setShadowOffsetX

        public default void setShadowOffsetX​(ShadowOffsetCallback shadowOffsetCallback)
        Sets the callback to set the distance that shadows will be offset horizontally.
        Parameters:
        shadowOffsetCallback - to set the distance that shadows will be offset horizontally.
      • setShadowOffsetX

        public default void setShadowOffsetX​(NativeCallback shadowOffsetCallback)
        Sets the callback to set the distance that shadows will be offset horizontally.
        Parameters:
        shadowOffsetCallback - to set the distance that shadows will be offset horizontally.
      • getShadowOffsetYCallback

        public default ShadowOffsetCallback getShadowOffsetYCallback()
        Returns the callback called to set the distance that shadows will be offset vertically.
        Returns:
        the callback called to set the distance that shadows will be offset vertically.
      • setShadowOffsetY

        public default void setShadowOffsetY​(ShadowOffsetCallback shadowOffsetCallback)
        Sets the callback to set the distance that shadows will be offset vertically.
        Parameters:
        shadowOffsetCallback - to set the distance that shadows will be offset vertically.
      • setShadowOffsetY

        public default void setShadowOffsetY​(NativeCallback shadowOffsetCallback)
        Sets the callback to set the distance that shadows will be offset vertically.
        Parameters:
        shadowOffsetCallback - to set the distance that shadows will be offset vertically.
      • setBackgroundShadowColor

        public default void setBackgroundShadowColor​(IsColor backgroundColor)
        Sets the color of the shadow of annotation.
        Parameters:
        backgroundColor - the color of the shadow of annotation
      • setBackgroundShadowColor

        public default void setBackgroundShadowColor​(String backgroundColor)
        Sets the color of the shadow of annotation.
        Parameters:
        backgroundColor - the color of the shadow of annotation
      • getBackgroundShadowColorAsString

        public default String getBackgroundShadowColorAsString()
        Returns the color of the shadow of annotation.
        Returns:
        the color of the shadow of annotation
      • getBackgroundShadowColor

        public default IsColor getBackgroundShadowColor()
        Returns the color of the shadow of annotation.
        Returns:
        the color of the shadow of annotation
      • getBackgroundShadowColorCallback

        public default ColorCallback<AnnotationContext> getBackgroundShadowColorCallback()
        Returns the callback called to set the color of the shadow of annotation.
        Returns:
        the callback called to set the color of the shadow of annotation
      • setBackgroundShadowColor

        public default void setBackgroundShadowColor​(ColorCallback<AnnotationContext> borderShadowColorCallback)
        Sets the callback to set the color of the shadow of annotation.
        Parameters:
        borderShadowColorCallback - to set the color of the shadow of annotation
      • setBackgroundShadowColor

        public default void setBackgroundShadowColor​(NativeCallback borderShadowColorCallback)
        Sets the callback to set the color of the shadow of annotation.
        Parameters:
        borderShadowColorCallback - to set the color of the shadow of annotation
      • getLabelHandler

        public final org.pepstock.charba.client.annotation.LabelHandler getLabelHandler()
      • setDisplay

        public final void setDisplay​(boolean display)
        Sets true whether the label should be displayed.
        Parameters:
        display - true whether the label should be displayed
      • isDisplay

        public final boolean isDisplay()
        Returns true whether the label should be displayed.
        Returns:
        true whether the label should be displayed
      • setXAdjust

        public final void setXAdjust​(double xAdjust)
        Sets the adjustment along x-axis (left-right) of label relative to above number (can be negative).
        For horizontal lines positioned left or right, negative values move the label toward the edge, and positive values toward the center.
        Parameters:
        xAdjust - the adjustment along x-axis (left-right) of label
      • getXAdjust

        public final double getXAdjust()
        Returns the adjustment along x-axis (left-right) of label relative to above number (can be negative).
        For horizontal lines positioned left or right, negative values move the label toward the edge, and positive values toward the center.
        Returns:
        the adjustment along x-axis (left-right) of label
      • setYAdjust

        public final void setYAdjust​(double yAdjust)
        Sets the adjustment along y-axis (top-bottom) of label relative to above number (can be negative).
        For vertical lines positioned top or bottom, negative values move the label toward the edge, and positive values toward the center.
        Parameters:
        yAdjust - the adjustment along y-axis (top-bottom) of label
      • getYAdjust

        public final double getYAdjust()
        Returns the adjustment along y-axis (top-bottom) of label relative to above number (can be negative).
        For vertical lines positioned top or bottom, negative values move the label toward the edge, and positive values toward the center.
        Returns:
        the adjustment along y-axis (top-bottom) of label
      • setDrawTime

        public final void setDrawTime​(DrawTime drawTime)
        Sets the draw time which defines when the annotations are drawn.
        Parameters:
        drawTime - the draw time which defines when the annotations are drawn
      • getDrawTime

        public final DrawTime getDrawTime()
        Returns the draw time which defines when the annotations are drawn.
        Returns:
        the draw time which defines when the annotations are drawn
      • getDisplayCallback

        public final DisplayCallback<AnnotationContext> getDisplayCallback()
        Returns the callback called to set whether the label should be displayed.
        Returns:
        the callback called to set whether the label should be displayed
      • setDisplay

        public final void setDisplay​(DisplayCallback<AnnotationContext> displayCallback)
        Sets the callback to set whether the label should be displayed.
        Parameters:
        displayCallback - to set whether the label should be displayed
      • setDisplay

        public final void setDisplay​(NativeCallback displayCallback)
        Sets the callback to set whether the label should be displayed.
        Parameters:
        displayCallback - to set whether the label should be displayed
      • getXAdjustCallback

        public final AdjustSizeCallback getXAdjustCallback()
        Returns the callback called to set the adjustment along x-axis (left-right) of label relative to above number (can be negative).
        Returns:
        the callback called to set the adjustment along x-axis (left-right) of label relative to above number (can be negative)
      • setXAdjust

        public final void setXAdjust​(AdjustSizeCallback adjustCallback)
        Sets the callback to set the adjustment along y-axis (top-bottom) of label relative to above number (can be negative).
        Parameters:
        adjustCallback - to set the adjustment along y-axis (top-bottom) of label relative to above number (can be negative)
      • setXAdjust

        public final void setXAdjust​(NativeCallback adjustCallback)
        Sets the callback to set the adjustment along y-axis (top-bottom) of label relative to above number (can be negative).
        Parameters:
        adjustCallback - to set the adjustment along y-axis (top-bottom) of label relative to above number (can be negative)
      • getYAdjustCallback

        public final AdjustSizeCallback getYAdjustCallback()
        Returns the callback called to set the adjustment along y-axis (top-bottom) of label relative to above number (can be negative).
        Returns:
        the callback called to set the adjustment along y-axis (top-bottom) of label relative to above number (can be negative)
      • setYAdjust

        public final void setYAdjust​(AdjustSizeCallback adjustCallback)
        Sets the callback to set the adjustment along x-axis (left-right) of label relative to above number (can be negative).
        Parameters:
        adjustCallback - to set the adjustment along x-axis (left-right) of label relative to above number (can be negative)
      • setYAdjust

        public final void setYAdjust​(NativeCallback adjustCallback)
        Sets the callback to set the adjustment along x-axis (left-right) of label relative to above number (can be negative).
        Parameters:
        adjustCallback - to set the adjustment along x-axis (left-right) of label relative to above number (can be negative)
      • getFont

        public default IsFont getFont()
        Returns the font element.
        Returns:
        the font element.
      • getPadding

        public default IsPadding getPadding()
        Returns the padding element.
        Returns:
        the padding element.
      • setColor

        public default void setColor​(IsColor fontColor)
        Sets the color of text.
        Parameters:
        fontColor - the color of text
      • setColor

        public default void setColor​(String fontColor)
        Sets the color of text as string.
        Parameters:
        fontColor - the color of text
      • getColorAsString

        public default String getColorAsString()
        Returns the color of text as string.
        Returns:
        the color of text
      • getColor

        public default IsColor getColor()
        Returns the color of text.
        Returns:
        the color of text
      • setContent

        public default void setContent​(List<String> content)
        Sets the text to display in label.
        Provide a list to display values on a new line.
        Parameters:
        content - the text to display in label as multi-line values
      • setContent

        public default void setContent​(String... content)
        Sets the text to display in label.
        Provide an array to display values on a new line.
        Parameters:
        content - the text to display in label
      • setContent

        public default void setContent​(Img content)
        Sets the image to display in label.
        Parameters:
        content - the image to display in label
      • setContent

        public default void setContent​(Canvas content)
        Sets the canvas to display in label.
        Parameters:
        content - the canvas to display in label
      • getContent

        public default List<String> getContent()
        Returns the text to display in label as list.
        Returns:
        the text to display in label as list
      • getContentAsImage

        public default Img getContentAsImage()
        Returns the text to display in label as list.
        Returns:
        the text to display in label as list
      • getContentAsCanvas

        public default Canvas getContentAsCanvas()
        Returns the text to display in label as Canvas.
        Returns:
        the text to display in label as Canvas
      • setImageHeight

        public default void setImageHeight​(int height)
        Sets the height of label content, when is set as Img, in pixels in order to scale the image when drawn.
        Parameters:
        height - the height of label content, when is set as Img, in pixels in order to scale the image when drawn
      • setImageHeightAsPercentage

        public default void setImageHeightAsPercentage​(String heightPercentage)
        Sets the height of label content, when is set as Img, in percentage (format is "{n}%") in order to scale the image when drawn.
        Parameters:
        heightPercentage - the height of label content, when is set as Img, in percentage (format is "{n}%") in order to scale the image when drawn
      • getImageHeight

        public default int getImageHeight()
        Returns the height of label content, when is set as Img, in pixels in order to scale the image when drawn.
        Returns:
        the height of label content, when is set as Img, in pixels in order to scale the image when drawn
      • getImageHeightAsPercentage

        public default String getImageHeightAsPercentage()
        Returns the height of label content, when is set as Img, in percentage (format is "{n}%") in order to scale the image when drawn.
        Returns:
        the height of label content, when is set as Img, in percentage (format is "{n}%") in order to scale the image when drawn
      • setImageWidth

        public default void setImageWidth​(int width)
        Sets the width of label content, when is set as Img, in pixels in order to scale the image when drawn.
        Parameters:
        width - the height of label content, when is set as Img, in pixels in order to scale the image when drawn
      • setImageWidthAsPercentage

        public default void setImageWidthAsPercentage​(String widthPercentage)
        Sets the width of label content, when is set as Img, in percentage (format is "{n}%") in order to scale the image when drawn.
        Parameters:
        widthPercentage - the height of label content, when is set as Img, in percentage (format is "{n}%") in order to scale the image when drawn
      • getImageWidth

        public default int getImageWidth()
        Returns the width of label content, when is set as Img, in pixels in order to scale the image when drawn.
        Returns:
        the width of label content, when is set as Img, in pixels in order to scale the image when drawn
      • getImageWidthAsPercentage

        public default String getImageWidthAsPercentage()
        Returns the width of label content, when is set as Img, in percentage (format is "{n}%") in order to scale the image when drawn.
        Returns:
        the width of label content, when is set as Img, in percentage (format is "{n}%") in order to scale the image when drawn
      • setTextAlign

        public default void setTextAlign​(TextAlign align)
        Sets the horizontal alignment of the label text when multiple lines.
        Parameters:
        align - the horizontal alignment of the label text when multiple lines
      • getTextAlign

        public default TextAlign getTextAlign()
        Returns the horizontal alignment of the label text when multiple lines.
        Returns:
        the horizontal alignment of the label text when multiple lines
      • getColorCallback

        public default ColorCallback<AnnotationContext> getColorCallback()
        Returns the callback called to set the color of the text of label.
        Returns:
        the callback called to set the color of the text of label
      • setColor

        public default void setColor​(ColorCallback<AnnotationContext> colorCallback)
        Sets the callback to set the color of the text of label.
        Parameters:
        colorCallback - to set the color of the text of label
      • setColor

        public default void setColor​(NativeCallback colorCallback)
        Sets the callback to set the color of the text of label.
        Parameters:
        colorCallback - to set the color of the text of label
      • getContentCallback

        public default ContentCallback getContentCallback()
        Returns the callback called to set the text to display in label as list.
        Returns:
        the callback called to set the text to display in label as list
      • setContent

        public default void setContent​(ContentCallback contentCallback)
        Sets the callback to set the text to display in label as list.
        Parameters:
        contentCallback - to set the text to display in label as list
      • setContent

        public default void setContent​(NativeCallback contentCallback)
        Sets the callback to set the text to display in label as list.
        Parameters:
        contentCallback - to set the text to display in label as list
      • getImageHeightCallback

        public default ImageSizeCallback getImageHeightCallback()
        Returns the callback called to set the height of label content, when is set as Img, in percentage (format is "{n}%") in order to scale the image when drawn.
        Returns:
        the callback called to set the height of label content, when is set as Img, in percentage (format is "{n}%") in order to scale the image when drawn
      • setImageHeight

        public default void setImageHeight​(ImageSizeCallback imageSizeCallback)
        Sets the callback to set the height of label content, when is set as Img, in percentage (format is "{n}%") in order to scale the image when drawn.
        Parameters:
        imageSizeCallback - to set the height of label content, when is set as Img, in percentage (format is "{n}%") in order to scale the image when drawn
      • setImageHeight

        public default void setImageHeight​(NativeCallback imageSizeCallback)
        Sets the callback to set the height of label content, when is set as Img, in percentage (format is "{n}%") in order to scale the image when drawn.
        Parameters:
        imageSizeCallback - to set the height of label content, when is set as Img, in percentage (format is "{n}%") in order to scale the image when drawn
      • getImageWidthCallback

        public default ImageSizeCallback getImageWidthCallback()
        Returns the callback called to set the width of label content, when is set as Img, in percentage (format is "{n}%") in order to scale the image when drawn.
        Returns:
        the callback called to set the width of label content, when is set as Img, in percentage (format is "{n}%") in order to scale the image when drawn
      • setImageWidth

        public default void setImageWidth​(ImageSizeCallback imageSizeCallback)
        Sets the callback to set the width of label content, when is set as Img, in percentage (format is "{n}%") in order to scale the image when drawn.
        Parameters:
        imageSizeCallback - to set the width of label content, when is set as Img, in percentage (format is "{n}%") in order to scale the image when drawn
      • setImageWidth

        public default void setImageWidth​(NativeCallback imageSizeCallback)
        Sets the callback to set the width of label content, when is set as Img, in percentage (format is "{n}%") in order to scale the image when drawn.
        Parameters:
        imageSizeCallback - to set the width of label content, when is set as Img, in percentage (format is "{n}%") in order to scale the image when drawn
      • getTextAlignCallback

        public default TextAlignCallback<AnnotationContext> getTextAlignCallback()
        Returns the callback called to set the horizontal alignment of the label text when multiple lines.
        Returns:
        the callback called to set the horizontal alignment of the label text when multiple lines
      • setTextAlign

        public default void setTextAlign​(TextAlignCallback<AnnotationContext> alignCallback)
        Sets the callback to set the horizontal alignment of the label text when multiple lines.
        Parameters:
        alignCallback - to the horizontal alignment of the label text when multiple lines
      • setTextAlign

        public default void setTextAlign​(NativeCallback alignCallback)
        Sets the callback to set the horizontal alignment of the label text when multiple lines.
        Parameters:
        alignCallback - to the horizontal alignment of the label text when multiple lines