euv_ui/component/chart/model/enum.rs
1use super::*;
2
3/// Horizontal text or title alignment inside a chart region.
4#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
5pub enum EuvChartAlign {
6 /// Left-aligned placement.
7 #[default]
8 Left,
9 /// Horizontally centered placement.
10 Center,
11 /// Right-aligned placement.
12 Right,
13}
14
15/// Docked placement edge for legends, axes, and visual-map bars.
16#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
17pub enum EuvChartPosition {
18 /// Docked along the top edge.
19 #[default]
20 Top,
21 /// Docked along the bottom edge.
22 Bottom,
23 /// Docked along the left edge.
24 Left,
25 /// Docked along the right edge.
26 Right,
27}
28
29/// Primary layout orientation for legends, calendars, and visual maps.
30#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
31pub enum EuvChartOrient {
32 /// Horizontal left-to-right layout.
33 #[default]
34 Horizontal,
35 /// Vertical top-to-bottom layout.
36 Vertical,
37}
38
39/// Apache ECharts axis scale kind.
40#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
41pub enum EuvChartAxisType {
42 /// Discrete labeled category bins.
43 Category,
44 /// Continuous linear numeric domain.
45 #[default]
46 Value,
47 /// Continuous timestamp domain formatted as dates or clock times.
48 Time,
49 /// Base-10 logarithmic numeric domain for positive values.
50 Log,
51}
52
53/// Vector marker glyph shape used by line, scatter, effect-scatter, and pictorial bar series.
54#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
55pub enum EuvChartSymbol {
56 /// Suppresses marker rendering.
57 None,
58 /// Solid circle marker.
59 #[default]
60 Circle,
61 /// Sharp square marker.
62 Rect,
63 /// Rounded square or capsule marker.
64 RoundRect,
65 /// Upward-pointing triangle marker.
66 Triangle,
67 /// 45-degree rotated diamond marker.
68 Diamond,
69 /// Teardrop map pin marker.
70 Pin,
71}
72
73/// Step-line interpolation mode matching Apache ECharts `series-line.step`.
74#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
75pub enum EuvChartStepMode {
76 /// Normal direct or smooth point-to-point interpolation.
77 #[default]
78 None,
79 /// Step vertically at the start of each segment.
80 Start,
81 /// Step vertically at the horizontal midpoint of each segment.
82 Middle,
83 /// Step vertically at the end of each segment.
84 End,
85}
86
87/// Nightingale Rose pie variation mode.
88#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
89pub enum EuvChartRoseType {
90 /// Standard uniform-radius pie or donut chart.
91 #[default]
92 None,
93 /// Both arc angle and radius scale with slice value.
94 Radius,
95 /// Equal arc angles with radius proportional to slice value.
96 Area,
97}
98
99/// Radar coordinate background web geometry.
100#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
101pub enum EuvChartRadarShape {
102 /// Straight-edged regular polygon rings.
103 #[default]
104 Polygon,
105 /// Smooth concentric circular rings.
106 Circle,
107}
108
109/// Stage ordering mode for funnel conversion charts.
110#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
111pub enum EuvChartFunnelSort {
112 /// Widest stage at the top narrowing downward.
113 #[default]
114 Descending,
115 /// Narrowest stage at the top widening downward.
116 Ascending,
117 /// Preserves the caller-provided stage order.
118 None,
119}
120
121/// Node positioning layout strategy for relational graph charts.
122#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
123pub enum EuvChartGraphLayout {
124 /// Deterministic Fruchterman-Reingold force-directed layout.
125 #[default]
126 Force,
127 /// Evenly spaced circular ring layout.
128 Circular,
129 /// Uses caller-provided normalized `(x, y)` coordinates directly.
130 None,
131}
132
133/// Hierarchical node-link layout direction for tree charts.
134#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
135pub enum EuvChartTreeLayout {
136 /// Left-to-right orthogonal tree.
137 #[default]
138 OrthogonalLeftRight,
139 /// Top-to-bottom orthogonal tree.
140 OrthogonalTopBottom,
141 /// Concentric radial polar tree.
142 Radial,
143}
144
145/// Target coordinate system binding for a series.
146#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
147pub enum EuvChartCoordinateSystem {
148 /// Standard 2D Cartesian `(x, y)` grid.
149 #[default]
150 Cartesian2d,
151 /// Polar `(angle, radius)` coordinate system.
152 Polar,
153 /// Single 1D axis coordinate system.
154 SingleAxis,
155 /// Calendar week-by-day matrix coordinate system.
156 Calendar,
157 /// Geographic longitude/latitude map projection.
158 Geo,
159}
160
161/// Tooltip activation scope matching Apache ECharts `tooltip.trigger`.
162#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
163pub enum EuvChartTooltipTrigger {
164 /// Disables interactive tooltip cards.
165 None,
166 /// Snaps to the single nearest plotted datum under the pointer.
167 Item,
168 /// Snaps to the active category column or axis coordinate across all visible series.
169 #[default]
170 Axis,
171}
172
173/// Crosshair guide rendered while hovering a Cartesian chart.
174#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
175pub enum EuvChartAxisPointerType {
176 /// No crosshair guide.
177 None,
178 /// Vertical hairline guide at the hovered X coordinate.
179 #[default]
180 Line,
181 /// Translucent column highlight band over the hovered category slot.
182 Shadow,
183 /// Full horizontal and vertical crosshair lines intersecting at the pointer.
184 Cross,
185}
186
187/// Interactive data-zoom controller variant.
188#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
189pub enum EuvChartDataZoomKind {
190 /// Wheel zoom and horizontal pointer-drag pan directly on the plot area.
191 Inside,
192 /// Interactive bottom range scrubber with draggable handles and mini preview.
193 #[default]
194 Slider,
195}
196
197/// Visual-map color mapping behavior.
198#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
199pub enum EuvChartVisualMapKind {
200 /// Smooth multi-stop color gradient bar.
201 #[default]
202 Continuous,
203 /// Discrete threshold-bucketed color legend.
204 Piecewise,
205}
206
207/// Built-in stylized geographic vector polygon preset.
208#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
209pub enum EuvChartGeoMapPreset {
210 /// Built-in world continents and major economic regions.
211 #[default]
212 World,
213 /// Simplified six-continent macro map.
214 Continents,
215 /// Uses exclusively caller-supplied `EuvChartGeoRegion` polygons.
216 Custom,
217}
218
219/// Active toolbox magic-type transformation overriding Cartesian line/bar display.
220#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
221pub enum EuvChartMagicType {
222 /// Renders series in their authored representation.
223 #[default]
224 Default,
225 /// Converts bar/line series into crisp line series.
226 Line,
227 /// Converts line/bar series into grouped bar series.
228 Bar,
229 /// Converts line/bar series into stacked area or stacked bar series.
230 Stack,
231}
232
233/// Single tabular cell value stored inside an `EuvChartDataset`.
234#[derive(Clone, Debug, PartialEq)]
235pub enum EuvChartCell {
236 /// Text category or label cell.
237 Text(String),
238 /// Numeric scalar cell.
239 Number(f32),
240 /// Missing or null data gap cell.
241 Null,
242}
243
244/// Target point specification for a Cartesian `MarkPoint` annotation.
245#[derive(Clone, Copy, Debug, Default, PartialEq)]
246pub enum EuvChartMarkPointKind {
247 /// Annotates the minimum value in the series.
248 Min,
249 /// Annotates the maximum value in the series.
250 #[default]
251 Max,
252 /// Annotates the arithmetic mean point of the series.
253 Average,
254 /// Annotates an explicit `(x, y)` data coordinate.
255 Coord(f32, f32),
256}
257
258/// Target reference line specification for a Cartesian `MarkLine` annotation.
259#[derive(Clone, Copy, Debug, Default, PartialEq)]
260pub enum EuvChartMarkLineKind {
261 /// Horizontal dashed reference line at the series mean.
262 #[default]
263 Average,
264 /// Horizontal dashed reference line at the series minimum.
265 Min,
266 /// Horizontal dashed reference line at the series maximum.
267 Max,
268 /// Horizontal reference line at a fixed Y value.
269 YAxis(f32),
270 /// Vertical reference line at a fixed X value or category index.
271 XAxis(f32),
272}
273
274/// Complete union of all 20 Apache ECharts series visualizations supported natively in `euv-ui`.
275#[derive(Clone, Debug)]
276pub enum EuvChartSeriesData {
277 /// Straight, smooth Catmull-Rom, stepped, stacked, or area line series.
278 Line(EuvChartLineSeries),
279 /// Vertical, horizontal, grouped, stacked, or rounded bar series.
280 Bar(EuvChartBarSeries),
281 /// Standard pie, donut, or Nightingale Rose circular chart.
282 Pie(EuvChartPieSeries),
283 /// 2D scatter or variable-size bubble series.
284 Scatter(EuvChartScatterSeries),
285 /// Animated-style concentric ripple highlight scatter series.
286 EffectScatter(EuvChartScatterSeries),
287 /// Multivariate radar web polygon series.
288 Radar(EuvChartRadarSeries),
289 /// Financial OHLC candlestick (K-Line) series composable with moving-average lines.
290 Candlestick(EuvChartCandlestickSeries),
291 /// Statistical five-number summary box-and-whisker series with outliers.
292 Boxplot(EuvChartBoxplotSeries),
293 /// Cartesian 2D or calendar matrix heatmap colored through `VisualMap`.
294 Heatmap(EuvChartHeatmapSeries),
295 /// Area-proportional squarified hierarchical treemap series.
296 Treemap(EuvChartTreemapSeries),
297 /// Multi-ring concentric hierarchical sunburst wedge series.
298 Sunburst(EuvChartSunburstSeries),
299 /// Layered topological Sankey flow diagram with cubic Bézier ribbons.
300 Sankey(EuvChartSankeySeries),
301 /// Ascending or descending conversion funnel trapezoid series.
302 Funnel(EuvChartFunnelSeries),
303 /// Circular dial gauge with segmented ring, ticks, progress arc, and needle.
304 Gauge(EuvChartGaugeSeries),
305 /// Force-directed or circular node-link network graph series.
306 Graph(EuvChartGraphSeries),
307 /// Orthogonal or radial hierarchical node-link tree series.
308 Tree(EuvChartTreeSeries),
309 /// Multi-axis parallel coordinates polyline series.
310 Parallel(EuvChartParallelSeries),
311 /// Directional quadratic curved flow arcs on Cartesian or Geo coordinates.
312 Lines(EuvChartLinesSeries),
313 /// Centered stacked streamgraph ribbon series over time.
314 ThemeRiver(EuvChartThemeRiverSeries),
315 /// Stacked glyph-symbol pictorial bar series.
316 PictorialBar(EuvChartPictorialBarSeries),
317 /// Custom user vector painter hook emitting arbitrary `DrawCommand` primitives.
318 Custom(EuvChartCustomSeries),
319 /// Vector choropleth map over built-in world/continent or custom Geo regions.
320 GeoMap(EuvChartGeoMapSeries),
321}