Skip to contents

Text label configuration for chart elements. Combines label-specific positioning (show, position, distance, rotate) with text styling.

Usage

LabelOption(
  show = NULL,
  position = NULL,
  distance = NULL,
  rotate = NULL,
  offset = NULL,
  formatter = NULL,
  silent = NULL,
  precision = NULL,
  value_animation = NULL,
  min_margin = NULL,
  text_style = NULL
)

Arguments

show

Optional Logical: Whether to show the label.

position

Optional Character {"top", "left", "right", "bottom", "inside", "insideLeft", "insideRight", "insideTop", "insideBottom", "insideTopLeft", "insideBottomLeft", "insideTopRight", "insideBottomRight", "outside"} or Numeric: Label position. "bottom", "inside", "insideLeft", "insideRight", "insideTop", "insideBottom", "insideTopLeft", "insideBottomLeft", "insideTopRight", "insideBottomRight", "outside".

distance

Optional Numeric: Distance from the element.

rotate

Optional Numeric: Rotation angle in degrees.

offset

Optional Numeric: Offset c(x, y) in pixels.

formatter

Optional Character or function: Label text formatter.

silent

Optional Logical: Whether the label is silent.

precision

Optional Numeric or Character {"auto"}: Numeric precision.

value_animation

Optional Logical: Whether to animate value changes.

min_margin

Optional Numeric [0, Inf): Minimum margin between labels.

text_style

Optional TextStyle: Text appearance.

Details

Corresponds to SeriesLabelOption / LabelOption in src/util/types.ts (line 1283, 1348). ECharts docs: https://echarts.apache.org/en/option.html#series-bar.label