1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/// Represents a text encoding specification.
///
/// The `Text` struct defines how data values should be mapped to textual content
/// in a chart. It is primarily used by `Text` marks to display labels,
/// annotations, or categorical information directly on the visualization.
///
/// ### Architecture Note:
/// Unlike positional or visual encodings, `Text` is often a direct mapping
/// of data values to strings. However, it still holds a `resolved_scale` to
/// allow for potential future features like data formatting (e.g., date
/// formatting or number rounding) before the text is rendered.
/// Convenience builder function to create a new Text encoding.
///