@impulse-ui-native/charts 2.1.0 → 2.1.1
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/dist/components/index.d.mts +17 -0
- package/dist/components/index.js +8 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/line-chart-body.d.mts +14 -0
- package/dist/components/line-chart-body.js +90 -0
- package/dist/components/line-chart-body.js.map +1 -0
- package/dist/components/line-chart.d.mts +10 -0
- package/dist/components/line-chart.js +21 -0
- package/dist/components/line-chart.js.map +1 -0
- package/dist/components/multi-line-chart-body.d.mts +11 -0
- package/dist/components/multi-line-chart-body.js +98 -0
- package/dist/components/multi-line-chart-body.js.map +1 -0
- package/dist/components/multi-line-chart.d.mts +11 -0
- package/dist/components/multi-line-chart.js +21 -0
- package/dist/components/multi-line-chart.js.map +1 -0
- package/dist/components/primitives/grid.d.mts +10 -0
- package/dist/components/primitives/grid.js +65 -0
- package/dist/components/primitives/grid.js.map +1 -0
- package/dist/components/primitives/index.d.mts +14 -0
- package/dist/components/primitives/index.js +13 -0
- package/dist/components/primitives/index.js.map +1 -0
- package/dist/components/primitives/label.d.mts +10 -0
- package/dist/components/primitives/label.js +94 -0
- package/dist/components/primitives/label.js.map +1 -0
- package/dist/components/primitives/line.d.mts +11 -0
- package/dist/components/primitives/line.js +50 -0
- package/dist/components/primitives/line.js.map +1 -0
- package/dist/components/primitives/x-axis.d.mts +11 -0
- package/dist/components/primitives/x-axis.js +93 -0
- package/dist/components/primitives/x-axis.js.map +1 -0
- package/dist/components/primitives/y-axis.d.mts +11 -0
- package/dist/components/primitives/y-axis.js +95 -0
- package/dist/components/primitives/y-axis.js.map +1 -0
- package/dist/constants/axis.constants.d.mts +6 -0
- package/dist/constants/axis.constants.js +11 -0
- package/dist/constants/axis.constants.js.map +1 -0
- package/dist/constants/grid.constants.d.mts +6 -0
- package/dist/constants/grid.constants.js +11 -0
- package/dist/constants/grid.constants.js.map +1 -0
- package/dist/constants/index.d.mts +11 -0
- package/dist/constants/index.js +6 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/constants/label.constants.d.mts +11 -0
- package/dist/constants/label.constants.js +12 -0
- package/dist/constants/label.constants.js.map +1 -0
- package/dist/constants/line-chart.constants.d.mts +8 -0
- package/dist/constants/line-chart.constants.js +7 -0
- package/dist/constants/line-chart.constants.js.map +1 -0
- package/dist/constants/line.constants.d.mts +15 -0
- package/dist/constants/line.constants.js +18 -0
- package/dist/constants/line.constants.js.map +1 -0
- package/dist/contexts/index.d.mts +2 -0
- package/dist/contexts/index.js +1 -0
- package/dist/contexts/index.js.map +1 -0
- package/dist/hooks/index.d.mts +12 -0
- package/dist/hooks/index.js +9 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/use-chart-canvas.hook.d.mts +9 -0
- package/dist/hooks/use-chart-canvas.hook.js +10 -0
- package/dist/hooks/use-chart-canvas.hook.js.map +1 -0
- package/dist/hooks/use-line-chart.hook.d.mts +10 -0
- package/dist/hooks/use-line-chart.hook.js +13 -0
- package/dist/hooks/use-line-chart.hook.js.map +1 -0
- package/dist/hooks/use-multi-line-chart.hook.d.mts +12 -0
- package/dist/hooks/use-multi-line-chart.hook.js +44 -0
- package/dist/hooks/use-multi-line-chart.hook.js.map +1 -0
- package/dist/index.d.mts +36 -321
- package/dist/index.js +6 -1083
- package/dist/index.js.map +1 -1
- package/dist/line-chart.types-yxru5uWc.d.mts +62 -0
- package/dist/types/axis.types.d.mts +49 -0
- package/dist/types/axis.types.js +1 -0
- package/dist/types/axis.types.js.map +1 -0
- package/dist/types/common.types.d.mts +57 -0
- package/dist/types/common.types.js +1 -0
- package/dist/types/common.types.js.map +1 -0
- package/dist/types/grid.types.d.mts +5 -0
- package/dist/types/grid.types.js +1 -0
- package/dist/types/grid.types.js.map +1 -0
- package/dist/types/index.d.mts +11 -0
- package/dist/types/index.js +11 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/label.types.d.mts +24 -0
- package/dist/types/label.types.js +1 -0
- package/dist/types/label.types.js.map +1 -0
- package/dist/types/line-chart.types.d.mts +5 -0
- package/dist/types/line-chart.types.js +1 -0
- package/dist/types/line-chart.types.js.map +1 -0
- package/dist/types/line.types.d.mts +11 -0
- package/dist/types/line.types.js +1 -0
- package/dist/types/line.types.js.map +1 -0
- package/dist/types/multi-line-chart.types.d.mts +23 -0
- package/dist/types/multi-line-chart.types.js +1 -0
- package/dist/types/multi-line-chart.types.js.map +1 -0
- package/dist/types/style.types.d.mts +19 -0
- package/dist/types/style.types.js +1 -0
- package/dist/types/style.types.js.map +1 -0
- package/dist/types/use-line-chart.types.d.mts +29 -0
- package/dist/types/use-line-chart.types.js +1 -0
- package/dist/types/use-line-chart.types.js.map +1 -0
- package/dist/types/use-multi-line-chart.types.d.mts +16 -0
- package/dist/types/use-multi-line-chart.types.js +1 -0
- package/dist/types/use-multi-line-chart.types.js.map +1 -0
- package/dist/utils/axis.util.d.mts +15 -0
- package/dist/utils/axis.util.js +82 -0
- package/dist/utils/axis.util.js.map +1 -0
- package/dist/utils/chart-layout.util.d.mts +8 -0
- package/dist/utils/chart-layout.util.js +55 -0
- package/dist/utils/chart-layout.util.js.map +1 -0
- package/dist/utils/grid.util.d.mts +11 -0
- package/dist/utils/grid.util.js +56 -0
- package/dist/utils/grid.util.js.map +1 -0
- package/dist/utils/index.d.mts +17 -0
- package/dist/utils/index.js +44 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/label.util.d.mts +10 -0
- package/dist/utils/label.util.js +24 -0
- package/dist/utils/label.util.js.map +1 -0
- package/dist/utils/line-chart.util.d.mts +11 -0
- package/dist/utils/line-chart.util.js +133 -0
- package/dist/utils/line-chart.util.js.map +1 -0
- package/dist/utils/line.util.d.mts +10 -0
- package/dist/utils/line.util.js +36 -0
- package/dist/utils/line.util.js.map +1 -0
- package/dist/utils/multi-line-chart.util.d.mts +10 -0
- package/dist/utils/multi-line-chart.util.js +23 -0
- package/dist/utils/multi-line-chart.util.js.map +1 -0
- package/dist/utils/paragraph-builder.util.d.mts +10 -0
- package/dist/utils/paragraph-builder.util.js +16 -0
- package/dist/utils/paragraph-builder.util.js.map +1 -0
- package/package.json +7 -6
package/dist/index.d.mts
CHANGED
|
@@ -1,321 +1,36 @@
|
|
|
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
|
-
x: number;
|
|
38
|
-
y: number;
|
|
39
|
-
}
|
|
40
|
-
interface ChartRect extends ChartSize {
|
|
41
|
-
x: number;
|
|
42
|
-
y: number;
|
|
43
|
-
}
|
|
44
|
-
interface ChartLayout {
|
|
45
|
-
size: ChartSize;
|
|
46
|
-
insets: ChartInsets;
|
|
47
|
-
plot: ChartRect;
|
|
48
|
-
xAxis: ChartRect;
|
|
49
|
-
yAxis: ChartRect;
|
|
50
|
-
}
|
|
51
|
-
interface ChartAxisOptions<Value> {
|
|
52
|
-
visible?: boolean;
|
|
53
|
-
tickCount?: number;
|
|
54
|
-
format?: (value: Value) => string;
|
|
55
|
-
line?: ChartAxisLineOptions;
|
|
56
|
-
tick?: ChartAxisTickOptions;
|
|
57
|
-
label?: ChartAxisLabelOptions;
|
|
58
|
-
}
|
|
59
|
-
interface ChartAxisLineOptions extends ChartStrokeStyle {
|
|
60
|
-
visible?: boolean;
|
|
61
|
-
}
|
|
62
|
-
interface ChartAxisTickOptions extends ChartStrokeStyle {
|
|
63
|
-
visible?: boolean;
|
|
64
|
-
length?: number;
|
|
65
|
-
}
|
|
66
|
-
interface ChartAxisLabelOptions extends ChartLabelStyle {
|
|
67
|
-
visible?: boolean;
|
|
68
|
-
gap?: number;
|
|
69
|
-
rotation?: number;
|
|
70
|
-
}
|
|
71
|
-
interface ChartXAxisOptions<X> extends ChartAxisOptions<X> {
|
|
72
|
-
}
|
|
73
|
-
interface ChartYAxisOptions extends ChartAxisOptions<number> {
|
|
74
|
-
domain?: ChartNumericDomain;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
interface ChartGridLineOptions extends ChartStrokeStyle {
|
|
78
|
-
visible?: boolean;
|
|
79
|
-
}
|
|
80
|
-
interface ChartGridOptions {
|
|
81
|
-
x?: boolean | ChartGridLineOptions;
|
|
82
|
-
y?: boolean | ChartGridLineOptions;
|
|
83
|
-
}
|
|
84
|
-
interface ResolvedGridLineOptions {
|
|
85
|
-
visible: boolean;
|
|
86
|
-
color: string;
|
|
87
|
-
width: number;
|
|
88
|
-
opacity: number;
|
|
89
|
-
dash?: readonly number[];
|
|
90
|
-
}
|
|
91
|
-
interface GridProps<X extends ChartXValue = number> {
|
|
92
|
-
options?: ChartGridOptions;
|
|
93
|
-
plot: ChartRect;
|
|
94
|
-
theme: AppTheme;
|
|
95
|
-
xTicks: readonly X[];
|
|
96
|
-
xScale: LineChartScale<X>;
|
|
97
|
-
yTicks: readonly number[];
|
|
98
|
-
yScale: LineChartScale<number>;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
type ChartXValue = number | string | Date;
|
|
102
|
-
type LineChartCurve = "linear" | "monotone";
|
|
103
|
-
type LineChartScale<Value> = (value: Value) => number | undefined;
|
|
104
|
-
interface LineChartPoint<X extends ChartXValue = number> {
|
|
105
|
-
x: X;
|
|
106
|
-
y: number | null;
|
|
107
|
-
}
|
|
108
|
-
interface LineChartCoordinate<X extends ChartXValue = number> {
|
|
109
|
-
datum: LineChartPoint<X>;
|
|
110
|
-
index: number;
|
|
111
|
-
x: number | null;
|
|
112
|
-
y: number | null;
|
|
113
|
-
}
|
|
114
|
-
interface LineChartLineOptions extends ChartStrokeStyle {
|
|
115
|
-
visible?: boolean;
|
|
116
|
-
curve?: LineChartCurve;
|
|
117
|
-
cap?: ChartStrokeCap;
|
|
118
|
-
join?: ChartStrokeJoin;
|
|
119
|
-
}
|
|
120
|
-
interface LineChartCommonProps<X extends ChartXValue = number> {
|
|
121
|
-
fontManager?: SkTypefaceFontProvider;
|
|
122
|
-
grid?: ChartGridOptions;
|
|
123
|
-
xScaleType?: ChartScaleType;
|
|
124
|
-
xAxis?: ChartXAxisOptions<X>;
|
|
125
|
-
yAxis?: ChartYAxisOptions;
|
|
126
|
-
insets?: Partial<ChartInsets>;
|
|
127
|
-
}
|
|
128
|
-
interface LineChartProps<X extends ChartXValue = number> extends LineChartCommonProps<X> {
|
|
129
|
-
data: readonly LineChartPoint<X>[];
|
|
130
|
-
line?: LineChartLineOptions;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
interface AxisTick<Value> {
|
|
134
|
-
value: Value;
|
|
135
|
-
position: number;
|
|
136
|
-
}
|
|
137
|
-
interface AxisLineLayout {
|
|
138
|
-
start: ChartPoint;
|
|
139
|
-
end: ChartPoint;
|
|
140
|
-
}
|
|
141
|
-
interface AxisTickLayout<Value> extends AxisTick<Value>, AxisLineLayout {
|
|
142
|
-
labelRect: ChartRect;
|
|
143
|
-
}
|
|
144
|
-
interface AxisLayout<Value> {
|
|
145
|
-
line: AxisLineLayout;
|
|
146
|
-
ticks: readonly AxisTickLayout<Value>[];
|
|
147
|
-
}
|
|
148
|
-
interface CreateAxisLayoutProps<Value> {
|
|
149
|
-
values: readonly Value[];
|
|
150
|
-
scale: LineChartScale<Value>;
|
|
151
|
-
plot: ChartRect;
|
|
152
|
-
region: ChartRect;
|
|
153
|
-
tickLength: number;
|
|
154
|
-
labelGap: number;
|
|
155
|
-
}
|
|
156
|
-
interface CreateYAxisLayoutProps extends CreateAxisLayoutProps<number> {
|
|
157
|
-
fontSize: number;
|
|
158
|
-
}
|
|
159
|
-
interface AxisProps<Value> {
|
|
160
|
-
ticks: readonly Value[];
|
|
161
|
-
scale: LineChartScale<Value>;
|
|
162
|
-
plot: ChartRect;
|
|
163
|
-
region: ChartRect;
|
|
164
|
-
theme: AppTheme;
|
|
165
|
-
options?: ChartAxisOptions<Value>;
|
|
166
|
-
fontManager?: SkTypefaceFontProvider;
|
|
167
|
-
lineVisible?: boolean;
|
|
168
|
-
tickVisible?: boolean;
|
|
169
|
-
}
|
|
170
|
-
interface XAxisProps<X extends ChartXValue = number> extends AxisProps<X> {
|
|
171
|
-
}
|
|
172
|
-
interface YAxisProps extends AxisProps<number> {
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
type LabelHorizontalAlignment = "left" | "center" | "right";
|
|
176
|
-
type LabelVerticalAlignment = "top" | "center" | "bottom";
|
|
177
|
-
interface LabelProps {
|
|
178
|
-
text: string;
|
|
179
|
-
rect: ChartRect;
|
|
180
|
-
theme: AppTheme;
|
|
181
|
-
horizontalAlign?: LabelHorizontalAlignment;
|
|
182
|
-
verticalAlign?: LabelVerticalAlignment;
|
|
183
|
-
color?: string;
|
|
184
|
-
fontSize?: number;
|
|
185
|
-
fontFamily?: string;
|
|
186
|
-
fontWeight?: FontWeight;
|
|
187
|
-
fontManager?: SkTypefaceFontProvider;
|
|
188
|
-
maxLines?: number;
|
|
189
|
-
rotation?: number;
|
|
190
|
-
tnum?: boolean;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
interface LineProps<X extends ChartXValue = number> extends LineChartLineOptions {
|
|
194
|
-
coordinates: readonly LineChartCoordinate<X>[];
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
interface MultiLineChartSeries<X extends ChartXValue = number> {
|
|
198
|
-
id: string;
|
|
199
|
-
data: readonly LineChartPoint<X>[];
|
|
200
|
-
line?: LineChartLineOptions;
|
|
201
|
-
}
|
|
202
|
-
interface MultiLineChartSeriesModel<X extends ChartXValue = number> extends MultiLineChartSeries<X> {
|
|
203
|
-
coordinates: readonly LineChartCoordinate<X>[];
|
|
204
|
-
}
|
|
205
|
-
interface MultiLineChartProps<X extends ChartXValue = number> extends LineChartCommonProps<X> {
|
|
206
|
-
series: readonly MultiLineChartSeries<X>[];
|
|
207
|
-
}
|
|
208
|
-
interface MultiLineChartBodyProps<X extends ChartXValue = number> extends MultiLineChartProps<X> {
|
|
209
|
-
size: ChartSize;
|
|
210
|
-
theme: AppTheme;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
interface UseLineChartProps<X extends ChartXValue = number> {
|
|
214
|
-
data: readonly LineChartPoint<X>[];
|
|
215
|
-
plot: ChartRect;
|
|
216
|
-
xScaleType?: ChartScaleType;
|
|
217
|
-
xAxis?: ChartXAxisOptions<X>;
|
|
218
|
-
yAxis?: ChartYAxisOptions;
|
|
219
|
-
}
|
|
220
|
-
interface UseLineChartResult<X extends ChartXValue = number> {
|
|
221
|
-
xDomain: readonly X[];
|
|
222
|
-
yDomain: ChartNumericDomain;
|
|
223
|
-
xTicks: readonly X[];
|
|
224
|
-
yTicks: readonly number[];
|
|
225
|
-
coordinates: readonly LineChartCoordinate<X>[];
|
|
226
|
-
xScale: LineChartScale<X>;
|
|
227
|
-
yScale: LineChartScale<number>;
|
|
228
|
-
}
|
|
229
|
-
interface LineChartXScaleModel<X extends ChartXValue> {
|
|
230
|
-
domain: readonly X[];
|
|
231
|
-
ticks: readonly X[];
|
|
232
|
-
scale: LineChartScale<X>;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
interface UseMultiLineChartProps<X extends ChartXValue = number> extends Pick<MultiLineChartProps<X>, "series" | "xAxis" | "xScaleType" | "yAxis"> {
|
|
236
|
-
plot: ChartRect;
|
|
237
|
-
}
|
|
238
|
-
interface UseMultiLineChartResult<X extends ChartXValue = number> extends Omit<UseLineChartResult<X>, "coordinates"> {
|
|
239
|
-
series: readonly MultiLineChartSeriesModel<X>[];
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
declare const Grid: <X extends ChartXValue = number>(props: GridProps<X>) => react_jsx_runtime.JSX.Element;
|
|
243
|
-
|
|
244
|
-
declare const Label: (props: LabelProps) => react_jsx_runtime.JSX.Element | null;
|
|
245
|
-
|
|
246
|
-
declare const Line: <X extends ChartXValue = number>(props: LineProps<X>) => react_jsx_runtime.JSX.Element | null;
|
|
247
|
-
|
|
248
|
-
declare const XAxis: <X extends ChartXValue = number>(props: XAxisProps<X>) => react_jsx_runtime.JSX.Element;
|
|
249
|
-
|
|
250
|
-
declare const YAxis: (props: YAxisProps) => react_jsx_runtime.JSX.Element;
|
|
251
|
-
|
|
252
|
-
declare const LineChart: <X extends ChartXValue = number>(props: LineChartProps<X>) => react_jsx_runtime.JSX.Element;
|
|
253
|
-
|
|
254
|
-
declare const MultiLineChart: <X extends ChartXValue = number>(props: MultiLineChartProps<X>) => react_jsx_runtime.JSX.Element;
|
|
255
|
-
|
|
256
|
-
declare const AxisDefaultWidth = 1;
|
|
257
|
-
declare const AxisDefaultOpacity = 1;
|
|
258
|
-
declare const AxisDefaultTickLength = 4;
|
|
259
|
-
declare const AxisDefaultLabelGap = 4;
|
|
260
|
-
|
|
261
|
-
declare const GridDefaultWidth = 1;
|
|
262
|
-
declare const GridDefaultOpacity = 1;
|
|
263
|
-
declare const GridDefaultXVisible = true;
|
|
264
|
-
declare const GridDefaultYVisible = true;
|
|
265
|
-
|
|
266
|
-
declare const TabularNumsFeature: SkTextFontFeatures;
|
|
267
|
-
declare const LabelDefaultHorizontalAlignment: LabelHorizontalAlignment;
|
|
268
|
-
declare const LabelDefaultVerticalAlignment: LabelVerticalAlignment;
|
|
269
|
-
|
|
270
|
-
declare const LineDefaultColor: string;
|
|
271
|
-
declare const LineDefaultColors: _impulse_ui_native_theme.ChartColorPalette;
|
|
272
|
-
declare const LineDefaultWidth = 2;
|
|
273
|
-
declare const LineDefaultOpacity = 1;
|
|
274
|
-
declare const LineDefaultCurve: LineChartCurve;
|
|
275
|
-
declare const LineDefaultCap: ChartStrokeCap;
|
|
276
|
-
declare const LineDefaultJoin: ChartStrokeJoin;
|
|
277
|
-
|
|
278
|
-
declare const LineChartDefaultTickCount = 5;
|
|
279
|
-
declare const LineChartDefaultNumericDomain: ChartNumericDomain;
|
|
280
|
-
|
|
281
|
-
declare function useChartCanvas(): {
|
|
282
|
-
ref: react.RefObject<_shopify_react_native_skia.CanvasRef | null>;
|
|
283
|
-
size: _shopify_react_native_skia.SkSize;
|
|
284
|
-
};
|
|
285
|
-
|
|
286
|
-
declare function useLineChart<X extends ChartXValue = number>(props: UseLineChartProps<X>): UseLineChartResult<X>;
|
|
287
|
-
|
|
288
|
-
declare function useMultiLineChart<X extends ChartXValue = number>(props: UseMultiLineChartProps<X>): UseMultiLineChartResult<X>;
|
|
289
|
-
|
|
290
|
-
declare function createAxisTicks<Value>(values: readonly Value[], scale: LineChartScale<Value>): AxisTick<Value>[];
|
|
291
|
-
declare function createXAxisLayout<Value>(props: CreateAxisLayoutProps<Value>): AxisLayout<Value>;
|
|
292
|
-
declare function createYAxisLayout(props: CreateYAxisLayoutProps): AxisLayout<number>;
|
|
293
|
-
declare function createXAxisLabelRect(ticks: readonly AxisTick<unknown>[], index: number, region: ChartRect, offset: number): ChartRect;
|
|
294
|
-
declare function createYAxisLabelRect(position: number, region: ChartRect, width: number, fontSize: number): ChartRect;
|
|
295
|
-
declare function formatAxisTick<Value>(value: Value, format?: (value: Value) => string): string;
|
|
296
|
-
|
|
297
|
-
declare function createChartLayout(size: ChartSize, insets?: Partial<ChartInsets>): ChartLayout;
|
|
298
|
-
declare function createInsetRect(rect: ChartRect, amount: number): ChartRect;
|
|
299
|
-
|
|
300
|
-
declare function createVerticalGridPath<Value>(values: readonly Value[], scale: LineChartScale<Value>, plot: ChartRect): SkPath | null;
|
|
301
|
-
declare function createHorizontalGridPath<Value>(values: readonly Value[], scale: LineChartScale<Value>, plot: ChartRect): SkPath | null;
|
|
302
|
-
declare function resolveGridLineOptions(options: boolean | ChartGridLineOptions | undefined, defaultVisible: boolean, defaultColor: string): ResolvedGridLineOptions;
|
|
303
|
-
|
|
304
|
-
declare function getLabelTextAlign(alignment: LabelHorizontalAlignment): TextAlign;
|
|
305
|
-
declare function getLabelY(rect: ChartRect, paragraphHeight: number, alignment: LabelVerticalAlignment): number;
|
|
306
|
-
|
|
307
|
-
declare function createLinePath<X extends ChartXValue>(coordinates: readonly LineChartCoordinate<X>[], curve: LineChartCurve): SkPath | null;
|
|
308
|
-
declare function fitLineCoordinatesToRect<X extends ChartXValue>(coordinates: readonly LineChartCoordinate<X>[], source: ChartRect, target: ChartRect): LineChartCoordinate<X>[];
|
|
309
|
-
|
|
310
|
-
declare function createLineChartModel<X extends ChartXValue>(props: UseLineChartProps<X>): UseLineChartResult<X>;
|
|
311
|
-
declare function createLineChartCoordinates<X extends ChartXValue>(data: readonly LineChartPoint<X>[], xScale: LineChartScale<X>, yScale: LineChartScale<number>): LineChartCoordinate<X>[];
|
|
312
|
-
|
|
313
|
-
declare function createDrawableMultiLineChartSeries<X extends ChartXValue>(series: MultiLineChartSeriesModel<X>, index: number, plot: ChartRect): MultiLineChartSeriesModel<X>;
|
|
314
|
-
|
|
315
|
-
interface CreateParagraphBuilderProps {
|
|
316
|
-
paragraphStyle?: SkParagraphStyle;
|
|
317
|
-
typefaceProvider?: SkTypefaceFontProvider;
|
|
318
|
-
}
|
|
319
|
-
declare function createParagraphBuilder(props: CreateParagraphBuilderProps): _shopify_react_native_skia.SkParagraphBuilder;
|
|
320
|
-
|
|
321
|
-
export { AxisDefaultLabelGap, AxisDefaultOpacity, AxisDefaultTickLength, AxisDefaultWidth, type AxisLayout, type AxisLineLayout, type AxisProps, type AxisTick, type AxisTickLayout, type ChartAxisLabelOptions, type ChartAxisLineOptions, type ChartAxisOptions, type ChartAxisTickOptions, type ChartGridLineOptions, type ChartGridOptions, type ChartInsets, type ChartLabelStyle, type ChartLayout, type ChartNumericDomain, type ChartPoint, type ChartRect, type ChartScaleType, type ChartSize, type ChartStrokeCap, type ChartStrokeJoin, type ChartStrokeStyle, type ChartXAxisOptions, type ChartXValue, type ChartYAxisOptions, type CreateAxisLayoutProps, type CreateYAxisLayoutProps, Grid, GridDefaultOpacity, GridDefaultWidth, GridDefaultXVisible, GridDefaultYVisible, type GridProps, Label, LabelDefaultHorizontalAlignment, LabelDefaultVerticalAlignment, type LabelHorizontalAlignment, type LabelProps, type LabelVerticalAlignment, Line, LineChart, type LineChartCommonProps, type LineChartCoordinate, type LineChartCurve, LineChartDefaultNumericDomain, LineChartDefaultTickCount, type LineChartLineOptions, type LineChartPoint, type LineChartProps, type LineChartScale, type LineChartXScaleModel, LineDefaultCap, LineDefaultColor, LineDefaultColors, LineDefaultCurve, LineDefaultJoin, LineDefaultOpacity, LineDefaultWidth, type LineProps, MultiLineChart, type MultiLineChartBodyProps, type MultiLineChartProps, type MultiLineChartSeries, type MultiLineChartSeriesModel, type ResolvedGridLineOptions, TabularNumsFeature, type UseLineChartProps, type UseLineChartResult, type UseMultiLineChartProps, type UseMultiLineChartResult, XAxis, type XAxisProps, YAxis, type YAxisProps, createAxisTicks, createChartLayout, createDrawableMultiLineChartSeries, createHorizontalGridPath, createInsetRect, createLineChartCoordinates, createLineChartModel, createLinePath, createParagraphBuilder, createVerticalGridPath, createXAxisLabelRect, createXAxisLayout, createYAxisLabelRect, createYAxisLayout, fitLineCoordinatesToRect, formatAxisTick, getLabelTextAlign, getLabelY, resolveGridLineOptions, useChartCanvas, useLineChart, useMultiLineChart };
|
|
1
|
+
export { Grid } from './components/primitives/grid.mjs';
|
|
2
|
+
export { Label } from './components/primitives/label.mjs';
|
|
3
|
+
export { Line } from './components/primitives/line.mjs';
|
|
4
|
+
export { XAxis } from './components/primitives/x-axis.mjs';
|
|
5
|
+
export { YAxis } from './components/primitives/y-axis.mjs';
|
|
6
|
+
export { LineChart } from './components/line-chart.mjs';
|
|
7
|
+
export { MultiLineChart } from './components/multi-line-chart.mjs';
|
|
8
|
+
export { AxisDefaultLabelGap, AxisDefaultOpacity, AxisDefaultTickLength, AxisDefaultWidth } from './constants/axis.constants.mjs';
|
|
9
|
+
export { GridDefaultOpacity, GridDefaultWidth, GridDefaultXVisible, GridDefaultYVisible } from './constants/grid.constants.mjs';
|
|
10
|
+
export { LabelDefaultHorizontalAlignment, LabelDefaultVerticalAlignment, TabularNumsFeature } from './constants/label.constants.mjs';
|
|
11
|
+
export { LineDefaultCap, LineDefaultColor, LineDefaultColors, LineDefaultCurve, LineDefaultJoin, LineDefaultOpacity, LineDefaultWidth } from './constants/line.constants.mjs';
|
|
12
|
+
export { LineChartDefaultNumericDomain, LineChartDefaultTickCount } from './constants/line-chart.constants.mjs';
|
|
13
|
+
export { useChartCanvas } from './hooks/use-chart-canvas.hook.mjs';
|
|
14
|
+
export { useLineChart } from './hooks/use-line-chart.hook.mjs';
|
|
15
|
+
export { useMultiLineChart } from './hooks/use-multi-line-chart.hook.mjs';
|
|
16
|
+
export { AxisLayout, AxisLineLayout, AxisProps, AxisTick, AxisTickLayout, CreateAxisLayoutProps, CreateYAxisLayoutProps, XAxisProps, YAxisProps } from './types/axis.types.mjs';
|
|
17
|
+
export { ChartAxisLabelOptions, ChartAxisLineOptions, ChartAxisOptions, ChartAxisTickOptions, ChartInsets, ChartLayout, ChartNumericDomain, ChartPoint, ChartRect, ChartScaleType, ChartSize, ChartXAxisOptions, ChartYAxisOptions } from './types/common.types.mjs';
|
|
18
|
+
export { C as ChartGridLineOptions, a as ChartGridOptions, b as ChartXValue, G as GridProps, L as LineChartCommonProps, c as LineChartCoordinate, d as LineChartCurve, e as LineChartLineOptions, f as LineChartPoint, g as LineChartProps, h as LineChartScale, R as ResolvedGridLineOptions } from './line-chart.types-yxru5uWc.mjs';
|
|
19
|
+
export { LabelHorizontalAlignment, LabelProps, LabelVerticalAlignment } from './types/label.types.mjs';
|
|
20
|
+
export { LineProps } from './types/line.types.mjs';
|
|
21
|
+
export { MultiLineChartBodyProps, MultiLineChartProps, MultiLineChartSeries, MultiLineChartSeriesModel } from './types/multi-line-chart.types.mjs';
|
|
22
|
+
export { ChartLabelStyle, ChartStrokeCap, ChartStrokeJoin, ChartStrokeStyle } from './types/style.types.mjs';
|
|
23
|
+
export { LineChartXScaleModel, UseLineChartProps, UseLineChartResult } from './types/use-line-chart.types.mjs';
|
|
24
|
+
export { UseMultiLineChartProps, UseMultiLineChartResult } from './types/use-multi-line-chart.types.mjs';
|
|
25
|
+
export { createAxisTicks, createXAxisLabelRect, createXAxisLayout, createYAxisLabelRect, createYAxisLayout, formatAxisTick } from './utils/axis.util.mjs';
|
|
26
|
+
export { createChartLayout, createInsetRect } from './utils/chart-layout.util.mjs';
|
|
27
|
+
export { createHorizontalGridPath, createVerticalGridPath, resolveGridLineOptions } from './utils/grid.util.mjs';
|
|
28
|
+
export { getLabelTextAlign, getLabelY } from './utils/label.util.mjs';
|
|
29
|
+
export { createLinePath, fitLineCoordinatesToRect } from './utils/line.util.mjs';
|
|
30
|
+
export { createLineChartCoordinates, createLineChartModel } from './utils/line-chart.util.mjs';
|
|
31
|
+
export { createDrawableMultiLineChartSeries } from './utils/multi-line-chart.util.mjs';
|
|
32
|
+
export { createParagraphBuilder } from './utils/paragraph-builder.util.mjs';
|
|
33
|
+
import 'react/jsx-runtime';
|
|
34
|
+
import '@shopify/react-native-skia';
|
|
35
|
+
import '@impulse-ui-native/theme';
|
|
36
|
+
import 'react';
|