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
//! Layout and styling constants for the radar renderer.
//!
//! Values are taken directly from the Mermaid JS default config:
//! chunk-Q52JI7PB.mjs lines 5060-5071 and theme variable defaults.
// ---------------------------------------------------------------------------
// SVG / chart dimensions (all match Mermaid JS defaults)
// ---------------------------------------------------------------------------
/// Inner chart width (px) — "config.width" in Mermaid JS.
pub const CHART_WIDTH: f64 = 600.0;
/// Inner chart height (px) — "config.height" in Mermaid JS.
pub const CHART_HEIGHT: f64 = 600.0;
/// Top margin (px).
pub const MARGIN_TOP: f64 = 50.0;
/// Right margin (px).
pub const MARGIN_RIGHT: f64 = 50.0;
/// Bottom margin (px).
pub const MARGIN_BOTTOM: f64 = 50.0;
/// Left margin (px).
pub const MARGIN_LEFT: f64 = 50.0;
// Derived totals
/// Total SVG width = CHART_WIDTH + MARGIN_LEFT + MARGIN_RIGHT.
pub const SVG_WIDTH: f64 = CHART_WIDTH + MARGIN_LEFT + MARGIN_RIGHT; // 700
/// Total SVG height = CHART_HEIGHT + MARGIN_TOP + MARGIN_BOTTOM.
pub const SVG_HEIGHT: f64 = CHART_HEIGHT + MARGIN_TOP + MARGIN_BOTTOM; // 700
// ---------------------------------------------------------------------------
// Axis rendering
// ---------------------------------------------------------------------------
/// Factor applied to radius for the end of the axis spoke.
/// axisScaleFactor = 1 (default). Can be overridden per-diagram.
pub const AXIS_SCALE_FACTOR: f64 = 1.0;
/// Factor applied to radius for axis label placement.
/// axisLabelFactor = 1.05 (default).
pub const AXIS_LABEL_FACTOR: f64 = 1.05;
// ---------------------------------------------------------------------------
// Curve rendering
// ---------------------------------------------------------------------------
/// Catmull-Rom tension — matches Mermaid JS curveTension = 0.17.
/// Note: Mermaid uses this directly (NOT divided by 3).
pub const CURVE_TENSION: f64 = 0.17;
/// Curve fill opacity.
pub const CURVE_OPACITY: f64 = 0.5;
/// Curve stroke width (px).
pub const CURVE_STROKE_WIDTH: f64 = 2.0;
// ---------------------------------------------------------------------------
// Graticule styling
// ---------------------------------------------------------------------------
/// Fill/stroke colour for graticule rings.
pub const GRATICULE_COLOR: &str = "#DEDEDE";
/// Graticule fill opacity.
pub const GRATICULE_OPACITY: f64 = 0.3;
/// Graticule stroke width (px).
pub const GRATICULE_STROKE_WIDTH: f64 = 1.0;
// ---------------------------------------------------------------------------
// Legend
// ---------------------------------------------------------------------------
/// Side length of each legend colour swatch (px). Emitted directly in templates.
pub const LEGEND_BOX_SIZE: f64 = 12.0;
/// Font size for legend labels (px).
pub const LEGEND_FONT_SIZE: f64 = 12.0;
/// Vertical spacing between legend rows (px).
pub const LEGEND_LINE_HEIGHT: f64 = 20.0;
// ---------------------------------------------------------------------------
// Typography
// ---------------------------------------------------------------------------
/// Font size for axis labels (px).
pub const AXIS_LABEL_FONT_SIZE: f64 = 12.0;
/// Axis stroke width (px). Emitted directly in CSS styles.
pub const AXIS_STROKE_WIDTH: f64 = 2.0;