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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
//! Scale primitives — values, ranges, transforms, scale-type kinds, and
//! tick / break algorithms — as plain enums + free functions.
//!
//! This module is the **lift candidate**: nothing inside `src/scales/`
//! imports from `src/plot/*`, `src/scene/*`, `src/backend/*`,
//! `src/primitives/*`, or `src/text/*`. The contents are intended to be
//! lifted into their own `scales` crate when the API settles.
//!
//! ## Surface
//!
//! - [`Value`] / [`DataColumn`] / [`Date`] / [`DateTime`] / [`Time`] /
//! [`Duration`] / [`LinetypeStep`] — the data scales operate on.
//! - [`InputRange`] / [`OutputRange`] — POD configuration types.
//! - [`Transform`] + [`TransformKind`] — value transforms: Identity,
//! Log10 / Log2 / Log, Sqrt, Square, Exp10 / Exp2 / Exp, Asinh, and
//! PseudoLog / PseudoLog2 / PseudoLog10.
//! - [`ScaleTypeKind`] — discriminator for the six scale families.
//! - [`Direction`] — whether the mapping runs forward across the domain
//! or reversed. Flips the normalised fraction / domain index, so one
//! flag reverses a position axis and a palette alike.
//! - [`AxisSide`] / [`LegendSide`] — placement enums.
//! - [`Locale`] — number / date formatting rules threaded into label
//! generation.
//! - Free-function algorithms:
//! - Per scale type: [`continuous_map`], [`discrete_map`],
//! [`ordinal_map`], [`binned_map`], [`identity_map`].
//! - Per scale type: [`continuous_breaks`], [`continuous_minor_breaks`],
//! [`discrete_breaks`], [`binned_breaks`], [`temporal_breaks`],
//! [`temporal_breaks_with_interval`], [`temporal_minor_breaks`],
//! [`temporal_minor_breaks_with_interval`].
//! - Break placement, where it differs from the data mapping:
//! [`binned_map_break`]; [`wrap_temporal_value`] types a raw f64
//! position back into its calendar [`Value`].
//! - Band-width queries: [`discrete_band_width`],
//! [`binned_band_width`], [`binned_band_width_at`].
//! - Transform dispatch: [`transform_forward`], [`transform_inverse`],
//! [`transform_allowed_domain`].
//! - Tick selection: [`extended_breaks`] (Wilkinson), [`linear_breaks`],
//! [`log_pretty_breaks`], [`log_minor_breaks`], [`sqrt_breaks`],
//! [`symlog_breaks`], [`symlog_minor_breaks`],
//! [`linear_minor_breaks_between`].
//! - Calendar arithmetic behind the temporal families:
//! [`pick_temporal_interval`], [`derive_minor_interval`], and the
//! `align_*` / `advance_*` / `retreat_*` / `temporal_breaks_*`
//! families over [`Date`] / [`DateTime`] / [`Time`].
//!
//! ## What's not here
//!
//! - No `Scale` aggregate struct or `ScaleRegistry`. Consumers bundle
//! `(scale_type, transform, input_range, output_range)` — plus bin
//! edges for [`ScaleTypeKind::Binned`] — as they see fit. Hephaestus's
//! bundle lives at [`crate::plot::scale::Scale`].
//! - No rendering. Axes and legends are drawn by hephaestus's
//! [`crate::plot::chrome`] against `SceneBuilder` + `TextRun`; future
//! `scales`-crate consumers (e.g. ggsql) supply their own.
// ─── Optional datetime-library interop ───────────────────────────────────────
//
// Each gated module supplies bidirectional `From` impls between our
// temporal newtypes and the matching types in the named library. All
// three default off — with no feature enabled the scales crate has zero
// datetime dependencies.
pub use ;
pub use ;
pub use Direction;
pub use ;
pub use InputRange;
pub use ;
pub use OutputRange;
pub use ;
pub use ;
pub use ;