pub struct LabelOption {Show 24 fields
pub show: bool,
pub text: Option<String>,
pub position: Option<Position>,
pub offset: Option<LabelOffset>,
pub distance: Option<f64>,
pub rotate: Option<f64>,
pub align: Option<TextAlign>,
pub vertical_align: Option<TextVerticalAlign>,
pub color: Option<String>,
pub font_family: Option<String>,
pub font_size: Option<f64>,
pub font_weight: Option<String>,
pub font_style: Option<String>,
pub line_height: Option<f64>,
pub background_color: Option<String>,
pub padding: Option<(f64, f64, f64, f64)>,
pub border_color: Option<String>,
pub border_width: Option<f64>,
pub border_radius: Option<f64>,
pub stroke: Option<bool>,
pub stroke_width: Option<f64>,
pub stroke_color: Option<String>,
pub hide_overlap: Option<bool>,
pub formatter: Option<String>,
}Expand description
The text drawn next to a data point, an axis, or a legend entry.
Fields§
§show: boolWhether the label is drawn.
text: Option<String>The text of the label.
None means “derive it from the data”; a template uses the
ECharts syntax, for example "{b}: {c}".
position: Option<Position>The position of the label relative to its anchor.
offset: Option<LabelOffset>The offset of the label from its anchor.
distance: Option<f64>The distance between the label and the anchor, in pixels.
rotate: Option<f64>The rotation of the label, in degrees.
align: Option<TextAlign>The alignment of the label.
vertical_align: Option<TextVerticalAlign>The vertical alignment of the label.
color: Option<String>The colour of the label.
font_family: Option<String>The font family of the label.
font_size: Option<f64>The font size of the label, in pixels.
font_weight: Option<String>The font weight of the label.
font_style: Option<String>The font style of the label.
line_height: Option<f64>The line height of the label, as a multiple of the font size.
background_color: Option<String>The background colour of the label.
padding: Option<(f64, f64, f64, f64)>The padding inside the label’s background.
border_color: Option<String>The border colour of the label’s background.
border_width: Option<f64>The border width of the label’s background.
border_radius: Option<f64>The radius of the label’s background corners.
stroke: Option<bool>Whether the label is stroked with an outline.
stroke_width: Option<f64>The width of the label’s outline.
stroke_color: Option<String>The colour of the label’s outline.
hide_overlap: Option<bool>Whether the label is hidden when it would overlap another one.
formatter: Option<String>The formatter used when the text is not a template.
Implementations§
Source§impl LabelOption
Inherent implementation of LabelOption.
impl LabelOption
Inherent implementation of LabelOption.