public final class DataLabelsOptionsBuilder extends Object
DataLabelsPlugin.ID
plugin options by a builder.Modifier and Type | Method and Description |
---|---|
DataLabelsOptions |
build()
Returns a configured labels options.
|
static DataLabelsOptionsBuilder |
create()
Returns new builder instance.
|
static DataLabelsOptionsBuilder |
create(IsChart chart)
Returns new builder instance using the chart global options.
|
DataLabelsOptionsBuilder |
setAlign(Align align)
Sets the position of the label relative to the anchor point position and orientation.
|
DataLabelsOptionsBuilder |
setAlign(AlignCallback alignCallback)
Sets the align callback.
|
DataLabelsOptionsBuilder |
setAnchor(Anchor anchor)
Sets the anchor point, which is defined by an orientation vector and a position on the data element.
|
DataLabelsOptionsBuilder |
setAnchor(AnchorCallback anchorCallback)
Sets the anchor callback.
|
DataLabelsOptionsBuilder |
setBackgroundColor(BackgroundColorCallback backgroundColorCallback)
Sets the background color callback.
|
DataLabelsOptionsBuilder |
setBackgroundColor(IsColor color)
Sets the background color.
|
DataLabelsOptionsBuilder |
setBackgroundColor(String color)
Sets the background color.
|
DataLabelsOptionsBuilder |
setBorderColor(BorderColorCallback borderColorCallback)
Sets the border color callback.
|
DataLabelsOptionsBuilder |
setBorderColor(IsColor color)
Sets the border color.
|
DataLabelsOptionsBuilder |
setBorderColor(String color)
Sets the border color.
|
DataLabelsOptionsBuilder |
setBorderRadius(double radius)
Sets the border radius.
|
DataLabelsOptionsBuilder |
setBorderRadius(RadiusCallback borderRadiusCallback)
Sets the border radius callback.
|
DataLabelsOptionsBuilder |
setBorderWidth(BorderWidthCallback borderWidthCallback)
Sets the border width callback.
|
DataLabelsOptionsBuilder |
setBorderWidth(int width)
Sets the border width.
|
DataLabelsOptionsBuilder |
setClamp(boolean clamp)
Sets
true to enforce the anchor position to be calculated based on the visible geometry of the associated
element (i.e. |
DataLabelsOptionsBuilder |
setClamp(ClampCallback clampCallback)
Sets the clamp callback.
|
DataLabelsOptionsBuilder |
setClickEventHandler(ClickEventHandler clickEventHandler)
Sets the CLICK event (the mouse's primary button is pressed and released on a label) handler.
|
DataLabelsOptionsBuilder |
setClip(boolean clip)
When the clip option is
true , the part of the label which is outside the chart area will be masked. |
DataLabelsOptionsBuilder |
setClip(ClipCallback clipCallback)
Sets the clip callback.
|
DataLabelsOptionsBuilder |
setColor(ColorCallback colorCallback)
Sets the color callback.
|
DataLabelsOptionsBuilder |
setColor(IsColor color)
Sets the color.
|
DataLabelsOptionsBuilder |
setColor(String color)
Sets the color.
|
DataLabelsOptionsBuilder |
setDisplay(boolean display)
Sets the visibility of labels.
|
DataLabelsOptionsBuilder |
setDisplay(Display display)
Sets the visibility of labels.
|
DataLabelsOptionsBuilder |
setDisplay(DisplayCallback displayCallback)
Sets the display callback.
|
DataLabelsOptionsBuilder |
setEnterEventHandler(EnterEventHandler enterEventHandler)
Sets the ENTER event (the mouse is moved over a label) handler.
|
DataLabelsOptionsBuilder |
setFont(FontCallback fontCallback)
Sets the the font callback.
|
DataLabelsOptionsBuilder |
setFontFamily(String fontFamily)
Sets the font family, follows CSS font-family options.
|
DataLabelsOptionsBuilder |
setFontLineHeight(double lineHeight)
Sets the line height.
|
DataLabelsOptionsBuilder |
setFontLineHeight(String lineHeight)
Sets the line height.
|
DataLabelsOptionsBuilder |
setFontSize(int fontSize)
Sets the font size.
|
DataLabelsOptionsBuilder |
setFontStyle(FontStyle fontStyle)
Sets the font style, follows CSS font-style options (i.e.
|
DataLabelsOptionsBuilder |
setFontWeight(Weight weight)
Sets the font weight, follows CSS font-style-weight options.
|
DataLabelsOptionsBuilder |
setFormatter(FormatterCallback formatterCallback)
Sets the formatter callback.
|
DataLabelsOptionsBuilder |
setLeaveEventHandler(LeaveEventHandler leaveEventHandler)
Sets the LEAVE event (the mouse is moved out of a label) handler.
|
DataLabelsOptionsBuilder |
setListenersHandler(AbstractEventHandler handler)
Adds a event handler instance as listener for all events.
|
DataLabelsOptionsBuilder |
setOffset(double offset)
Sets the distance (in pixels) to pull the label away from the anchor point.
|
DataLabelsOptionsBuilder |
setOffset(OffsetCallback offsetCallback)
Sets the offset callback.
|
DataLabelsOptionsBuilder |
setOpacity(double opacity)
Sets the opacity.
|
DataLabelsOptionsBuilder |
setOpacity(OpacityCallback opacityCallback)
Sets the opacity callback.
|
DataLabelsOptionsBuilder |
setPadding(int padding)
Sets the padding size to all dimensions.
|
DataLabelsOptionsBuilder |
setPadding(PaddingCallback paddingCallback)
Sets the padding callback.
|
DataLabelsOptionsBuilder |
setPaddingBottom(int padding)
Sets the padding bottom in pixel.
|
DataLabelsOptionsBuilder |
setPaddingLeft(int padding)
Sets the padding left in pixel.
|
DataLabelsOptionsBuilder |
setPaddingRight(int padding)
Sets the padding right in pixel.
|
DataLabelsOptionsBuilder |
setPaddingTop(int padding)
Sets the padding top in pixel.
|
DataLabelsOptionsBuilder |
setRotation(double rotation)
Sets the clockwise rotation angle (in degrees) of the label, the rotation center point being the label center.
|
DataLabelsOptionsBuilder |
setRotation(RotationCallback rotationCallback)
Sets the rotation callback.
|
DataLabelsOptionsBuilder |
setTextAlign(TextAlign textAlign)
Sets the text alignment being used when drawing the label text.
|
DataLabelsOptionsBuilder |
setTextAlign(TextAlignCallback textAlignCallback)
Sets the text align callback.
|
DataLabelsOptionsBuilder |
setTextShadowBlur(double textShadowBlur)
Sets the text shadow blur.
|
DataLabelsOptionsBuilder |
setTextShadowBlur(TextShadowBlurCallback textShadowBlurCallback)
Sets the text shadow blur callback.
|
DataLabelsOptionsBuilder |
setTextShadowColor(IsColor color)
Sets the text shadow color color.
|
DataLabelsOptionsBuilder |
setTextShadowColor(String color)
Sets the text shadow color color.
|
DataLabelsOptionsBuilder |
setTextShadowColor(TextShadowColorCallback textShadowColorCallback)
Sets the text shadow color callback.
|
DataLabelsOptionsBuilder |
setTextStrokeColor(IsColor color)
Sets the text stroke color.
|
DataLabelsOptionsBuilder |
setTextStrokeColor(String color)
Sets the text stroke color.
|
DataLabelsOptionsBuilder |
setTextStrokeColor(TextStrokeColorCallback textStrokeColorCallback)
Sets the text stroke color callback.
|
DataLabelsOptionsBuilder |
setTextStrokeWidth(int textStrokeWidth)
Sets the text stroke width.
|
DataLabelsOptionsBuilder |
setTextStrokeWidth(TextStrokeWidthCallback textStrokeWidthCallback)
Sets the text stroke width callback.
|
public static DataLabelsOptionsBuilder create()
public static DataLabelsOptionsBuilder create(IsChart chart)
chart
- chart instance related to the plugin optionspublic DataLabelsOptions build()
public DataLabelsOptionsBuilder setListenersHandler(AbstractEventHandler handler)
handler
- event handler instance as listener for all events.public DataLabelsOptionsBuilder setAlign(Align align)
align
- the position of the label relative to the anchor point position and orientation.public DataLabelsOptionsBuilder setAnchor(Anchor anchor)
anchor
- the anchor point, which is defined by an orientation vector and a position on the data element.public DataLabelsOptionsBuilder setBackgroundColor(IsColor color)
color
- the background colorpublic DataLabelsOptionsBuilder setBackgroundColor(String color)
color
- the background colorpublic DataLabelsOptionsBuilder setBorderColor(IsColor color)
color
- the border colorpublic DataLabelsOptionsBuilder setBorderColor(String color)
color
- the border colorpublic DataLabelsOptionsBuilder setBorderRadius(double radius)
radius
- the border radius.public DataLabelsOptionsBuilder setBorderWidth(int width)
width
- the border width.public DataLabelsOptionsBuilder setClamp(boolean clamp)
true
to enforce the anchor position to be calculated based on the visible geometry of the associated
element (i.e. part inside the chart area).clamp
- true
to enforce the anchor position to be calculated based on the visible geometry of the
associated element (i.e. part inside the chart area).public DataLabelsOptionsBuilder setClip(boolean clip)
true
, the part of the label which is outside the chart area will be masked.clip
- when the clip option is true
, the part of the label which is outside the chart area will be
masked.public DataLabelsOptionsBuilder setColor(IsColor color)
color
- the colorpublic DataLabelsOptionsBuilder setColor(String color)
color
- the colorpublic DataLabelsOptionsBuilder setDisplay(boolean display)
display
- the visibility of labels.public DataLabelsOptionsBuilder setDisplay(Display display)
display
- the visibility of labels.public DataLabelsOptionsBuilder setOffset(double offset)
offset
- the distance (in pixels) to pull the label away from the anchor point. This option is not applicable when
align is 'center'. Also note that if align is 'start', the label is moved in the opposite direction.public DataLabelsOptionsBuilder setOpacity(double opacity)
opacity
- the opacity.public DataLabelsOptionsBuilder setRotation(double rotation)
rotation
- the clockwise rotation angle (in degrees) of the label, the rotation center point being the label center.public DataLabelsOptionsBuilder setTextAlign(TextAlign textAlign)
textAlign
- the text alignment being used when drawing the label text.public DataLabelsOptionsBuilder setTextStrokeColor(IsColor color)
color
- the text stroke colorpublic DataLabelsOptionsBuilder setTextStrokeColor(String color)
color
- the text stroke color.public DataLabelsOptionsBuilder setTextStrokeWidth(int textStrokeWidth)
textStrokeWidth
- the text stroke width.public DataLabelsOptionsBuilder setTextShadowBlur(double textShadowBlur)
textShadowBlur
- the text shadow blur.public DataLabelsOptionsBuilder setTextShadowColor(IsColor color)
color
- the text shadow color colorpublic DataLabelsOptionsBuilder setTextShadowColor(String color)
color
- the text shadow color color.public DataLabelsOptionsBuilder setBackgroundColor(BackgroundColorCallback backgroundColorCallback)
backgroundColorCallback
- the background color callback.public DataLabelsOptionsBuilder setBorderColor(BorderColorCallback borderColorCallback)
borderColorCallback
- the border color callback.public DataLabelsOptionsBuilder setColor(ColorCallback colorCallback)
colorCallback
- the color callback.public DataLabelsOptionsBuilder setFormatter(FormatterCallback formatterCallback)
formatterCallback
- the formatter callback to setpublic DataLabelsOptionsBuilder setAlign(AlignCallback alignCallback)
alignCallback
- the align callback to setpublic DataLabelsOptionsBuilder setAnchor(AnchorCallback anchorCallback)
anchorCallback
- the anchor callback to setpublic DataLabelsOptionsBuilder setBorderRadius(RadiusCallback borderRadiusCallback)
borderRadiusCallback
- the border radius callback to setpublic DataLabelsOptionsBuilder setBorderWidth(BorderWidthCallback borderWidthCallback)
borderWidthCallback
- the border width callback to setpublic DataLabelsOptionsBuilder setClamp(ClampCallback clampCallback)
clampCallback
- the clamp callback to setpublic DataLabelsOptionsBuilder setClip(ClipCallback clipCallback)
clipCallback
- the clip callback to setpublic DataLabelsOptionsBuilder setDisplay(DisplayCallback displayCallback)
displayCallback
- the display callback to setpublic DataLabelsOptionsBuilder setOffset(OffsetCallback offsetCallback)
offsetCallback
- the offset callback to setpublic DataLabelsOptionsBuilder setOpacity(OpacityCallback opacityCallback)
opacityCallback
- the opacity callback to setpublic DataLabelsOptionsBuilder setRotation(RotationCallback rotationCallback)
rotationCallback
- the rotation callback to setpublic DataLabelsOptionsBuilder setTextAlign(TextAlignCallback textAlignCallback)
textAlignCallback
- the text align callback to setpublic DataLabelsOptionsBuilder setTextStrokeColor(TextStrokeColorCallback textStrokeColorCallback)
textStrokeColorCallback
- the text stroke color callback to setpublic DataLabelsOptionsBuilder setTextStrokeWidth(TextStrokeWidthCallback textStrokeWidthCallback)
textStrokeWidthCallback
- the text stroke width callback to setpublic DataLabelsOptionsBuilder setTextShadowBlur(TextShadowBlurCallback textShadowBlurCallback)
textShadowBlurCallback
- the text shadow blur callback to setpublic DataLabelsOptionsBuilder setTextShadowColor(TextShadowColorCallback textShadowColorCallback)
textShadowColorCallback
- the text shadow color callback to setpublic DataLabelsOptionsBuilder setFont(FontCallback fontCallback)
fontCallback
- the font callback to setpublic DataLabelsOptionsBuilder setPadding(PaddingCallback paddingCallback)
paddingCallback
- the padding callback to setpublic DataLabelsOptionsBuilder setFontSize(int fontSize)
fontSize
- the font size.public DataLabelsOptionsBuilder setFontStyle(FontStyle fontStyle)
fontStyle
- Font style, follows CSS font-style options (i.e. normal, italic, oblique, initial, inherit).public DataLabelsOptionsBuilder setFontFamily(String fontFamily)
fontFamily
- Font family, follows CSS font-family options.public DataLabelsOptionsBuilder setFontWeight(Weight weight)
weight
- font weight, follows CSS font-style-weight options.public DataLabelsOptionsBuilder setFontLineHeight(double lineHeight)
lineHeight
- the line height.public DataLabelsOptionsBuilder setFontLineHeight(String lineHeight)
lineHeight
- the line height.public DataLabelsOptionsBuilder setPadding(int padding)
padding
- padding size to apply to all dimensions.public DataLabelsOptionsBuilder setPaddingLeft(int padding)
padding
- the padding left in pixel.public DataLabelsOptionsBuilder setPaddingRight(int padding)
padding
- the padding right in pixel.public DataLabelsOptionsBuilder setPaddingTop(int padding)
padding
- the padding top in pixel.public DataLabelsOptionsBuilder setPaddingBottom(int padding)
padding
- the padding bottom in pixel.public DataLabelsOptionsBuilder setClickEventHandler(ClickEventHandler clickEventHandler)
clickEventHandler
- the click event handler to setpublic DataLabelsOptionsBuilder setEnterEventHandler(EnterEventHandler enterEventHandler)
enterEventHandler
- the enter event handler to setpublic DataLabelsOptionsBuilder setLeaveEventHandler(LeaveEventHandler leaveEventHandler)
leaveEventHandler
- the leave event handler to set