esoc_chart/grammar/position.rs
1// SPDX-License-Identifier: MIT OR Apache-2.0
2//! Position adjustments for grouped/stacked visualizations.
3
4/// How multiple layers at the same x position are arranged.
5#[derive(Clone, Copy, Debug, Default)]
6pub enum Position {
7 /// No adjustment (overlay).
8 #[default]
9 Identity,
10 /// Stack layers vertically.
11 Stack,
12 /// Place layers side by side.
13 Dodge,
14 /// Stack + normalize to 100%.
15 Fill,
16 /// Add random displacement.
17 Jitter {
18 /// X displacement amount.
19 x_amount: f64,
20 /// Y displacement amount.
21 y_amount: f64,
22 },
23}