react-native-metrify 0.1.0-alpha.1 → 0.1.0-alpha.2

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.
Files changed (100) hide show
  1. package/package.json +1 -2
  2. package/src/core/animation/index.ts +0 -113
  3. package/src/core/animation/index.web.ts +0 -112
  4. package/src/core/hooks/index.ts +0 -66
  5. package/src/core/index.ts +0 -26
  6. package/src/core/layout/index.ts +0 -101
  7. package/src/core/math/index.ts +0 -72
  8. package/src/core/package.json +0 -13
  9. package/src/core/theme/ThemeProvider.tsx +0 -36
  10. package/src/core/theme/index.ts +0 -5
  11. package/src/core/theme/themes.ts +0 -132
  12. package/src/core/types/index.ts +0 -164
  13. package/src/core/utils/responsive.ts +0 -203
  14. package/src/core/utils/time.ts +0 -100
  15. package/src/index.ts +0 -13
  16. package/src/renderer-svg/adapters/index.ts +0 -84
  17. package/src/renderer-svg/index.ts +0 -8
  18. package/src/renderer-svg/package.json +0 -17
  19. package/src/renderer-svg/paths/arc.ts +0 -93
  20. package/src/renderer-svg/paths/index.ts +0 -6
  21. package/src/renderer-svg/paths/line.ts +0 -83
  22. package/src/renderer-svg/paths/rect.ts +0 -80
  23. package/src/renderer-svg/primitives/AnimatedCircle.tsx +0 -48
  24. package/src/renderer-svg/primitives/AnimatedPath.tsx +0 -48
  25. package/src/renderer-svg/primitives/Text.tsx +0 -73
  26. package/src/renderer-svg/primitives/index.ts +0 -6
  27. package/src/widgets/AreaChart/AreaChart.tsx +0 -213
  28. package/src/widgets/AreaChart/index.ts +0 -2
  29. package/src/widgets/AreaChart/types.ts +0 -34
  30. package/src/widgets/BarChart/BarChart.tsx +0 -249
  31. package/src/widgets/BarChart/index.ts +0 -10
  32. package/src/widgets/BarChart/types.ts +0 -27
  33. package/src/widgets/BoxPlot/BoxPlot.tsx +0 -252
  34. package/src/widgets/BoxPlot/index.ts +0 -2
  35. package/src/widgets/BoxPlot/types.ts +0 -27
  36. package/src/widgets/BubbleChart/BubbleChart.tsx +0 -175
  37. package/src/widgets/BubbleChart/index.ts +0 -2
  38. package/src/widgets/BubbleChart/types.ts +0 -33
  39. package/src/widgets/CandlestickChart/CandlestickChart.tsx +0 -204
  40. package/src/widgets/CandlestickChart/index.ts +0 -2
  41. package/src/widgets/CandlestickChart/types.ts +0 -29
  42. package/src/widgets/FunnelChart/FunnelChart.tsx +0 -172
  43. package/src/widgets/FunnelChart/index.ts +0 -2
  44. package/src/widgets/FunnelChart/types.ts +0 -22
  45. package/src/widgets/Gauge/Gauge.tsx +0 -235
  46. package/src/widgets/Gauge/index.ts +0 -5
  47. package/src/widgets/Gauge/types.ts +0 -19
  48. package/src/widgets/GroupedBarChart/GroupedBarChart.tsx +0 -190
  49. package/src/widgets/GroupedBarChart/index.ts +0 -2
  50. package/src/widgets/GroupedBarChart/types.ts +0 -30
  51. package/src/widgets/Heatmap/Heatmap.tsx +0 -216
  52. package/src/widgets/Heatmap/index.ts +0 -2
  53. package/src/widgets/Heatmap/types.ts +0 -27
  54. package/src/widgets/Histogram/Histogram.tsx +0 -173
  55. package/src/widgets/Histogram/index.ts +0 -2
  56. package/src/widgets/Histogram/types.ts +0 -18
  57. package/src/widgets/HorizontalBarChart/HorizontalBarChart.tsx +0 -125
  58. package/src/widgets/HorizontalBarChart/index.ts +0 -2
  59. package/src/widgets/HorizontalBarChart/types.ts +0 -23
  60. package/src/widgets/KPI/KPI.tsx +0 -222
  61. package/src/widgets/KPI/index.ts +0 -5
  62. package/src/widgets/KPI/types.ts +0 -19
  63. package/src/widgets/LineChart/LineChart.tsx +0 -364
  64. package/src/widgets/LineChart/index.ts +0 -10
  65. package/src/widgets/LineChart/types.ts +0 -34
  66. package/src/widgets/MultiLineSparkline/MultiLineSparkline.tsx +0 -234
  67. package/src/widgets/MultiLineSparkline/index.ts +0 -10
  68. package/src/widgets/MultiLineSparkline/types.ts +0 -25
  69. package/src/widgets/PieChart/PieChart.tsx +0 -275
  70. package/src/widgets/PieChart/index.ts +0 -10
  71. package/src/widgets/PieChart/types.ts +0 -26
  72. package/src/widgets/Progress/Progress.tsx +0 -201
  73. package/src/widgets/Progress/index.ts +0 -5
  74. package/src/widgets/Progress/types.ts +0 -19
  75. package/src/widgets/RadarChart/RadarChart.tsx +0 -213
  76. package/src/widgets/RadarChart/index.ts +0 -2
  77. package/src/widgets/RadarChart/types.ts +0 -29
  78. package/src/widgets/SankeyDiagram/SankeyDiagram.tsx +0 -272
  79. package/src/widgets/SankeyDiagram/index.ts +0 -2
  80. package/src/widgets/SankeyDiagram/types.ts +0 -29
  81. package/src/widgets/ScatterPlot/ScatterPlot.tsx +0 -167
  82. package/src/widgets/ScatterPlot/index.ts +0 -2
  83. package/src/widgets/ScatterPlot/types.ts +0 -32
  84. package/src/widgets/Sparkline/Sparkline.tsx +0 -203
  85. package/src/widgets/Sparkline/index.ts +0 -5
  86. package/src/widgets/Sparkline/types.ts +0 -18
  87. package/src/widgets/StackedBarChart/StackedBarChart.tsx +0 -181
  88. package/src/widgets/StackedBarChart/index.ts +0 -2
  89. package/src/widgets/StackedBarChart/types.ts +0 -29
  90. package/src/widgets/SunburstChart/SunburstChart.tsx +0 -176
  91. package/src/widgets/SunburstChart/index.ts +0 -2
  92. package/src/widgets/SunburstChart/types.ts +0 -22
  93. package/src/widgets/Treemap/Treemap.tsx +0 -191
  94. package/src/widgets/Treemap/index.ts +0 -2
  95. package/src/widgets/Treemap/types.ts +0 -23
  96. package/src/widgets/WaterfallChart/WaterfallChart.tsx +0 -226
  97. package/src/widgets/WaterfallChart/index.ts +0 -2
  98. package/src/widgets/WaterfallChart/types.ts +0 -26
  99. package/src/widgets/index.ts +0 -40
  100. package/src/widgets/package.json +0 -18
@@ -1,249 +0,0 @@
1
- /**
2
- * BarChart Widget - Flexible bar chart for comparing values
3
- */
4
- import React, { memo, useMemo } from 'react';
5
- import { View, Text as RNText, StyleSheet } from 'react-native';
6
- import Svg, { Rect } from 'react-native-svg';
7
- import {
8
- useWidgetDimensions,
9
- useWidgetTheme,
10
- normalize,
11
- } from '../../core';
12
- import { Text } from '../../renderer-svg/primitives';
13
- import { BarChartWidgetProps } from './types';
14
-
15
- /**
16
- * BarChart Widget Component
17
- */
18
- export const BarChart = memo<BarChartWidgetProps>(({
19
- data: widgetData,
20
- width,
21
- height,
22
- loading = false,
23
- theme: themeOverride,
24
- orientation = 'vertical',
25
- barWidth: customBarWidth,
26
- barSpacing = 8,
27
- showValues = true,
28
- showLabels = true,
29
- minBarHeight = 4,
30
- maxBars = 20,
31
- testID,
32
- }) => {
33
- const theme = useWidgetTheme(themeOverride);
34
- const dimensions = useWidgetDimensions(width, height, 300, 200);
35
-
36
- // Handle states
37
- if (loading) {
38
- return (
39
- <View
40
- style={[
41
- styles.container,
42
- {
43
- width: dimensions.width,
44
- height: dimensions.height,
45
- backgroundColor: theme.colors.surface,
46
- borderRadius: theme.radius.md,
47
- },
48
- ]}
49
- testID={`${testID}-loading`}
50
- >
51
- <RNText style={[styles.loadingText, { color: theme.colors.textSecondary }]}>
52
- Loading...
53
- </RNText>
54
- </View>
55
- );
56
- }
57
-
58
- if (!widgetData || !widgetData.data || widgetData.data.length === 0) {
59
- return (
60
- <View
61
- style={[
62
- styles.container,
63
- {
64
- width: dimensions.width,
65
- height: dimensions.height,
66
- backgroundColor: theme.colors.surface,
67
- borderRadius: theme.radius.md,
68
- },
69
- ]}
70
- testID={`${testID}-empty`}
71
- >
72
- <RNText style={[styles.emptyText, { color: theme.colors.textSecondary }]}>
73
- No data
74
- </RNText>
75
- </View>
76
- );
77
- }
78
-
79
- const { data, title } = widgetData;
80
-
81
- // Limit number of bars
82
- const displayData = data.slice(0, maxBars);
83
-
84
- // Calculate dimensions
85
- const padding = theme.spacing.md;
86
- const titleHeight = title ? theme.fontScale.md + theme.spacing.sm : 0;
87
- const labelHeight = showLabels ? theme.fontScale.sm + theme.spacing.xs : 0;
88
- const valueHeight = showValues ? theme.fontScale.sm + theme.spacing.xs : 0;
89
-
90
- const chartHeight = dimensions.height - padding * 2 - titleHeight - labelHeight - valueHeight;
91
- const chartWidth = dimensions.width - padding * 2;
92
-
93
- // Find max value for scaling
94
- const maxValue = useMemo(() => Math.max(...displayData.map(d => d.value)), [displayData]);
95
-
96
- // Calculate bar width
97
- const calculatedBarWidth = customBarWidth ||
98
- (chartWidth - (displayData.length - 1) * barSpacing) / displayData.length;
99
-
100
- // Generate bars
101
- const bars = useMemo(() => {
102
- return displayData.map((item, index) => {
103
- const normalizedValue = normalize(item.value, 0, maxValue);
104
- const barHeight = Math.max(normalizedValue * chartHeight, minBarHeight);
105
- const barX = index * (calculatedBarWidth + barSpacing);
106
- const barY = chartHeight - barHeight;
107
-
108
- return {
109
- x: barX,
110
- y: barY,
111
- width: calculatedBarWidth,
112
- height: barHeight,
113
- color: item.color || theme.colors.chartPrimary,
114
- value: item.value,
115
- label: item.label,
116
- };
117
- });
118
- }, [displayData, maxValue, chartHeight, calculatedBarWidth, barSpacing, minBarHeight, theme.colors.chartPrimary]);
119
-
120
- return (
121
- <View
122
- style={[
123
- styles.wrapper,
124
- {
125
- width: dimensions.width,
126
- height: dimensions.height,
127
- backgroundColor: theme.colors.surface,
128
- borderRadius: theme.radius.md,
129
- padding,
130
- },
131
- ]}
132
- testID={testID}
133
- >
134
- {/* Title */}
135
- {title && (
136
- <RNText
137
- style={[
138
- styles.title,
139
- {
140
- color: theme.colors.text,
141
- fontSize: theme.fontScale.md,
142
- marginBottom: theme.spacing.sm,
143
- },
144
- ]}
145
- >
146
- {title}
147
- </RNText>
148
- )}
149
-
150
- {/* Chart */}
151
- <View style={styles.chartContainer}>
152
- <Svg width={chartWidth} height={chartHeight + valueHeight}>
153
- {/* Bars */}
154
- {bars.map((bar, index) => (
155
- <Rect
156
- key={`bar-${index}`}
157
- x={bar.x}
158
- y={bar.y}
159
- width={bar.width}
160
- height={bar.height}
161
- fill={bar.color}
162
- rx={theme.radius.sm}
163
- ry={theme.radius.sm}
164
- />
165
- ))}
166
-
167
- {/* Values */}
168
- {showValues && bars.map((bar, index) => (
169
- <Text
170
- key={`value-${index}`}
171
- x={bar.x + bar.width / 2}
172
- y={bar.y - 4}
173
- text={bar.value.toString()}
174
- fontSize={theme.fontScale.xs}
175
- fill={theme.colors.textSecondary}
176
- textAnchor="middle"
177
- />
178
- ))}
179
- </Svg>
180
-
181
- {/* Labels */}
182
- {showLabels && (
183
- <View style={styles.labelsContainer}>
184
- {bars.map((bar, index) => (
185
- <View
186
- key={`label-${index}`}
187
- style={[
188
- styles.labelItem,
189
- { width: bar.width + barSpacing },
190
- ]}
191
- >
192
- <RNText
193
- style={[
194
- styles.labelText,
195
- {
196
- color: theme.colors.textSecondary,
197
- fontSize: theme.fontScale.xs,
198
- },
199
- ]}
200
- numberOfLines={1}
201
- >
202
- {bar.label}
203
- </RNText>
204
- </View>
205
- ))}
206
- </View>
207
- )}
208
- </View>
209
- </View>
210
- );
211
- });
212
-
213
- BarChart.displayName = 'BarChart';
214
-
215
- const styles = StyleSheet.create({
216
- wrapper: {
217
- justifyContent: 'flex-start',
218
- alignItems: 'flex-start',
219
- },
220
- container: {
221
- justifyContent: 'center',
222
- alignItems: 'center',
223
- },
224
- loadingText: {
225
- fontSize: 16,
226
- },
227
- emptyText: {
228
- fontSize: 16,
229
- },
230
- title: {
231
- fontWeight: 'bold',
232
- textAlign: 'center',
233
- width: '100%',
234
- },
235
- chartContainer: {
236
- flex: 1,
237
- width: '100%',
238
- },
239
- labelsContainer: {
240
- flexDirection: 'row',
241
- marginTop: 4,
242
- },
243
- labelItem: {
244
- alignItems: 'center',
245
- },
246
- labelText: {
247
- textAlign: 'center',
248
- },
249
- });
@@ -1,10 +0,0 @@
1
- /**
2
- * BarChart Widget exports
3
- */
4
- export { BarChart } from './BarChart';
5
- export type {
6
- BarChartWidgetProps,
7
- BarChartData,
8
- BarDataPoint,
9
- BarOrientation
10
- } from './types';
@@ -1,27 +0,0 @@
1
- /**
2
- * BarChart Widget types
3
- */
4
- import { BaseWidgetProps } from '../../core/types';
5
-
6
- export interface BarDataPoint {
7
- value: number;
8
- label: string;
9
- color?: string;
10
- }
11
-
12
- export interface BarChartData {
13
- data: BarDataPoint[];
14
- title?: string;
15
- }
16
-
17
- export type BarOrientation = 'vertical' | 'horizontal';
18
-
19
- export interface BarChartWidgetProps extends BaseWidgetProps<BarChartData> {
20
- orientation?: BarOrientation;
21
- barWidth?: number;
22
- barSpacing?: number;
23
- showValues?: boolean;
24
- showLabels?: boolean;
25
- minBarHeight?: number;
26
- maxBars?: number;
27
- }
@@ -1,252 +0,0 @@
1
- /**
2
- * BoxPlot Widget - Shows statistical distribution with quartiles
3
- */
4
- import React, { memo, useMemo } from 'react';
5
- import { View, Text as RNText, StyleSheet } from 'react-native';
6
- import Svg, { Rect, Line as SvgLine, Circle } from 'react-native-svg';
7
- import { useWidgetDimensions, useWidgetTheme, normalize } from '../../core';
8
- import { BoxPlotWidgetProps } from './types';
9
-
10
- export const BoxPlot = memo<BoxPlotWidgetProps>(({
11
- data: widgetData,
12
- width,
13
- height,
14
- loading = false,
15
- theme: themeOverride,
16
- showLabels = true,
17
- showOutliers = true,
18
- boxWidth = 50,
19
- boxSpacing = 30,
20
- color,
21
- testID,
22
- }) => {
23
- const theme = useWidgetTheme(themeOverride);
24
- const dimensions = useWidgetDimensions(width, height, 350, 300);
25
-
26
- if (loading) {
27
- return (
28
- <View style={[styles.container, { width: dimensions.width, height: dimensions.height, backgroundColor: theme.colors.surface, borderRadius: theme.radius.md }]} testID={`${testID}-loading`}>
29
- <RNText style={[styles.loadingText, { color: theme.colors.textSecondary }]}>Loading...</RNText>
30
- </View>
31
- );
32
- }
33
-
34
- if (!widgetData || !widgetData.data || widgetData.data.length === 0) {
35
- return (
36
- <View style={[styles.container, { width: dimensions.width, height: dimensions.height, backgroundColor: theme.colors.surface, borderRadius: theme.radius.md }]} testID={`${testID}-empty`}>
37
- <RNText style={[styles.emptyText, { color: theme.colors.textSecondary }]}>No data</RNText>
38
- </View>
39
- );
40
- }
41
-
42
- const { data, title } = widgetData;
43
- const padding = theme.spacing.md;
44
- const titleHeight = title ? theme.fontScale.md + theme.spacing.sm : 0;
45
- const labelHeight = showLabels ? 30 : 0;
46
- const yAxisWidth = 40;
47
-
48
- const chartHeight = dimensions.height - padding * 2 - titleHeight - labelHeight;
49
- const chartWidth = dimensions.width - padding * 2 - yAxisWidth;
50
-
51
- const boxColor = color || theme.colors.chartPrimary;
52
-
53
- // Find global min/max for Y-axis
54
- const { globalMin, globalMax } = useMemo(() => {
55
- let min = Infinity;
56
- let max = -Infinity;
57
-
58
- data.forEach(point => {
59
- if (point.min < min) min = point.min;
60
- if (point.max > max) max = point.max;
61
- if (point.outliers) {
62
- point.outliers.forEach(val => {
63
- if (val < min) min = val;
64
- if (val > max) max = val;
65
- });
66
- }
67
- });
68
-
69
- return { globalMin: min, globalMax: max };
70
- }, [data]);
71
-
72
- const yAxisLabels = useMemo(() => {
73
- const range = globalMax - globalMin;
74
- const step = range / 4;
75
- return Array.from({ length: 5 }, (_, i) => ({
76
- value: globalMin + i * step,
77
- y: chartHeight - (i * chartHeight) / 4,
78
- }));
79
- }, [globalMin, globalMax, chartHeight]);
80
-
81
- const boxes = useMemo(() => {
82
- return data.map((point, index) => {
83
- const centerX = index * (boxWidth + boxSpacing) + boxWidth / 2;
84
-
85
- // Normalize values to chart height
86
- const minY = chartHeight - normalize(point.min, globalMin, globalMax) * chartHeight;
87
- const maxY = chartHeight - normalize(point.max, globalMin, globalMax) * chartHeight;
88
- const q1Y = chartHeight - normalize(point.q1, globalMin, globalMax) * chartHeight;
89
- const q3Y = chartHeight - normalize(point.q3, globalMin, globalMax) * chartHeight;
90
- const medianY = chartHeight - normalize(point.median, globalMin, globalMax) * chartHeight;
91
-
92
- const outlierPoints = point.outliers?.map(val => ({
93
- x: centerX,
94
- y: chartHeight - normalize(val, globalMin, globalMax) * chartHeight,
95
- })) || [];
96
-
97
- return {
98
- label: point.label,
99
- centerX,
100
- boxX: centerX - boxWidth / 2,
101
- boxWidth,
102
- // Whiskers
103
- minY,
104
- maxY,
105
- // Box (IQR)
106
- q1Y,
107
- q3Y,
108
- boxHeight: Math.abs(q3Y - q1Y),
109
- boxY: Math.min(q1Y, q3Y),
110
- // Median line
111
- medianY,
112
- // Outliers
113
- outliers: outlierPoints,
114
- };
115
- });
116
- }, [data, chartHeight, globalMin, globalMax, boxWidth, boxSpacing]);
117
-
118
- return (
119
- <View style={[styles.wrapper, { width: dimensions.width, height: dimensions.height, backgroundColor: theme.colors.surface, borderRadius: theme.radius.md, padding }]} testID={testID}>
120
- {title && (
121
- <RNText style={[styles.title, { color: theme.colors.text, fontSize: theme.fontScale.md, fontWeight: 'bold', marginBottom: theme.spacing.sm }]}>
122
- {title}
123
- </RNText>
124
- )}
125
-
126
- <View style={styles.chartRow}>
127
- {/* Y-Axis */}
128
- <View style={[styles.yAxis, { width: yAxisWidth }]}>
129
- {yAxisLabels.map((label, index) => (
130
- <RNText key={`y-${index}`} style={[styles.yAxisLabel, { color: theme.colors.textSecondary, fontSize: theme.fontScale.xs, top: label.y - 6 }]}>
131
- {label.value.toFixed(0)}
132
- </RNText>
133
- ))}
134
- </View>
135
-
136
- <View>
137
- <Svg width={chartWidth} height={chartHeight}>
138
- {boxes.map((box, index) => (
139
- <React.Fragment key={`box-${index}`}>
140
- {/* Whisker lines (min to Q1, Q3 to max) */}
141
- <SvgLine
142
- x1={box.centerX}
143
- y1={box.minY}
144
- x2={box.centerX}
145
- y2={box.q1Y}
146
- stroke={boxColor}
147
- strokeWidth={1}
148
- />
149
- <SvgLine
150
- x1={box.centerX}
151
- y1={box.q3Y}
152
- x2={box.centerX}
153
- y2={box.maxY}
154
- stroke={boxColor}
155
- strokeWidth={1}
156
- />
157
-
158
- {/* Min/Max caps */}
159
- <SvgLine
160
- x1={box.centerX - boxWidth / 4}
161
- y1={box.minY}
162
- x2={box.centerX + boxWidth / 4}
163
- y2={box.minY}
164
- stroke={boxColor}
165
- strokeWidth={2}
166
- />
167
- <SvgLine
168
- x1={box.centerX - boxWidth / 4}
169
- y1={box.maxY}
170
- x2={box.centerX + boxWidth / 4}
171
- y2={box.maxY}
172
- stroke={boxColor}
173
- strokeWidth={2}
174
- />
175
-
176
- {/* IQR Box (Q1 to Q3) */}
177
- <Rect
178
- x={box.boxX}
179
- y={box.boxY}
180
- width={box.boxWidth}
181
- height={box.boxHeight}
182
- fill={boxColor}
183
- fillOpacity={0.3}
184
- stroke={boxColor}
185
- strokeWidth={2}
186
- rx={theme.radius.sm}
187
- ry={theme.radius.sm}
188
- />
189
-
190
- {/* Median line */}
191
- <SvgLine
192
- x1={box.boxX}
193
- y1={box.medianY}
194
- x2={box.boxX + box.boxWidth}
195
- y2={box.medianY}
196
- stroke={boxColor}
197
- strokeWidth={3}
198
- />
199
-
200
- {/* Outliers */}
201
- {showOutliers && box.outliers.map((outlier, oIndex) => (
202
- <Circle
203
- key={`outlier-${index}-${oIndex}`}
204
- cx={outlier.x}
205
- cy={outlier.y}
206
- r={3}
207
- fill={theme.colors.chartNegative}
208
- opacity={0.8}
209
- />
210
- ))}
211
- </React.Fragment>
212
- ))}
213
- </Svg>
214
-
215
- {showLabels && (
216
- <View style={styles.labelsContainer}>
217
- {boxes.map((box, index) => (
218
- <View
219
- key={`label-${index}`}
220
- style={[styles.labelItem, { left: box.boxX, width: box.boxWidth }]}
221
- >
222
- <RNText
223
- style={[styles.labelText, { color: theme.colors.textSecondary, fontSize: theme.fontScale.xs }]}
224
- numberOfLines={1}
225
- >
226
- {box.label}
227
- </RNText>
228
- </View>
229
- ))}
230
- </View>
231
- )}
232
- </View>
233
- </View>
234
- </View>
235
- );
236
- });
237
-
238
- BoxPlot.displayName = 'BoxPlot';
239
-
240
- const styles = StyleSheet.create({
241
- wrapper: { justifyContent: 'flex-start', alignItems: 'flex-start' },
242
- container: { justifyContent: 'center', alignItems: 'center' },
243
- loadingText: { fontSize: 16 },
244
- emptyText: { fontSize: 16 },
245
- title: { textAlign: 'center', width: '100%' },
246
- chartRow: { flexDirection: 'row', alignItems: 'flex-start' },
247
- yAxis: { position: 'relative', marginRight: 8 },
248
- yAxisLabel: { position: 'absolute', right: 0, textAlign: 'right' },
249
- labelsContainer: { position: 'relative', height: 30, marginTop: 4 },
250
- labelItem: { position: 'absolute', alignItems: 'center' },
251
- labelText: { textAlign: 'center' },
252
- });
@@ -1,2 +0,0 @@
1
- export { BoxPlot } from './BoxPlot';
2
- export type { BoxPlotWidgetProps, BoxPlotData, BoxPlotDataPoint } from './types';
@@ -1,27 +0,0 @@
1
- /**
2
- * BoxPlot Widget types - Statistical distribution (quartiles, outliers)
3
- */
4
- import { BaseWidgetProps } from '../../core';
5
-
6
- export interface BoxPlotDataPoint {
7
- label: string;
8
- min: number;
9
- q1: number;
10
- median: number;
11
- q3: number;
12
- max: number;
13
- outliers?: number[];
14
- }
15
-
16
- export interface BoxPlotData {
17
- data: BoxPlotDataPoint[];
18
- title?: string;
19
- }
20
-
21
- export interface BoxPlotWidgetProps extends BaseWidgetProps<BoxPlotData> {
22
- showLabels?: boolean;
23
- showOutliers?: boolean;
24
- boxWidth?: number;
25
- boxSpacing?: number;
26
- color?: string;
27
- }