@elaraai/east-ui 0.0.1-beta.2 → 0.0.1-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/src/buttons/button/index.d.ts +57 -0
- package/dist/src/buttons/button/index.d.ts.map +1 -1
- package/dist/src/buttons/button/index.js +57 -0
- package/dist/src/buttons/button/index.js.map +1 -1
- package/dist/src/buttons/icon-button/index.d.ts +62 -0
- package/dist/src/buttons/icon-button/index.d.ts.map +1 -1
- package/dist/src/buttons/icon-button/index.js +62 -0
- package/dist/src/buttons/icon-button/index.js.map +1 -1
- package/dist/src/charts/index.d.ts +603 -18
- package/dist/src/charts/index.d.ts.map +1 -1
- package/dist/src/charts/index.js +603 -20
- package/dist/src/charts/index.js.map +1 -1
- package/dist/src/charts/sparkline/index.d.ts +47 -0
- package/dist/src/charts/sparkline/index.d.ts.map +1 -1
- package/dist/src/charts/sparkline/index.js +47 -0
- package/dist/src/charts/sparkline/index.js.map +1 -1
- package/dist/src/collections/data-list/index.d.ts +89 -0
- package/dist/src/collections/data-list/index.d.ts.map +1 -1
- package/dist/src/collections/data-list/index.js +89 -0
- package/dist/src/collections/data-list/index.js.map +1 -1
- package/dist/src/collections/gantt/index.d.ts +177 -4
- package/dist/src/collections/gantt/index.d.ts.map +1 -1
- package/dist/src/collections/gantt/index.js +177 -4
- package/dist/src/collections/gantt/index.js.map +1 -1
- package/dist/src/collections/table/index.d.ts +99 -0
- package/dist/src/collections/table/index.d.ts.map +1 -1
- package/dist/src/collections/table/index.js +99 -0
- package/dist/src/collections/table/index.js.map +1 -1
- package/dist/src/collections/tree-view/index.d.ts +170 -0
- package/dist/src/collections/tree-view/index.d.ts.map +1 -1
- package/dist/src/collections/tree-view/index.js +170 -0
- package/dist/src/collections/tree-view/index.js.map +1 -1
- package/dist/src/container/card/index.d.ts +60 -0
- package/dist/src/container/card/index.d.ts.map +1 -1
- package/dist/src/container/card/index.js +60 -0
- package/dist/src/container/card/index.js.map +1 -1
- package/dist/src/disclosure/accordion/index.d.ts +83 -0
- package/dist/src/disclosure/accordion/index.d.ts.map +1 -1
- package/dist/src/disclosure/accordion/index.js +83 -0
- package/dist/src/disclosure/accordion/index.js.map +1 -1
- package/dist/src/disclosure/carousel/index.d.ts +60 -4
- package/dist/src/disclosure/carousel/index.d.ts.map +1 -1
- package/dist/src/disclosure/carousel/index.js +60 -4
- package/dist/src/disclosure/carousel/index.js.map +1 -1
- package/dist/src/disclosure/tabs/index.d.ts +179 -0
- package/dist/src/disclosure/tabs/index.d.ts.map +1 -1
- package/dist/src/disclosure/tabs/index.js +179 -0
- package/dist/src/disclosure/tabs/index.js.map +1 -1
- package/dist/src/display/avatar/index.d.ts +35 -0
- package/dist/src/display/avatar/index.d.ts.map +1 -1
- package/dist/src/display/avatar/index.js +35 -0
- package/dist/src/display/avatar/index.js.map +1 -1
- package/dist/src/display/badge/index.d.ts +35 -0
- package/dist/src/display/badge/index.d.ts.map +1 -1
- package/dist/src/display/badge/index.js +35 -0
- package/dist/src/display/badge/index.js.map +1 -1
- package/dist/src/display/icon/index.d.ts +78 -6
- package/dist/src/display/icon/index.d.ts.map +1 -1
- package/dist/src/display/icon/index.js +78 -6
- package/dist/src/display/icon/index.js.map +1 -1
- package/dist/src/display/stat/index.d.ts +67 -2
- package/dist/src/display/stat/index.d.ts.map +1 -1
- package/dist/src/display/stat/index.js +68 -3
- package/dist/src/display/stat/index.js.map +1 -1
- package/dist/src/display/tag/index.d.ts +48 -0
- package/dist/src/display/tag/index.d.ts.map +1 -1
- package/dist/src/display/tag/index.js +48 -0
- package/dist/src/display/tag/index.js.map +1 -1
- package/dist/src/feedback/alert/index.d.ts +64 -0
- package/dist/src/feedback/alert/index.d.ts.map +1 -1
- package/dist/src/feedback/alert/index.js +64 -0
- package/dist/src/feedback/alert/index.js.map +1 -1
- package/dist/src/feedback/progress/index.d.ts +54 -0
- package/dist/src/feedback/progress/index.d.ts.map +1 -1
- package/dist/src/feedback/progress/index.js +54 -0
- package/dist/src/feedback/progress/index.js.map +1 -1
- package/dist/src/forms/checkbox/index.d.ts +38 -0
- package/dist/src/forms/checkbox/index.d.ts.map +1 -1
- package/dist/src/forms/checkbox/index.js +38 -0
- package/dist/src/forms/checkbox/index.js.map +1 -1
- package/dist/src/forms/field/index.d.ts +42 -0
- package/dist/src/forms/field/index.d.ts.map +1 -1
- package/dist/src/forms/field/index.js +42 -0
- package/dist/src/forms/field/index.js.map +1 -1
- package/dist/src/forms/fieldset/index.d.ts +30 -3
- package/dist/src/forms/fieldset/index.d.ts.map +1 -1
- package/dist/src/forms/fieldset/index.js +30 -3
- package/dist/src/forms/fieldset/index.js.map +1 -1
- package/dist/src/forms/file-upload/index.d.ts +48 -4
- package/dist/src/forms/file-upload/index.d.ts.map +1 -1
- package/dist/src/forms/file-upload/index.js +48 -4
- package/dist/src/forms/file-upload/index.js.map +1 -1
- package/dist/src/forms/input/index.d.ts +93 -14
- package/dist/src/forms/input/index.d.ts.map +1 -1
- package/dist/src/forms/input/index.js +93 -14
- package/dist/src/forms/input/index.js.map +1 -1
- package/dist/src/forms/select/index.d.ts +10 -6
- package/dist/src/forms/select/index.d.ts.map +1 -1
- package/dist/src/forms/select/index.js +10 -6
- package/dist/src/forms/select/index.js.map +1 -1
- package/dist/src/forms/slider/index.d.ts +15 -0
- package/dist/src/forms/slider/index.d.ts.map +1 -1
- package/dist/src/forms/slider/index.js +15 -0
- package/dist/src/forms/slider/index.js.map +1 -1
- package/dist/src/forms/switch/index.d.ts +20 -0
- package/dist/src/forms/switch/index.d.ts.map +1 -1
- package/dist/src/forms/switch/index.js +20 -0
- package/dist/src/forms/switch/index.js.map +1 -1
- package/dist/src/forms/tags-input/index.d.ts +33 -4
- package/dist/src/forms/tags-input/index.d.ts.map +1 -1
- package/dist/src/forms/tags-input/index.js +33 -4
- package/dist/src/forms/tags-input/index.js.map +1 -1
- package/dist/src/forms/textarea/index.d.ts +36 -4
- package/dist/src/forms/textarea/index.d.ts.map +1 -1
- package/dist/src/forms/textarea/index.js +36 -4
- package/dist/src/forms/textarea/index.js.map +1 -1
- package/dist/src/layout/box/index.d.ts +135 -0
- package/dist/src/layout/box/index.d.ts.map +1 -1
- package/dist/src/layout/box/index.js +135 -0
- package/dist/src/layout/box/index.js.map +1 -1
- package/dist/src/layout/grid/index.d.ts +103 -0
- package/dist/src/layout/grid/index.d.ts.map +1 -1
- package/dist/src/layout/grid/index.js +103 -0
- package/dist/src/layout/grid/index.js.map +1 -1
- package/dist/src/layout/separator/index.d.ts +41 -0
- package/dist/src/layout/separator/index.d.ts.map +1 -1
- package/dist/src/layout/separator/index.js +41 -0
- package/dist/src/layout/separator/index.js.map +1 -1
- package/dist/src/layout/splitter/index.d.ts +92 -0
- package/dist/src/layout/splitter/index.d.ts.map +1 -1
- package/dist/src/layout/splitter/index.js +92 -0
- package/dist/src/layout/splitter/index.js.map +1 -1
- package/dist/src/layout/stack/index.d.ts +158 -0
- package/dist/src/layout/stack/index.d.ts.map +1 -1
- package/dist/src/layout/stack/index.js +158 -0
- package/dist/src/layout/stack/index.js.map +1 -1
- package/dist/src/overlays/action-bar/index.d.ts +105 -0
- package/dist/src/overlays/action-bar/index.d.ts.map +1 -1
- package/dist/src/overlays/action-bar/index.js +105 -0
- package/dist/src/overlays/action-bar/index.js.map +1 -1
- package/dist/src/overlays/dialog/index.d.ts +88 -0
- package/dist/src/overlays/dialog/index.d.ts.map +1 -1
- package/dist/src/overlays/dialog/index.js +88 -0
- package/dist/src/overlays/dialog/index.js.map +1 -1
- package/dist/src/overlays/drawer/index.d.ts +64 -0
- package/dist/src/overlays/drawer/index.d.ts.map +1 -1
- package/dist/src/overlays/drawer/index.js +64 -0
- package/dist/src/overlays/drawer/index.js.map +1 -1
- package/dist/src/overlays/hover-card/index.d.ts +77 -0
- package/dist/src/overlays/hover-card/index.d.ts.map +1 -1
- package/dist/src/overlays/hover-card/index.js +77 -0
- package/dist/src/overlays/hover-card/index.js.map +1 -1
- package/dist/src/overlays/menu/index.d.ts +132 -8
- package/dist/src/overlays/menu/index.d.ts.map +1 -1
- package/dist/src/overlays/menu/index.js +132 -8
- package/dist/src/overlays/menu/index.js.map +1 -1
- package/dist/src/overlays/popover/index.d.ts +84 -0
- package/dist/src/overlays/popover/index.d.ts.map +1 -1
- package/dist/src/overlays/popover/index.js +84 -0
- package/dist/src/overlays/popover/index.js.map +1 -1
- package/dist/src/overlays/toggle-tip/index.d.ts +67 -0
- package/dist/src/overlays/toggle-tip/index.d.ts.map +1 -1
- package/dist/src/overlays/toggle-tip/index.js +67 -0
- package/dist/src/overlays/toggle-tip/index.js.map +1 -1
- package/dist/src/overlays/tooltip/index.d.ts +78 -0
- package/dist/src/overlays/tooltip/index.d.ts.map +1 -1
- package/dist/src/overlays/tooltip/index.js +78 -0
- package/dist/src/overlays/tooltip/index.js.map +1 -1
- package/dist/src/typography/index.d.ts +39 -0
- package/dist/src/typography/index.d.ts.map +1 -1
- package/dist/src/typography/index.js +39 -0
- package/dist/src/typography/index.js.map +1 -1
- package/package.json +1 -1
package/dist/src/charts/index.js
CHANGED
|
@@ -89,74 +89,657 @@ import { BarSegmentType, BarSegmentItemType } from "./bar-segment/index.js";
|
|
|
89
89
|
* ```
|
|
90
90
|
*/
|
|
91
91
|
export const Chart = {
|
|
92
|
-
/**
|
|
92
|
+
/**
|
|
93
|
+
* Creates an Area chart component.
|
|
94
|
+
*
|
|
95
|
+
* @param data - Array of data points
|
|
96
|
+
* @param series - Series configuration keyed by field names
|
|
97
|
+
* @param style - Optional styling configuration
|
|
98
|
+
* @returns An East expression representing the area chart component
|
|
99
|
+
*
|
|
100
|
+
* @remarks
|
|
101
|
+
* Area charts display quantitative data as filled areas under lines.
|
|
102
|
+
* Supports stacking for showing part-to-whole relationships.
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* ```ts
|
|
106
|
+
* import { East } from "@elaraai/east";
|
|
107
|
+
* import { Chart, UIComponentType } from "@elaraai/east-ui";
|
|
108
|
+
*
|
|
109
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
110
|
+
* return Chart.Area(
|
|
111
|
+
* [
|
|
112
|
+
* { month: "Jan", revenue: 186n, profit: 80n },
|
|
113
|
+
* { month: "Feb", revenue: 305n, profit: 120n },
|
|
114
|
+
* ],
|
|
115
|
+
* {
|
|
116
|
+
* revenue: { color: "teal.solid" },
|
|
117
|
+
* profit: { color: "purple.solid" },
|
|
118
|
+
* },
|
|
119
|
+
* { xAxis: Chart.Axis({ dataKey: "month" }) }
|
|
120
|
+
* );
|
|
121
|
+
* });
|
|
122
|
+
* ```
|
|
123
|
+
*/
|
|
93
124
|
Area: createAreaChart,
|
|
94
|
-
/**
|
|
125
|
+
/**
|
|
126
|
+
* Creates a Bar chart component.
|
|
127
|
+
*
|
|
128
|
+
* @param data - Array of data points
|
|
129
|
+
* @param series - Series configuration keyed by field names
|
|
130
|
+
* @param style - Optional styling configuration
|
|
131
|
+
* @returns An East expression representing the bar chart component
|
|
132
|
+
*
|
|
133
|
+
* @remarks
|
|
134
|
+
* Bar charts display categorical data with rectangular bars.
|
|
135
|
+
* Supports vertical and horizontal layouts, stacked and grouped modes.
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* ```ts
|
|
139
|
+
* import { East } from "@elaraai/east";
|
|
140
|
+
* import { Chart, UIComponentType } from "@elaraai/east-ui";
|
|
141
|
+
*
|
|
142
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
143
|
+
* return Chart.Bar(
|
|
144
|
+
* [
|
|
145
|
+
* { category: "A", value: 100n },
|
|
146
|
+
* { category: "B", value: 200n },
|
|
147
|
+
* ],
|
|
148
|
+
* { value: { color: "blue.solid" } },
|
|
149
|
+
* { xAxis: Chart.Axis({ dataKey: "category" }) }
|
|
150
|
+
* );
|
|
151
|
+
* });
|
|
152
|
+
* ```
|
|
153
|
+
*/
|
|
95
154
|
Bar: createBarChart,
|
|
96
|
-
/**
|
|
155
|
+
/**
|
|
156
|
+
* Creates a Line chart component.
|
|
157
|
+
*
|
|
158
|
+
* @param data - Array of data points
|
|
159
|
+
* @param series - Series configuration keyed by field names
|
|
160
|
+
* @param style - Optional styling configuration
|
|
161
|
+
* @returns An East expression representing the line chart component
|
|
162
|
+
*
|
|
163
|
+
* @remarks
|
|
164
|
+
* Line charts display data points connected by line segments.
|
|
165
|
+
* Ideal for showing trends over time.
|
|
166
|
+
*
|
|
167
|
+
* @example
|
|
168
|
+
* ```ts
|
|
169
|
+
* import { East } from "@elaraai/east";
|
|
170
|
+
* import { Chart, UIComponentType } from "@elaraai/east-ui";
|
|
171
|
+
*
|
|
172
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
173
|
+
* return Chart.Line(
|
|
174
|
+
* [
|
|
175
|
+
* { month: "Jan", revenue: 186n, profit: 80n },
|
|
176
|
+
* { month: "Feb", revenue: 305n, profit: 120n },
|
|
177
|
+
* ],
|
|
178
|
+
* {
|
|
179
|
+
* revenue: { color: "teal.solid" },
|
|
180
|
+
* profit: { color: "purple.solid" },
|
|
181
|
+
* },
|
|
182
|
+
* {
|
|
183
|
+
* xAxis: Chart.Axis({ dataKey: "month" }),
|
|
184
|
+
* showDots: true,
|
|
185
|
+
* }
|
|
186
|
+
* );
|
|
187
|
+
* });
|
|
188
|
+
* ```
|
|
189
|
+
*/
|
|
97
190
|
Line: createLineChart,
|
|
98
|
-
/**
|
|
191
|
+
/**
|
|
192
|
+
* Creates a Scatter chart component.
|
|
193
|
+
*
|
|
194
|
+
* @param data - Array of data points
|
|
195
|
+
* @param series - Series configuration keyed by field names
|
|
196
|
+
* @param style - Optional styling configuration
|
|
197
|
+
* @returns An East expression representing the scatter chart component
|
|
198
|
+
*
|
|
199
|
+
* @remarks
|
|
200
|
+
* Scatter charts display individual data points on a coordinate plane.
|
|
201
|
+
* Ideal for showing relationships between two variables.
|
|
202
|
+
*
|
|
203
|
+
* @example
|
|
204
|
+
* ```ts
|
|
205
|
+
* import { East } from "@elaraai/east";
|
|
206
|
+
* import { Chart, UIComponentType } from "@elaraai/east-ui";
|
|
207
|
+
*
|
|
208
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
209
|
+
* return Chart.Scatter(
|
|
210
|
+
* [
|
|
211
|
+
* { x: 10n, y: 30n },
|
|
212
|
+
* { x: 20n, y: 40n },
|
|
213
|
+
* ],
|
|
214
|
+
* { y: { color: "purple.solid" } },
|
|
215
|
+
* { xAxis: Chart.Axis({ dataKey: "x" }) }
|
|
216
|
+
* );
|
|
217
|
+
* });
|
|
218
|
+
* ```
|
|
219
|
+
*/
|
|
99
220
|
Scatter: createScatterChart,
|
|
100
|
-
/**
|
|
221
|
+
/**
|
|
222
|
+
* Creates a Pie or Donut chart component.
|
|
223
|
+
*
|
|
224
|
+
* @param data - Array of slice data
|
|
225
|
+
* @param style - Optional styling configuration
|
|
226
|
+
* @returns An East expression representing the pie chart component
|
|
227
|
+
*
|
|
228
|
+
* @remarks
|
|
229
|
+
* Pie charts display proportional data as slices of a circle.
|
|
230
|
+
* Set innerRadius for a donut chart appearance.
|
|
231
|
+
*
|
|
232
|
+
* @example
|
|
233
|
+
* ```ts
|
|
234
|
+
* import { East } from "@elaraai/east";
|
|
235
|
+
* import { Chart, UIComponentType } from "@elaraai/east-ui";
|
|
236
|
+
*
|
|
237
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
238
|
+
* return Chart.Pie(
|
|
239
|
+
* [
|
|
240
|
+
* { name: "Chrome", value: 275n, color: "blue.solid" },
|
|
241
|
+
* { name: "Safari", value: 200n, color: "green.solid" },
|
|
242
|
+
* ],
|
|
243
|
+
* { showLabels: true }
|
|
244
|
+
* );
|
|
245
|
+
* });
|
|
246
|
+
* ```
|
|
247
|
+
*/
|
|
101
248
|
Pie: createPieChart,
|
|
102
|
-
/**
|
|
249
|
+
/**
|
|
250
|
+
* Creates a Radar chart component.
|
|
251
|
+
*
|
|
252
|
+
* @param data - Array of data points
|
|
253
|
+
* @param series - Series configuration keyed by field names
|
|
254
|
+
* @param style - Optional styling configuration
|
|
255
|
+
* @returns An East expression representing the radar chart component
|
|
256
|
+
*
|
|
257
|
+
* @remarks
|
|
258
|
+
* Radar charts display multivariate data on radial axes.
|
|
259
|
+
* Useful for comparing multiple attributes across entities.
|
|
260
|
+
*
|
|
261
|
+
* @example
|
|
262
|
+
* ```ts
|
|
263
|
+
* import { East } from "@elaraai/east";
|
|
264
|
+
* import { Chart, UIComponentType } from "@elaraai/east-ui";
|
|
265
|
+
*
|
|
266
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
267
|
+
* return Chart.Radar(
|
|
268
|
+
* [
|
|
269
|
+
* { subject: "Math", A: 120n, B: 110n },
|
|
270
|
+
* { subject: "English", A: 98n, B: 130n },
|
|
271
|
+
* ],
|
|
272
|
+
* {
|
|
273
|
+
* A: { color: "teal.solid" },
|
|
274
|
+
* B: { color: "purple.solid" },
|
|
275
|
+
* },
|
|
276
|
+
* { dataKey: "subject" }
|
|
277
|
+
* );
|
|
278
|
+
* });
|
|
279
|
+
* ```
|
|
280
|
+
*/
|
|
103
281
|
Radar: createRadarChart,
|
|
104
|
-
/**
|
|
282
|
+
/**
|
|
283
|
+
* Creates a BarList component (Chakra-native horizontal bars).
|
|
284
|
+
*
|
|
285
|
+
* @param data - Array of bar items with name, value, and optional color/href
|
|
286
|
+
* @param style - Optional styling configuration
|
|
287
|
+
* @returns An East expression representing the bar list component
|
|
288
|
+
*
|
|
289
|
+
* @remarks
|
|
290
|
+
* BarList displays horizontal comparison bars with labels and values.
|
|
291
|
+
* Native Chakra component, not Recharts-based.
|
|
292
|
+
*
|
|
293
|
+
* @example
|
|
294
|
+
* ```ts
|
|
295
|
+
* import { East } from "@elaraai/east";
|
|
296
|
+
* import { Chart, UIComponentType } from "@elaraai/east-ui";
|
|
297
|
+
*
|
|
298
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
299
|
+
* return Chart.BarList(
|
|
300
|
+
* [
|
|
301
|
+
* { name: "Chrome", value: 275n },
|
|
302
|
+
* { name: "Safari", value: 200n },
|
|
303
|
+
* ],
|
|
304
|
+
* { colorPalette: "blue", showValue: true }
|
|
305
|
+
* );
|
|
306
|
+
* });
|
|
307
|
+
* ```
|
|
308
|
+
*/
|
|
105
309
|
BarList: createBarList,
|
|
106
|
-
/**
|
|
310
|
+
/**
|
|
311
|
+
* Creates a BarSegment component (proportional horizontal segments).
|
|
312
|
+
*
|
|
313
|
+
* @param data - Array of segment items with name, value, and optional color
|
|
314
|
+
* @param style - Optional styling configuration
|
|
315
|
+
* @returns An East expression representing the bar segment component
|
|
316
|
+
*
|
|
317
|
+
* @remarks
|
|
318
|
+
* BarSegment displays proportional segments in a single horizontal bar.
|
|
319
|
+
* Native Chakra component for showing percentage breakdowns.
|
|
320
|
+
*
|
|
321
|
+
* @example
|
|
322
|
+
* ```ts
|
|
323
|
+
* import { East } from "@elaraai/east";
|
|
324
|
+
* import { Chart, UIComponentType } from "@elaraai/east-ui";
|
|
325
|
+
*
|
|
326
|
+
* const example = East.function([], UIComponentType, $ => {
|
|
327
|
+
* return Chart.BarSegment(
|
|
328
|
+
* [
|
|
329
|
+
* { name: "Completed", value: 75n, color: "green.solid" },
|
|
330
|
+
* { name: "Remaining", value: 25n, color: "gray.solid" },
|
|
331
|
+
* ],
|
|
332
|
+
* { showLegend: true }
|
|
333
|
+
* );
|
|
334
|
+
* });
|
|
335
|
+
* ```
|
|
336
|
+
*/
|
|
107
337
|
BarSegment: createBarSegment,
|
|
108
|
-
/**
|
|
338
|
+
/**
|
|
339
|
+
* Helper function to create chart series configuration.
|
|
340
|
+
*
|
|
341
|
+
* @param config - Series configuration options
|
|
342
|
+
* @returns A series configuration object
|
|
343
|
+
*
|
|
344
|
+
* @remarks
|
|
345
|
+
* Used to define how a data field is rendered as a series in charts.
|
|
346
|
+
*/
|
|
109
347
|
Series: ChartSeries,
|
|
110
|
-
/**
|
|
348
|
+
/**
|
|
349
|
+
* Helper function to create chart sort configuration.
|
|
350
|
+
*
|
|
351
|
+
* @param config - Sort configuration options
|
|
352
|
+
* @returns A sort configuration object
|
|
353
|
+
*
|
|
354
|
+
* @remarks
|
|
355
|
+
* Used to sort data in BarList and BarSegment charts.
|
|
356
|
+
*/
|
|
111
357
|
Sort: ChartSort,
|
|
112
|
-
/**
|
|
358
|
+
/**
|
|
359
|
+
* Helper function to create chart grid configuration.
|
|
360
|
+
*
|
|
361
|
+
* @param config - Grid configuration options
|
|
362
|
+
* @returns A grid configuration object
|
|
363
|
+
*
|
|
364
|
+
* @remarks
|
|
365
|
+
* Controls the display of grid lines on Cartesian charts.
|
|
366
|
+
*/
|
|
113
367
|
Grid: ChartGrid,
|
|
114
|
-
/**
|
|
368
|
+
/**
|
|
369
|
+
* Helper function to create chart margin configuration.
|
|
370
|
+
*
|
|
371
|
+
* @param config - Margin configuration options
|
|
372
|
+
* @returns A margin configuration object
|
|
373
|
+
*
|
|
374
|
+
* @remarks
|
|
375
|
+
* Sets the margin around the chart content area.
|
|
376
|
+
*/
|
|
115
377
|
Margin: ChartMargin,
|
|
116
|
-
/**
|
|
378
|
+
/**
|
|
379
|
+
* Helper function to create stack offset configuration.
|
|
380
|
+
*
|
|
381
|
+
* @param offset - Stack offset type
|
|
382
|
+
* @returns A stack offset variant
|
|
383
|
+
*
|
|
384
|
+
* @remarks
|
|
385
|
+
* Controls how stacked series are offset (none, expand, wiggle, silhouette).
|
|
386
|
+
*/
|
|
117
387
|
StackOffset,
|
|
118
|
-
/**
|
|
388
|
+
/**
|
|
389
|
+
* Helper function to create bar layout configuration.
|
|
390
|
+
*
|
|
391
|
+
* @param layout - Bar layout type
|
|
392
|
+
* @returns A bar layout variant
|
|
393
|
+
*
|
|
394
|
+
* @remarks
|
|
395
|
+
* Controls bar orientation (horizontal or vertical).
|
|
396
|
+
*/
|
|
119
397
|
BarLayout,
|
|
120
|
-
/**
|
|
398
|
+
/**
|
|
399
|
+
* Helper function to create legend configuration.
|
|
400
|
+
*
|
|
401
|
+
* @param config - Legend configuration options
|
|
402
|
+
* @returns A legend configuration object
|
|
403
|
+
*
|
|
404
|
+
* @remarks
|
|
405
|
+
* Controls the display and positioning of the chart legend.
|
|
406
|
+
*/
|
|
121
407
|
Legend: ChartLegend,
|
|
122
|
-
/**
|
|
408
|
+
/**
|
|
409
|
+
* Helper function to create tooltip configuration.
|
|
410
|
+
*
|
|
411
|
+
* @param config - Tooltip configuration options
|
|
412
|
+
* @returns A tooltip configuration object
|
|
413
|
+
*
|
|
414
|
+
* @remarks
|
|
415
|
+
* Controls the display and behavior of chart tooltips.
|
|
416
|
+
*/
|
|
123
417
|
Tooltip: ChartTooltip,
|
|
124
|
-
/**
|
|
418
|
+
/**
|
|
419
|
+
* Helper function to create axis configuration.
|
|
420
|
+
*
|
|
421
|
+
* @param config - Axis configuration options
|
|
422
|
+
* @returns An axis configuration object
|
|
423
|
+
*
|
|
424
|
+
* @remarks
|
|
425
|
+
* Configures axis labels, tick formats, and visibility.
|
|
426
|
+
*/
|
|
125
427
|
Axis: ChartAxis,
|
|
428
|
+
/**
|
|
429
|
+
* Tick format helpers for axis labels.
|
|
430
|
+
*
|
|
431
|
+
* @remarks
|
|
432
|
+
* Provides type-safe formatters for different number and date formats.
|
|
433
|
+
*/
|
|
126
434
|
TickFormat: {
|
|
435
|
+
/** Format as plain number */
|
|
127
436
|
Number: NumberTickFormat,
|
|
437
|
+
/** Format as currency */
|
|
128
438
|
Currency: CurrencyTickFormat,
|
|
439
|
+
/** Format as percentage */
|
|
129
440
|
Percent: PercentTickFormat,
|
|
441
|
+
/** Format as compact number (K, M, B) */
|
|
130
442
|
Compact: CompactTickFormat,
|
|
443
|
+
/** Format with custom unit */
|
|
131
444
|
Unit: UnitTickFormat,
|
|
445
|
+
/** Format in scientific notation */
|
|
132
446
|
Scientific: ScientificTickFormat,
|
|
447
|
+
/** Format in engineering notation */
|
|
133
448
|
Engineering: EngineeringTickFormat,
|
|
449
|
+
/** Format as date */
|
|
134
450
|
Date: DateTickFormat,
|
|
451
|
+
/** Format as time */
|
|
135
452
|
Time: TimeTickFormat,
|
|
453
|
+
/** Format as date and time */
|
|
136
454
|
DateTime: DateTimeTickFormat
|
|
137
455
|
},
|
|
138
|
-
/**
|
|
456
|
+
/**
|
|
457
|
+
* East types for all chart components and configuration.
|
|
458
|
+
*
|
|
459
|
+
* @remarks
|
|
460
|
+
* Access these types for serialization or type-checking chart data structures.
|
|
461
|
+
*/
|
|
139
462
|
Types: {
|
|
140
|
-
|
|
463
|
+
/**
|
|
464
|
+
* The concrete East type for chart series configuration.
|
|
465
|
+
*
|
|
466
|
+
* @remarks
|
|
467
|
+
* Defines how a data field is rendered as a series in multi-series charts.
|
|
468
|
+
* Mirrors Chakra's useChart series config.
|
|
469
|
+
*
|
|
470
|
+
* @property name - Data key name matching keys in data points (StringType)
|
|
471
|
+
* @property color - Chakra color token e.g. "teal.solid" (OptionType<StringType>)
|
|
472
|
+
* @property stackId - Stack group ID for stacking (OptionType<StringType>)
|
|
473
|
+
* @property label - Display label, defaults to name (OptionType<StringType>)
|
|
474
|
+
* @property stroke - Stroke/line color (OptionType<StringType>)
|
|
475
|
+
* @property strokeWidth - Stroke width in pixels (OptionType<IntegerType>)
|
|
476
|
+
* @property fill - Fill color (OptionType<StringType>)
|
|
477
|
+
* @property fillOpacity - Fill opacity 0-1 (OptionType<FloatType>)
|
|
478
|
+
* @property strokeDasharray - Dash pattern e.g. "5 5" (OptionType<StringType>)
|
|
479
|
+
*/
|
|
141
480
|
Series: ChartSeriesType,
|
|
481
|
+
/**
|
|
482
|
+
* The concrete East type for chart sort configuration.
|
|
483
|
+
*
|
|
484
|
+
* @remarks
|
|
485
|
+
* Used to sort data in BarList and BarSegment charts.
|
|
486
|
+
*
|
|
487
|
+
* @property by - Data key to sort by (StringType)
|
|
488
|
+
* @property direction - Sort direction asc or desc (ChartSortDirectionType)
|
|
489
|
+
*/
|
|
142
490
|
Sort: ChartSortType,
|
|
491
|
+
/**
|
|
492
|
+
* Sort direction variant type.
|
|
493
|
+
*
|
|
494
|
+
* @remarks
|
|
495
|
+
* Controls ascending or descending sort order for charts.
|
|
496
|
+
*
|
|
497
|
+
* @property asc - Ascending order (smallest to largest)
|
|
498
|
+
* @property desc - Descending order (largest to smallest)
|
|
499
|
+
*/
|
|
143
500
|
SortDirection: ChartSortDirectionType,
|
|
501
|
+
/**
|
|
502
|
+
* The concrete East type for chart axis configuration.
|
|
503
|
+
*
|
|
504
|
+
* @remarks
|
|
505
|
+
* Configures X and Y axis display on Cartesian charts.
|
|
506
|
+
*
|
|
507
|
+
* @property dataKey - Field name for axis values (OptionType<StringType>)
|
|
508
|
+
* @property label - Axis label text (OptionType<StringType>)
|
|
509
|
+
* @property tickFormat - Format for tick labels (OptionType<TickFormatType>)
|
|
510
|
+
* @property hide - Whether to hide the axis (OptionType<BooleanType>)
|
|
511
|
+
* @property domain - Axis domain min/max (OptionType<ArrayType<FloatType>>)
|
|
512
|
+
* @property tickLine - Show tick lines (OptionType<BooleanType>)
|
|
513
|
+
* @property axisLine - Show axis line (OptionType<BooleanType>)
|
|
514
|
+
*/
|
|
144
515
|
Axis: ChartAxisType,
|
|
516
|
+
/**
|
|
517
|
+
* Tick format variant type for axis labels.
|
|
518
|
+
*
|
|
519
|
+
* @remarks
|
|
520
|
+
* Provides type-safe number and date formatting options for axis ticks.
|
|
521
|
+
*
|
|
522
|
+
* @property Number - Plain number format with decimal places
|
|
523
|
+
* @property Currency - Currency format with symbol and locale
|
|
524
|
+
* @property Percent - Percentage format
|
|
525
|
+
* @property Compact - Compact notation (K, M, B)
|
|
526
|
+
* @property Unit - Custom unit suffix
|
|
527
|
+
* @property Scientific - Scientific notation
|
|
528
|
+
* @property Engineering - Engineering notation
|
|
529
|
+
* @property Date - Date format
|
|
530
|
+
* @property Time - Time format
|
|
531
|
+
* @property DateTime - Date and time format
|
|
532
|
+
*/
|
|
145
533
|
TickFormat: TickFormatType,
|
|
534
|
+
/**
|
|
535
|
+
* Curve type variant for line interpolation.
|
|
536
|
+
*
|
|
537
|
+
* @remarks
|
|
538
|
+
* Controls how line segments are interpolated between data points.
|
|
539
|
+
*
|
|
540
|
+
* @property linear - Straight line segments
|
|
541
|
+
* @property natural - Natural cubic spline (smooth)
|
|
542
|
+
* @property monotone - Monotone cubic interpolation (no overshoot)
|
|
543
|
+
* @property step - Step function (horizontal then vertical)
|
|
544
|
+
* @property stepBefore - Step before the point
|
|
545
|
+
* @property stepAfter - Step after the point
|
|
546
|
+
*/
|
|
146
547
|
Curve: CurveType,
|
|
548
|
+
/**
|
|
549
|
+
* Stack offset variant type.
|
|
550
|
+
*
|
|
551
|
+
* @remarks
|
|
552
|
+
* Controls how stacked series are offset relative to each other.
|
|
553
|
+
*
|
|
554
|
+
* @property none - No offset, standard stacking from zero
|
|
555
|
+
* @property expand - Normalize to percentage (0-100%)
|
|
556
|
+
* @property wiggle - Minimize deviation from center
|
|
557
|
+
* @property silhouette - Center the baseline
|
|
558
|
+
*/
|
|
147
559
|
StackOffset: StackOffsetType,
|
|
560
|
+
/**
|
|
561
|
+
* Bar layout variant type.
|
|
562
|
+
*
|
|
563
|
+
* @remarks
|
|
564
|
+
* Controls the orientation of bars in bar charts.
|
|
565
|
+
*
|
|
566
|
+
* @property horizontal - Bars extend horizontally (category on Y axis)
|
|
567
|
+
* @property vertical - Bars extend vertically (category on X axis)
|
|
568
|
+
*/
|
|
148
569
|
BarLayout: BarLayoutType,
|
|
149
|
-
|
|
570
|
+
/**
|
|
571
|
+
* The concrete East type for Area chart data.
|
|
572
|
+
*
|
|
573
|
+
* @remarks
|
|
574
|
+
* Area charts display quantitative data with filled areas under line curves.
|
|
575
|
+
* Supports stacking for showing part-to-whole relationships.
|
|
576
|
+
*
|
|
577
|
+
* @property data - Array of data points as Dict<String, LiteralValue>
|
|
578
|
+
* @property series - Array of series configuration (ArrayType<ChartSeriesType>)
|
|
579
|
+
* @property xAxis - X-axis configuration (OptionType<ChartAxisType>)
|
|
580
|
+
* @property yAxis - Y-axis configuration (OptionType<ChartAxisType>)
|
|
581
|
+
* @property curveType - Line curve interpolation (OptionType<CurveType>)
|
|
582
|
+
* @property stacked - Enable stacking (OptionType<BooleanType>)
|
|
583
|
+
* @property stackOffset - Stack offset mode (OptionType<StackOffsetType>)
|
|
584
|
+
* @property grid - Grid configuration (OptionType<ChartGridType>)
|
|
585
|
+
* @property tooltip - Tooltip configuration (OptionType<ChartTooltipType>)
|
|
586
|
+
* @property legend - Legend configuration (OptionType<ChartLegendType>)
|
|
587
|
+
* @property margin - Chart margin (OptionType<ChartMarginType>)
|
|
588
|
+
* @property fillOpacity - Fill opacity 0-1 (OptionType<FloatType>)
|
|
589
|
+
* @property connectNulls - Connect across nulls (OptionType<BooleanType>)
|
|
590
|
+
*/
|
|
150
591
|
AreaChart: AreaChartType,
|
|
592
|
+
/**
|
|
593
|
+
* The concrete East type for Bar chart data.
|
|
594
|
+
*
|
|
595
|
+
* @remarks
|
|
596
|
+
* Bar charts display categorical data with rectangular bars.
|
|
597
|
+
* Supports horizontal/vertical layouts and stacking.
|
|
598
|
+
*
|
|
599
|
+
* @property data - Array of data points as Dict<String, LiteralValue>
|
|
600
|
+
* @property series - Array of series configuration (ArrayType<ChartSeriesType>)
|
|
601
|
+
* @property xAxis - X-axis configuration (OptionType<ChartAxisType>)
|
|
602
|
+
* @property yAxis - Y-axis configuration (OptionType<ChartAxisType>)
|
|
603
|
+
* @property layout - Bar direction (OptionType<BarLayoutType>)
|
|
604
|
+
* @property stacked - Enable stacking (OptionType<BooleanType>)
|
|
605
|
+
* @property stackOffset - Stack offset mode (OptionType<StackOffsetType>)
|
|
606
|
+
* @property grid - Grid configuration (OptionType<ChartGridType>)
|
|
607
|
+
* @property tooltip - Tooltip configuration (OptionType<ChartTooltipType>)
|
|
608
|
+
* @property legend - Legend configuration (OptionType<ChartLegendType>)
|
|
609
|
+
* @property margin - Chart margin (OptionType<ChartMarginType>)
|
|
610
|
+
* @property barSize - Bar width/height in pixels (OptionType<IntegerType>)
|
|
611
|
+
* @property barGap - Gap between bars (OptionType<IntegerType>)
|
|
612
|
+
* @property radius - Rounded corner radius (OptionType<IntegerType>)
|
|
613
|
+
*/
|
|
151
614
|
BarChart: BarChartType,
|
|
615
|
+
/**
|
|
616
|
+
* The concrete East type for Line chart data.
|
|
617
|
+
*
|
|
618
|
+
* @remarks
|
|
619
|
+
* Line charts display data points connected by line segments.
|
|
620
|
+
* Ideal for showing trends over time.
|
|
621
|
+
*
|
|
622
|
+
* @property data - Array of data points as Dict<String, LiteralValue>
|
|
623
|
+
* @property series - Array of series configuration (ArrayType<ChartSeriesType>)
|
|
624
|
+
* @property xAxis - X-axis configuration (OptionType<ChartAxisType>)
|
|
625
|
+
* @property yAxis - Y-axis configuration (OptionType<ChartAxisType>)
|
|
626
|
+
* @property curveType - Line curve interpolation (OptionType<CurveType>)
|
|
627
|
+
* @property grid - Grid configuration (OptionType<ChartGridType>)
|
|
628
|
+
* @property tooltip - Tooltip configuration (OptionType<ChartTooltipType>)
|
|
629
|
+
* @property legend - Legend configuration (OptionType<ChartLegendType>)
|
|
630
|
+
* @property margin - Chart margin (OptionType<ChartMarginType>)
|
|
631
|
+
* @property showDots - Show dots at data points (OptionType<BooleanType>)
|
|
632
|
+
* @property strokeWidth - Line stroke width (OptionType<IntegerType>)
|
|
633
|
+
* @property connectNulls - Connect across nulls (OptionType<BooleanType>)
|
|
634
|
+
*/
|
|
152
635
|
LineChart: LineChartType,
|
|
636
|
+
/**
|
|
637
|
+
* The concrete East type for Scatter chart data.
|
|
638
|
+
*
|
|
639
|
+
* @remarks
|
|
640
|
+
* Scatter charts display individual data points on a coordinate plane.
|
|
641
|
+
* Ideal for showing relationships between two variables.
|
|
642
|
+
*
|
|
643
|
+
* @property data - Array of data points as Dict<String, LiteralValue>
|
|
644
|
+
* @property series - Array of series configuration (ArrayType<ChartSeriesType>)
|
|
645
|
+
* @property xAxis - X-axis configuration (OptionType<ChartAxisType>)
|
|
646
|
+
* @property yAxis - Y-axis configuration (OptionType<ChartAxisType>)
|
|
647
|
+
* @property grid - Grid configuration (OptionType<ChartGridType>)
|
|
648
|
+
* @property tooltip - Tooltip configuration (OptionType<ChartTooltipType>)
|
|
649
|
+
* @property legend - Legend configuration (OptionType<ChartLegendType>)
|
|
650
|
+
* @property margin - Chart margin (OptionType<ChartMarginType>)
|
|
651
|
+
*/
|
|
153
652
|
ScatterChart: ScatterChartType,
|
|
653
|
+
/**
|
|
654
|
+
* The concrete East type for Pie chart data.
|
|
655
|
+
*
|
|
656
|
+
* @remarks
|
|
657
|
+
* Pie charts display proportional data as slices of a circle.
|
|
658
|
+
* Set innerRadius for a donut chart appearance.
|
|
659
|
+
*
|
|
660
|
+
* @property data - Array of pie slices (ArrayType<PieSliceType>)
|
|
661
|
+
* @property innerRadius - Inner radius for donut chart (OptionType<IntegerType>)
|
|
662
|
+
* @property outerRadius - Outer radius (OptionType<IntegerType>)
|
|
663
|
+
* @property startAngle - Starting angle in degrees (OptionType<IntegerType>)
|
|
664
|
+
* @property endAngle - Ending angle in degrees (OptionType<IntegerType>)
|
|
665
|
+
* @property showLabels - Show slice labels (OptionType<BooleanType>)
|
|
666
|
+
* @property tooltip - Tooltip configuration (OptionType<ChartTooltipType>)
|
|
667
|
+
* @property legend - Legend configuration (OptionType<ChartLegendType>)
|
|
668
|
+
*/
|
|
154
669
|
PieChart: PieChartType,
|
|
670
|
+
/**
|
|
671
|
+
* The concrete East type for Pie chart slice data.
|
|
672
|
+
*
|
|
673
|
+
* @remarks
|
|
674
|
+
* Each slice represents a segment of the pie chart.
|
|
675
|
+
*
|
|
676
|
+
* @property name - Slice label (StringType)
|
|
677
|
+
* @property value - Slice value (IntegerType or FloatType)
|
|
678
|
+
* @property color - Slice color (OptionType<StringType>)
|
|
679
|
+
*/
|
|
155
680
|
PieSlice: PieSliceType,
|
|
681
|
+
/**
|
|
682
|
+
* The concrete East type for Radar chart data.
|
|
683
|
+
*
|
|
684
|
+
* @remarks
|
|
685
|
+
* Radar charts display multivariate data on radial axes.
|
|
686
|
+
* Useful for comparing multiple attributes across entities.
|
|
687
|
+
*
|
|
688
|
+
* @property data - Array of data points as Dict<String, LiteralValue>
|
|
689
|
+
* @property series - Array of series configuration (ArrayType<ChartSeriesType>)
|
|
690
|
+
* @property dataKey - Field name for radial axis labels (StringType)
|
|
691
|
+
* @property grid - Grid configuration (OptionType<ChartGridType>)
|
|
692
|
+
* @property tooltip - Tooltip configuration (OptionType<ChartTooltipType>)
|
|
693
|
+
* @property legend - Legend configuration (OptionType<ChartLegendType>)
|
|
694
|
+
*/
|
|
156
695
|
RadarChart: RadarChartType,
|
|
696
|
+
/**
|
|
697
|
+
* The concrete East type for BarList data.
|
|
698
|
+
*
|
|
699
|
+
* @remarks
|
|
700
|
+
* BarList displays horizontal comparison bars with labels and values.
|
|
701
|
+
* Native Chakra component, not Recharts-based.
|
|
702
|
+
*
|
|
703
|
+
* @property data - Array of bar items (ArrayType<BarListItemType>)
|
|
704
|
+
* @property colorPalette - Default color scheme (OptionType<ColorSchemeType>)
|
|
705
|
+
* @property showValue - Show values next to bars (OptionType<BooleanType>)
|
|
706
|
+
* @property sort - Sort configuration (OptionType<ChartSortType>)
|
|
707
|
+
*/
|
|
157
708
|
BarList: BarListType,
|
|
709
|
+
/**
|
|
710
|
+
* The concrete East type for BarList item data.
|
|
711
|
+
*
|
|
712
|
+
* @remarks
|
|
713
|
+
* Each item represents a bar in the BarList chart.
|
|
714
|
+
*
|
|
715
|
+
* @property name - Item label (StringType)
|
|
716
|
+
* @property value - Item value (IntegerType or FloatType)
|
|
717
|
+
* @property color - Item color (OptionType<StringType>)
|
|
718
|
+
* @property href - Optional link URL (OptionType<StringType>)
|
|
719
|
+
*/
|
|
158
720
|
BarListItem: BarListItemType,
|
|
721
|
+
/**
|
|
722
|
+
* The concrete East type for BarSegment data.
|
|
723
|
+
*
|
|
724
|
+
* @remarks
|
|
725
|
+
* BarSegment displays proportional segments in a single horizontal bar.
|
|
726
|
+
* Native Chakra component for showing percentage breakdowns.
|
|
727
|
+
*
|
|
728
|
+
* @property data - Array of segment items (ArrayType<BarSegmentItemType>)
|
|
729
|
+
* @property showLegend - Show legend (OptionType<BooleanType>)
|
|
730
|
+
* @property showValue - Show values on segments (OptionType<BooleanType>)
|
|
731
|
+
*/
|
|
159
732
|
BarSegment: BarSegmentType,
|
|
733
|
+
/**
|
|
734
|
+
* The concrete East type for BarSegment item data.
|
|
735
|
+
*
|
|
736
|
+
* @remarks
|
|
737
|
+
* Each item represents a segment in the BarSegment chart.
|
|
738
|
+
*
|
|
739
|
+
* @property name - Segment label (StringType)
|
|
740
|
+
* @property value - Segment value (IntegerType or FloatType)
|
|
741
|
+
* @property color - Segment color (OptionType<StringType>)
|
|
742
|
+
*/
|
|
160
743
|
BarSegmentItem: BarSegmentItemType,
|
|
161
744
|
},
|
|
162
745
|
};
|