Skip to main content

euv_chart/text/
enum.rs

1/// The alignment of a text label, as ECharts names it.
2///
3/// The option layer uses ECharts' own vocabulary so that an existing
4/// configuration translates field by field; the paint layer uses the
5/// chart crate's own enums.
6#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
7pub enum LabelAlign {
8    /// The label starts at its anchor.
9    #[default]
10    Left,
11    /// The label is centred on its anchor.
12    Center,
13    /// The label ends at its anchor.
14    Right,
15}
16
17/// The vertical alignment of a text label, as ECharts names it.
18#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
19pub enum LabelVerticalAlign {
20    /// The label's top edge sits on its anchor.
21    Top,
22    /// The label is centred on its anchor.
23    #[default]
24    Middle,
25    /// The label's bottom edge sits on its anchor.
26    Bottom,
27}