@impulse-ui-native/charts 2.1.0 → 2.2.0
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 +50 -6
- package/dist/components/bar-chart-body.d.mts +15 -0
- package/dist/components/bar-chart-body.js +50 -0
- package/dist/components/bar-chart-body.js.map +1 -0
- package/dist/components/bar-chart.d.mts +11 -0
- package/dist/components/bar-chart.js +21 -0
- package/dist/components/bar-chart.js.map +1 -0
- package/dist/components/chart-axes.d.mts +22 -0
- package/dist/components/chart-axes.js +64 -0
- package/dist/components/chart-axes.js.map +1 -0
- package/dist/components/index.d.mts +23 -0
- package/dist/components/index.js +12 -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 +86 -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-bar-chart-body.d.mts +16 -0
- package/dist/components/multi-bar-chart-body.js +72 -0
- package/dist/components/multi-bar-chart-body.js.map +1 -0
- package/dist/components/multi-bar-chart.d.mts +12 -0
- package/dist/components/multi-bar-chart.js +21 -0
- package/dist/components/multi-bar-chart.js.map +1 -0
- package/dist/components/multi-line-chart-body.d.mts +11 -0
- package/dist/components/multi-line-chart-body.js +95 -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/bar.d.mts +12 -0
- package/dist/components/primitives/bar.js +44 -0
- package/dist/components/primitives/bar.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 +17 -0
- package/dist/components/primitives/index.js +15 -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/bar-chart.constants.d.mts +4 -0
- package/dist/constants/bar-chart.constants.js +7 -0
- package/dist/constants/bar-chart.constants.js.map +1 -0
- package/dist/constants/bar.constants.d.mts +8 -0
- package/dist/constants/bar.constants.js +12 -0
- package/dist/constants/bar.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 +13 -0
- package/dist/constants/index.js +8 -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 +19 -0
- package/dist/hooks/index.js +15 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/use-bar-chart.hook.d.mts +11 -0
- package/dist/hooks/use-bar-chart.hook.js +13 -0
- package/dist/hooks/use-bar-chart.hook.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-chart-layout.hook.d.mts +7 -0
- package/dist/hooks/use-chart-layout.hook.js +9 -0
- package/dist/hooks/use-chart-layout.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-bar-chart.hook.d.mts +13 -0
- package/dist/hooks/use-multi-bar-chart.hook.js +20 -0
- package/dist/hooks/use-multi-bar-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 +51 -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/bar-chart.types.d.mts +38 -0
- package/dist/types/bar-chart.types.js +1 -0
- package/dist/types/bar-chart.types.js.map +1 -0
- package/dist/types/bar.types.d.mts +12 -0
- package/dist/types/bar.types.js +1 -0
- package/dist/types/bar.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 +16 -0
- package/dist/types/index.js +16 -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-bar-chart.types.d.mts +21 -0
- package/dist/types/multi-bar-chart.types.js +1 -0
- package/dist/types/multi-bar-chart.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-bar-chart.types.d.mts +26 -0
- package/dist/types/use-bar-chart.types.js +1 -0
- package/dist/types/use-bar-chart.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-bar-chart.types.d.mts +17 -0
- package/dist/types/use-multi-bar-chart.types.js +1 -0
- package/dist/types/use-multi-bar-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/bar-chart.util.d.mts +25 -0
- package/dist/utils/bar-chart.util.js +145 -0
- package/dist/utils/bar-chart.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 +23 -0
- package/dist/utils/index.js +56 -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-bar-chart.util.d.mts +14 -0
- package/dist/utils/multi-bar-chart.util.js +62 -0
- package/dist/utils/multi-bar-chart.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 +6 -5
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { Group } from "@shopify/react-native-skia";
|
|
4
|
+
import { memo } from "@impulse-ui-native/core";
|
|
5
|
+
import { useChartLayout, useMultiLineChart } from "../hooks";
|
|
6
|
+
import { createDrawableMultiLineChartSeries } from "../utils";
|
|
7
|
+
import { Grid, Line, XAxis, YAxis } from "./primitives";
|
|
8
|
+
const MultiLineChartBody = memo(function MultiLineChartBodyComponent(props) {
|
|
9
|
+
const {
|
|
10
|
+
fontManager,
|
|
11
|
+
grid,
|
|
12
|
+
insets,
|
|
13
|
+
series,
|
|
14
|
+
size,
|
|
15
|
+
theme,
|
|
16
|
+
xAxis,
|
|
17
|
+
xScaleType,
|
|
18
|
+
yAxis
|
|
19
|
+
} = props;
|
|
20
|
+
const layout = useChartLayout(size, insets);
|
|
21
|
+
const {
|
|
22
|
+
series: seriesModels,
|
|
23
|
+
xScale,
|
|
24
|
+
xTicks,
|
|
25
|
+
yScale,
|
|
26
|
+
yTicks
|
|
27
|
+
} = useMultiLineChart({
|
|
28
|
+
plot: layout.plot,
|
|
29
|
+
series,
|
|
30
|
+
xAxis,
|
|
31
|
+
xScaleType,
|
|
32
|
+
yAxis
|
|
33
|
+
});
|
|
34
|
+
const drawableSeries = useMemo(
|
|
35
|
+
() => seriesModels.map(
|
|
36
|
+
(currentSeries, index) => createDrawableMultiLineChartSeries(currentSeries, index, layout.plot)
|
|
37
|
+
),
|
|
38
|
+
[layout.plot, seriesModels]
|
|
39
|
+
);
|
|
40
|
+
const isGridStyle = grid !== void 0;
|
|
41
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
42
|
+
isGridStyle ? /* @__PURE__ */ jsx(
|
|
43
|
+
Grid,
|
|
44
|
+
{
|
|
45
|
+
options: grid,
|
|
46
|
+
plot: layout.plot,
|
|
47
|
+
theme,
|
|
48
|
+
xTicks,
|
|
49
|
+
xScale,
|
|
50
|
+
yTicks,
|
|
51
|
+
yScale
|
|
52
|
+
}
|
|
53
|
+
) : null,
|
|
54
|
+
xAxis?.visible !== false ? /* @__PURE__ */ jsx(
|
|
55
|
+
XAxis,
|
|
56
|
+
{
|
|
57
|
+
ticks: xTicks,
|
|
58
|
+
scale: xScale,
|
|
59
|
+
plot: layout.plot,
|
|
60
|
+
region: layout.xAxis,
|
|
61
|
+
theme,
|
|
62
|
+
options: xAxis,
|
|
63
|
+
fontManager,
|
|
64
|
+
lineVisible: !isGridStyle,
|
|
65
|
+
tickVisible: !isGridStyle
|
|
66
|
+
}
|
|
67
|
+
) : null,
|
|
68
|
+
yAxis?.visible !== false ? /* @__PURE__ */ jsx(
|
|
69
|
+
YAxis,
|
|
70
|
+
{
|
|
71
|
+
ticks: yTicks,
|
|
72
|
+
scale: yScale,
|
|
73
|
+
plot: layout.plot,
|
|
74
|
+
region: layout.yAxis,
|
|
75
|
+
theme,
|
|
76
|
+
options: yAxis,
|
|
77
|
+
fontManager,
|
|
78
|
+
lineVisible: !isGridStyle,
|
|
79
|
+
tickVisible: !isGridStyle
|
|
80
|
+
}
|
|
81
|
+
) : null,
|
|
82
|
+
/* @__PURE__ */ jsx(Group, { clip: layout.plot, children: drawableSeries.map((currentSeries) => /* @__PURE__ */ jsx(
|
|
83
|
+
Line,
|
|
84
|
+
{
|
|
85
|
+
coordinates: currentSeries.coordinates,
|
|
86
|
+
...currentSeries.line
|
|
87
|
+
},
|
|
88
|
+
currentSeries.id
|
|
89
|
+
)) })
|
|
90
|
+
] });
|
|
91
|
+
});
|
|
92
|
+
export {
|
|
93
|
+
MultiLineChartBody
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=multi-line-chart-body.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/multi-line-chart-body.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport { Group } from \"@shopify/react-native-skia\";\n\nimport { memo } from \"@impulse-ui-native/core\";\n\nimport { useChartLayout, useMultiLineChart } from \"../hooks\";\nimport { ChartXValue, MultiLineChartBodyProps } from \"../types\";\nimport { createDrawableMultiLineChartSeries } from \"../utils\";\nimport { Grid, Line, XAxis, YAxis } from \"./primitives\";\n\nexport const MultiLineChartBody = memo(function MultiLineChartBodyComponent<\n X extends ChartXValue = number,\n>(props: MultiLineChartBodyProps<X>) {\n const {\n fontManager,\n grid,\n insets,\n series,\n size,\n theme,\n xAxis,\n xScaleType,\n yAxis,\n } = props;\n\n const layout = useChartLayout(size, insets);\n\n const {\n series: seriesModels,\n xScale,\n xTicks,\n yScale,\n yTicks,\n } = useMultiLineChart({\n plot: layout.plot,\n series,\n xAxis,\n xScaleType,\n yAxis,\n });\n\n const drawableSeries = useMemo(\n () =>\n seriesModels.map((currentSeries, index) =>\n createDrawableMultiLineChartSeries(currentSeries, index, layout.plot),\n ),\n [layout.plot, seriesModels],\n );\n\n const isGridStyle = grid !== undefined;\n\n return (\n <>\n {isGridStyle ? (\n <Grid\n options={grid}\n plot={layout.plot}\n theme={theme}\n xTicks={xTicks}\n xScale={xScale}\n yTicks={yTicks}\n yScale={yScale}\n />\n ) : null}\n\n {xAxis?.visible !== false ? (\n <XAxis\n ticks={xTicks}\n scale={xScale}\n plot={layout.plot}\n region={layout.xAxis}\n theme={theme}\n options={xAxis}\n fontManager={fontManager}\n lineVisible={!isGridStyle}\n tickVisible={!isGridStyle}\n />\n ) : null}\n\n {yAxis?.visible !== false ? (\n <YAxis\n ticks={yTicks}\n scale={yScale}\n plot={layout.plot}\n region={layout.yAxis}\n theme={theme}\n options={yAxis}\n fontManager={fontManager}\n lineVisible={!isGridStyle}\n tickVisible={!isGridStyle}\n />\n ) : null}\n\n <Group clip={layout.plot}>\n {drawableSeries.map((currentSeries) => (\n <Line\n key={currentSeries.id}\n coordinates={currentSeries.coordinates}\n {...currentSeries.line}\n />\n ))}\n </Group>\n </>\n );\n});\n"],"mappings":"AAoDI,mBAEI,KAFJ;AApDJ,SAAS,eAAe;AACxB,SAAS,aAAa;AAEtB,SAAS,YAAY;AAErB,SAAS,gBAAgB,yBAAyB;AAElD,SAAS,0CAA0C;AACnD,SAAS,MAAM,MAAM,OAAO,aAAa;AAElC,MAAM,qBAAqB,KAAK,SAAS,4BAE9C,OAAmC;AACnC,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,SAAS,eAAe,MAAM,MAAM;AAE1C,QAAM;AAAA,IACJ,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,kBAAkB;AAAA,IACpB,MAAM,OAAO;AAAA,IACb;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,iBAAiB;AAAA,IACrB,MACE,aAAa;AAAA,MAAI,CAAC,eAAe,UAC/B,mCAAmC,eAAe,OAAO,OAAO,IAAI;AAAA,IACtE;AAAA,IACF,CAAC,OAAO,MAAM,YAAY;AAAA,EAC5B;AAEA,QAAM,cAAc,SAAS;AAE7B,SACE,iCACG;AAAA,kBACC;AAAA,MAAC;AAAA;AAAA,QACC,SAAS;AAAA,QACT,MAAM,OAAO;AAAA,QACb;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF,IACE;AAAA,IAEH,OAAO,YAAY,QAClB;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA,QACP,OAAO;AAAA,QACP,MAAM,OAAO;AAAA,QACb,QAAQ,OAAO;AAAA,QACf;AAAA,QACA,SAAS;AAAA,QACT;AAAA,QACA,aAAa,CAAC;AAAA,QACd,aAAa,CAAC;AAAA;AAAA,IAChB,IACE;AAAA,IAEH,OAAO,YAAY,QAClB;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA,QACP,OAAO;AAAA,QACP,MAAM,OAAO;AAAA,QACb,QAAQ,OAAO;AAAA,QACf;AAAA,QACA,SAAS;AAAA,QACT;AAAA,QACA,aAAa,CAAC;AAAA,QACd,aAAa,CAAC;AAAA;AAAA,IAChB,IACE;AAAA,IAEJ,oBAAC,SAAM,MAAM,OAAO,MACjB,yBAAe,IAAI,CAAC,kBACnB;AAAA,MAAC;AAAA;AAAA,QAEC,aAAa,cAAc;AAAA,QAC1B,GAAG,cAAc;AAAA;AAAA,MAFb,cAAc;AAAA,IAGrB,CACD,GACH;AAAA,KACF;AAEJ,CAAC;","names":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { b as ChartXValue } from '../line-chart.types-yxru5uWc.mjs';
|
|
3
|
+
import { MultiLineChartProps } from '../types/multi-line-chart.types.mjs';
|
|
4
|
+
import '@shopify/react-native-skia';
|
|
5
|
+
import '../types/common.types.mjs';
|
|
6
|
+
import '../types/style.types.mjs';
|
|
7
|
+
import '@impulse-ui-native/theme';
|
|
8
|
+
|
|
9
|
+
declare const MultiLineChart: <X extends ChartXValue = number>(props: MultiLineChartProps<X>) => react_jsx_runtime.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { MultiLineChart };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { StyleSheet } from "react-native";
|
|
3
|
+
import { Canvas } from "@shopify/react-native-skia";
|
|
4
|
+
import { memo } from "@impulse-ui-native/core";
|
|
5
|
+
import { useTheme } from "@impulse-ui-native/theme";
|
|
6
|
+
import { useChartCanvas } from "../hooks";
|
|
7
|
+
import { MultiLineChartBody } from "./multi-line-chart-body";
|
|
8
|
+
const MultiLineChart = memo(function MultiLineChart2(props) {
|
|
9
|
+
const theme = useTheme();
|
|
10
|
+
const { ref, size } = useChartCanvas();
|
|
11
|
+
return /* @__PURE__ */ jsx(Canvas, { ref, style: styles.container, children: /* @__PURE__ */ jsx(MultiLineChartBody, { ...props, size, theme }) });
|
|
12
|
+
});
|
|
13
|
+
const styles = StyleSheet.create({
|
|
14
|
+
container: {
|
|
15
|
+
flex: 1
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
export {
|
|
19
|
+
MultiLineChart
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=multi-line-chart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/multi-line-chart.tsx"],"sourcesContent":["import { StyleSheet } from \"react-native\";\nimport { Canvas } from \"@shopify/react-native-skia\";\n\nimport { memo } from \"@impulse-ui-native/core\";\nimport { useTheme } from \"@impulse-ui-native/theme\";\n\nimport { useChartCanvas } from \"../hooks\";\nimport { ChartXValue, MultiLineChartProps } from \"../types\";\nimport { MultiLineChartBody } from \"./multi-line-chart-body\";\n\nexport const MultiLineChart = memo(function MultiLineChart<\n X extends ChartXValue = number,\n>(props: MultiLineChartProps<X>) {\n const theme = useTheme();\n\n const { ref, size } = useChartCanvas();\n\n return (\n <Canvas ref={ref} style={styles.container}>\n <MultiLineChartBody {...props} size={size} theme={theme} />\n </Canvas>\n );\n});\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n});\n"],"mappings":"AAmBM;AAnBN,SAAS,kBAAkB;AAC3B,SAAS,cAAc;AAEvB,SAAS,YAAY;AACrB,SAAS,gBAAgB;AAEzB,SAAS,sBAAsB;AAE/B,SAAS,0BAA0B;AAE5B,MAAM,iBAAiB,KAAK,SAASA,gBAE1C,OAA+B;AAC/B,QAAM,QAAQ,SAAS;AAEvB,QAAM,EAAE,KAAK,KAAK,IAAI,eAAe;AAErC,SACE,oBAAC,UAAO,KAAU,OAAO,OAAO,WAC9B,8BAAC,sBAAoB,GAAG,OAAO,MAAY,OAAc,GAC3D;AAEJ,CAAC;AAED,MAAM,SAAS,WAAW,OAAO;AAAA,EAC/B,WAAW;AAAA,IACT,MAAM;AAAA,EACR;AACF,CAAC;","names":["MultiLineChart"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { b as ChartXValue } from '../../line-chart.types-yxru5uWc.mjs';
|
|
3
|
+
import { BarProps } from '../../types/bar.types.mjs';
|
|
4
|
+
import '@shopify/react-native-skia';
|
|
5
|
+
import '../../types/common.types.mjs';
|
|
6
|
+
import '../../types/style.types.mjs';
|
|
7
|
+
import '@impulse-ui-native/theme';
|
|
8
|
+
import '../../types/bar-chart.types.mjs';
|
|
9
|
+
|
|
10
|
+
declare const Bar: <X extends ChartXValue = string>(props: BarProps<X>) => react_jsx_runtime.JSX.Element | null;
|
|
11
|
+
|
|
12
|
+
export { Bar };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Group, RoundedRect } from "@shopify/react-native-skia";
|
|
3
|
+
import { memo } from "@impulse-ui-native/core";
|
|
4
|
+
import {
|
|
5
|
+
BarDefaultColor,
|
|
6
|
+
BarDefaultOpacity,
|
|
7
|
+
BarDefaultRadius
|
|
8
|
+
} from "../../constants";
|
|
9
|
+
const Bar = memo(function Bar2(props) {
|
|
10
|
+
const {
|
|
11
|
+
color = BarDefaultColor,
|
|
12
|
+
coordinates,
|
|
13
|
+
opacity = BarDefaultOpacity,
|
|
14
|
+
radius = BarDefaultRadius,
|
|
15
|
+
visible = true
|
|
16
|
+
} = props;
|
|
17
|
+
if (!visible) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
return /* @__PURE__ */ jsx(Group, { children: coordinates.map((coordinate) => {
|
|
21
|
+
const resolvedRadius = Math.min(
|
|
22
|
+
Math.max(0, radius),
|
|
23
|
+
coordinate.width / 2,
|
|
24
|
+
coordinate.height / 2
|
|
25
|
+
);
|
|
26
|
+
return coordinate.height > 0 ? /* @__PURE__ */ jsx(
|
|
27
|
+
RoundedRect,
|
|
28
|
+
{
|
|
29
|
+
x: coordinate.x,
|
|
30
|
+
y: coordinate.y,
|
|
31
|
+
width: coordinate.width,
|
|
32
|
+
height: coordinate.height,
|
|
33
|
+
r: resolvedRadius,
|
|
34
|
+
color,
|
|
35
|
+
opacity
|
|
36
|
+
},
|
|
37
|
+
coordinate.index
|
|
38
|
+
) : null;
|
|
39
|
+
}) });
|
|
40
|
+
});
|
|
41
|
+
export {
|
|
42
|
+
Bar
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/primitives/bar.tsx"],"sourcesContent":["import { Group, RoundedRect } from \"@shopify/react-native-skia\";\n\nimport { memo } from \"@impulse-ui-native/core\";\n\nimport {\n BarDefaultColor,\n BarDefaultOpacity,\n BarDefaultRadius,\n} from \"../../constants\";\nimport { BarProps, ChartXValue } from \"../../types\";\n\nexport const Bar = memo(function Bar<X extends ChartXValue = string>(\n props: BarProps<X>,\n) {\n const {\n color = BarDefaultColor,\n coordinates,\n opacity = BarDefaultOpacity,\n radius = BarDefaultRadius,\n visible = true,\n } = props;\n\n if (!visible) {\n return null;\n }\n\n return (\n <Group>\n {coordinates.map((coordinate) => {\n const resolvedRadius = Math.min(\n Math.max(0, radius),\n coordinate.width / 2,\n coordinate.height / 2,\n );\n\n return coordinate.height > 0 ? (\n <RoundedRect\n key={coordinate.index}\n x={coordinate.x}\n y={coordinate.y}\n width={coordinate.width}\n height={coordinate.height}\n r={resolvedRadius}\n color={color}\n opacity={opacity}\n />\n ) : null;\n })}\n </Group>\n );\n});\n"],"mappings":"AAoCU;AApCV,SAAS,OAAO,mBAAmB;AAEnC,SAAS,YAAY;AAErB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGA,MAAM,MAAM,KAAK,SAASA,KAC/B,OACA;AACA,QAAM;AAAA,IACJ,QAAQ;AAAA,IACR;AAAA,IACA,UAAU;AAAA,IACV,SAAS;AAAA,IACT,UAAU;AAAA,EACZ,IAAI;AAEJ,MAAI,CAAC,SAAS;AACZ,WAAO;AAAA,EACT;AAEA,SACE,oBAAC,SACE,sBAAY,IAAI,CAAC,eAAe;AAC/B,UAAM,iBAAiB,KAAK;AAAA,MAC1B,KAAK,IAAI,GAAG,MAAM;AAAA,MAClB,WAAW,QAAQ;AAAA,MACnB,WAAW,SAAS;AAAA,IACtB;AAEA,WAAO,WAAW,SAAS,IACzB;AAAA,MAAC;AAAA;AAAA,QAEC,GAAG,WAAW;AAAA,QACd,GAAG,WAAW;AAAA,QACd,OAAO,WAAW;AAAA,QAClB,QAAQ,WAAW;AAAA,QACnB,GAAG;AAAA,QACH;AAAA,QACA;AAAA;AAAA,MAPK,WAAW;AAAA,IAQlB,IACE;AAAA,EACN,CAAC,GACH;AAEJ,CAAC;","names":["Bar"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { b as ChartXValue, G as GridProps } from '../../line-chart.types-yxru5uWc.mjs';
|
|
3
|
+
import '@shopify/react-native-skia';
|
|
4
|
+
import '../../types/common.types.mjs';
|
|
5
|
+
import '../../types/style.types.mjs';
|
|
6
|
+
import '@impulse-ui-native/theme';
|
|
7
|
+
|
|
8
|
+
declare const Grid: <X extends ChartXValue = number>(props: GridProps<X>) => react_jsx_runtime.JSX.Element;
|
|
9
|
+
|
|
10
|
+
export { Grid };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { DashPathEffect, Group, Path } from "@shopify/react-native-skia";
|
|
4
|
+
import { memo } from "@impulse-ui-native/core";
|
|
5
|
+
import { GridDefaultXVisible, GridDefaultYVisible } from "../../constants";
|
|
6
|
+
import {
|
|
7
|
+
createHorizontalGridPath,
|
|
8
|
+
createVerticalGridPath,
|
|
9
|
+
resolveGridLineOptions
|
|
10
|
+
} from "../../utils";
|
|
11
|
+
const Grid = memo(function Grid2(props) {
|
|
12
|
+
const { options, plot, theme, xScale, xTicks, yScale, yTicks } = props;
|
|
13
|
+
const xStyle = useMemo(
|
|
14
|
+
() => resolveGridLineOptions(
|
|
15
|
+
options?.x,
|
|
16
|
+
GridDefaultXVisible,
|
|
17
|
+
theme.colors.border.subtle.value
|
|
18
|
+
),
|
|
19
|
+
[options?.x, theme.colors.border.subtle.value]
|
|
20
|
+
);
|
|
21
|
+
const yStyle = useMemo(
|
|
22
|
+
() => resolveGridLineOptions(
|
|
23
|
+
options?.y,
|
|
24
|
+
GridDefaultYVisible,
|
|
25
|
+
theme.colors.border.subtle.value
|
|
26
|
+
),
|
|
27
|
+
[options?.y, theme.colors.border.subtle.value]
|
|
28
|
+
);
|
|
29
|
+
const xPath = useMemo(
|
|
30
|
+
() => createVerticalGridPath(xTicks, xScale, plot),
|
|
31
|
+
[plot, xScale, xTicks]
|
|
32
|
+
);
|
|
33
|
+
const yPath = useMemo(
|
|
34
|
+
() => createHorizontalGridPath(yTicks, yScale, plot),
|
|
35
|
+
[plot, yScale, yTicks]
|
|
36
|
+
);
|
|
37
|
+
return /* @__PURE__ */ jsxs(Group, { children: [
|
|
38
|
+
xStyle.visible && xPath ? /* @__PURE__ */ jsx(
|
|
39
|
+
Path,
|
|
40
|
+
{
|
|
41
|
+
path: xPath,
|
|
42
|
+
color: xStyle.color,
|
|
43
|
+
opacity: xStyle.opacity,
|
|
44
|
+
strokeWidth: xStyle.width,
|
|
45
|
+
style: "stroke",
|
|
46
|
+
children: xStyle.dash?.length ? /* @__PURE__ */ jsx(DashPathEffect, { intervals: [...xStyle.dash] }) : null
|
|
47
|
+
}
|
|
48
|
+
) : null,
|
|
49
|
+
yStyle.visible && yPath ? /* @__PURE__ */ jsx(
|
|
50
|
+
Path,
|
|
51
|
+
{
|
|
52
|
+
path: yPath,
|
|
53
|
+
color: yStyle.color,
|
|
54
|
+
opacity: yStyle.opacity,
|
|
55
|
+
strokeWidth: yStyle.width,
|
|
56
|
+
style: "stroke",
|
|
57
|
+
children: yStyle.dash?.length ? /* @__PURE__ */ jsx(DashPathEffect, { intervals: [...yStyle.dash] }) : null
|
|
58
|
+
}
|
|
59
|
+
) : null
|
|
60
|
+
] });
|
|
61
|
+
});
|
|
62
|
+
export {
|
|
63
|
+
Grid
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=grid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/primitives/grid.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport { DashPathEffect, Group, Path } from \"@shopify/react-native-skia\";\n\nimport { memo } from \"@impulse-ui-native/core\";\n\nimport { GridDefaultXVisible, GridDefaultYVisible } from \"../../constants\";\nimport { ChartXValue, GridProps } from \"../../types\";\nimport {\n createHorizontalGridPath,\n createVerticalGridPath,\n resolveGridLineOptions,\n} from \"../../utils\";\n\nexport const Grid = memo(function Grid<X extends ChartXValue = number>(\n props: GridProps<X>,\n) {\n const { options, plot, theme, xScale, xTicks, yScale, yTicks } = props;\n\n const xStyle = useMemo(\n () =>\n resolveGridLineOptions(\n options?.x,\n GridDefaultXVisible,\n theme.colors.border.subtle.value,\n ),\n [options?.x, theme.colors.border.subtle.value],\n );\n\n const yStyle = useMemo(\n () =>\n resolveGridLineOptions(\n options?.y,\n GridDefaultYVisible,\n theme.colors.border.subtle.value,\n ),\n [options?.y, theme.colors.border.subtle.value],\n );\n\n const xPath = useMemo(\n () => createVerticalGridPath(xTicks, xScale, plot),\n [plot, xScale, xTicks],\n );\n\n const yPath = useMemo(\n () => createHorizontalGridPath(yTicks, yScale, plot),\n [plot, yScale, yTicks],\n );\n\n return (\n <Group>\n {xStyle.visible && xPath ? (\n <Path\n path={xPath}\n color={xStyle.color}\n opacity={xStyle.opacity}\n strokeWidth={xStyle.width}\n style=\"stroke\"\n >\n {xStyle.dash?.length ? (\n <DashPathEffect intervals={[...xStyle.dash]} />\n ) : null}\n </Path>\n ) : null}\n\n {yStyle.visible && yPath ? (\n <Path\n path={yPath}\n color={yStyle.color}\n opacity={yStyle.opacity}\n strokeWidth={yStyle.width}\n style=\"stroke\"\n >\n {yStyle.dash?.length ? (\n <DashPathEffect intervals={[...yStyle.dash]} />\n ) : null}\n </Path>\n ) : null}\n </Group>\n );\n});\n"],"mappings":"AAiDI,SAUQ,KAVR;AAjDJ,SAAS,eAAe;AACxB,SAAS,gBAAgB,OAAO,YAAY;AAE5C,SAAS,YAAY;AAErB,SAAS,qBAAqB,2BAA2B;AAEzD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEA,MAAM,OAAO,KAAK,SAASA,MAChC,OACA;AACA,QAAM,EAAE,SAAS,MAAM,OAAO,QAAQ,QAAQ,QAAQ,OAAO,IAAI;AAEjE,QAAM,SAAS;AAAA,IACb,MACE;AAAA,MACE,SAAS;AAAA,MACT;AAAA,MACA,MAAM,OAAO,OAAO,OAAO;AAAA,IAC7B;AAAA,IACF,CAAC,SAAS,GAAG,MAAM,OAAO,OAAO,OAAO,KAAK;AAAA,EAC/C;AAEA,QAAM,SAAS;AAAA,IACb,MACE;AAAA,MACE,SAAS;AAAA,MACT;AAAA,MACA,MAAM,OAAO,OAAO,OAAO;AAAA,IAC7B;AAAA,IACF,CAAC,SAAS,GAAG,MAAM,OAAO,OAAO,OAAO,KAAK;AAAA,EAC/C;AAEA,QAAM,QAAQ;AAAA,IACZ,MAAM,uBAAuB,QAAQ,QAAQ,IAAI;AAAA,IACjD,CAAC,MAAM,QAAQ,MAAM;AAAA,EACvB;AAEA,QAAM,QAAQ;AAAA,IACZ,MAAM,yBAAyB,QAAQ,QAAQ,IAAI;AAAA,IACnD,CAAC,MAAM,QAAQ,MAAM;AAAA,EACvB;AAEA,SACE,qBAAC,SACE;AAAA,WAAO,WAAW,QACjB;AAAA,MAAC;AAAA;AAAA,QACC,MAAM;AAAA,QACN,OAAO,OAAO;AAAA,QACd,SAAS,OAAO;AAAA,QAChB,aAAa,OAAO;AAAA,QACpB,OAAM;AAAA,QAEL,iBAAO,MAAM,SACZ,oBAAC,kBAAe,WAAW,CAAC,GAAG,OAAO,IAAI,GAAG,IAC3C;AAAA;AAAA,IACN,IACE;AAAA,IAEH,OAAO,WAAW,QACjB;AAAA,MAAC;AAAA;AAAA,QACC,MAAM;AAAA,QACN,OAAO,OAAO;AAAA,QACd,SAAS,OAAO;AAAA,QAChB,aAAa,OAAO;AAAA,QACpB,OAAM;AAAA,QAEL,iBAAO,MAAM,SACZ,oBAAC,kBAAe,WAAW,CAAC,GAAG,OAAO,IAAI,GAAG,IAC3C;AAAA;AAAA,IACN,IACE;AAAA,KACN;AAEJ,CAAC;","names":["Grid"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { Bar } from './bar.mjs';
|
|
2
|
+
export { Grid } from './grid.mjs';
|
|
3
|
+
export { Label } from './label.mjs';
|
|
4
|
+
export { Line } from './line.mjs';
|
|
5
|
+
export { XAxis } from './x-axis.mjs';
|
|
6
|
+
export { YAxis } from './y-axis.mjs';
|
|
7
|
+
import 'react/jsx-runtime';
|
|
8
|
+
import '../../line-chart.types-yxru5uWc.mjs';
|
|
9
|
+
import '@shopify/react-native-skia';
|
|
10
|
+
import '../../types/common.types.mjs';
|
|
11
|
+
import '../../types/style.types.mjs';
|
|
12
|
+
import '@impulse-ui-native/theme';
|
|
13
|
+
import '../../types/bar.types.mjs';
|
|
14
|
+
import '../../types/bar-chart.types.mjs';
|
|
15
|
+
import '../../types/label.types.mjs';
|
|
16
|
+
import '../../types/line.types.mjs';
|
|
17
|
+
import '../../types/axis.types.mjs';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Bar } from "./bar";
|
|
2
|
+
import { Grid } from "./grid";
|
|
3
|
+
import { Label } from "./label";
|
|
4
|
+
import { Line } from "./line";
|
|
5
|
+
import { XAxis } from "./x-axis";
|
|
6
|
+
import { YAxis } from "./y-axis";
|
|
7
|
+
export {
|
|
8
|
+
Bar,
|
|
9
|
+
Grid,
|
|
10
|
+
Label,
|
|
11
|
+
Line,
|
|
12
|
+
XAxis,
|
|
13
|
+
YAxis
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/primitives/index.ts"],"sourcesContent":["export { Bar } from \"./bar\";\nexport { Grid } from \"./grid\";\nexport { Label } from \"./label\";\nexport { Line } from \"./line\";\nexport { XAxis } from \"./x-axis\";\nexport { YAxis } from \"./y-axis\";\n"],"mappings":"AAAA,SAAS,WAAW;AACpB,SAAS,YAAY;AACrB,SAAS,aAAa;AACtB,SAAS,YAAY;AACrB,SAAS,aAAa;AACtB,SAAS,aAAa;","names":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { LabelProps } from '../../types/label.types.mjs';
|
|
3
|
+
import '@shopify/react-native-skia';
|
|
4
|
+
import '@impulse-ui-native/theme';
|
|
5
|
+
import '../../types/common.types.mjs';
|
|
6
|
+
import '../../types/style.types.mjs';
|
|
7
|
+
|
|
8
|
+
declare const Label: (props: LabelProps) => react_jsx_runtime.JSX.Element | null;
|
|
9
|
+
|
|
10
|
+
export { Label };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import {
|
|
4
|
+
Group,
|
|
5
|
+
Paragraph,
|
|
6
|
+
Skia
|
|
7
|
+
} from "@shopify/react-native-skia";
|
|
8
|
+
import { memo } from "@impulse-ui-native/core";
|
|
9
|
+
import {
|
|
10
|
+
LabelDefaultHorizontalAlignment,
|
|
11
|
+
LabelDefaultVerticalAlignment,
|
|
12
|
+
TabularNumsFeature
|
|
13
|
+
} from "../../constants";
|
|
14
|
+
import {
|
|
15
|
+
createParagraphBuilder,
|
|
16
|
+
getLabelTextAlign,
|
|
17
|
+
getLabelY
|
|
18
|
+
} from "../../utils";
|
|
19
|
+
const Label = memo(function Label2(props) {
|
|
20
|
+
const {
|
|
21
|
+
color,
|
|
22
|
+
fontManager,
|
|
23
|
+
fontSize,
|
|
24
|
+
fontFamily,
|
|
25
|
+
fontWeight,
|
|
26
|
+
horizontalAlign = LabelDefaultHorizontalAlignment,
|
|
27
|
+
rect,
|
|
28
|
+
rotation = 0,
|
|
29
|
+
text,
|
|
30
|
+
theme,
|
|
31
|
+
tnum,
|
|
32
|
+
maxLines = 1,
|
|
33
|
+
verticalAlign = LabelDefaultVerticalAlignment
|
|
34
|
+
} = props;
|
|
35
|
+
const paragraph = useMemo(() => {
|
|
36
|
+
const fontFeatures = [];
|
|
37
|
+
if (tnum) {
|
|
38
|
+
fontFeatures.push(TabularNumsFeature);
|
|
39
|
+
}
|
|
40
|
+
const textStyle = {
|
|
41
|
+
color: Skia.Color(color ?? theme.colors.text.secondary),
|
|
42
|
+
fontSize: fontSize ?? theme.fontSize.xs,
|
|
43
|
+
fontFeatures
|
|
44
|
+
};
|
|
45
|
+
if (fontFamily) {
|
|
46
|
+
textStyle.fontFamilies = [fontFamily];
|
|
47
|
+
}
|
|
48
|
+
if (fontWeight !== void 0) {
|
|
49
|
+
textStyle.fontStyle = { weight: fontWeight };
|
|
50
|
+
}
|
|
51
|
+
const result = createParagraphBuilder({
|
|
52
|
+
paragraphStyle: {
|
|
53
|
+
ellipsis: "\u2026",
|
|
54
|
+
maxLines: Math.max(1, Math.floor(maxLines)),
|
|
55
|
+
textAlign: getLabelTextAlign(horizontalAlign)
|
|
56
|
+
},
|
|
57
|
+
typefaceProvider: fontManager
|
|
58
|
+
}).pushStyle(textStyle).addText(text).pop().build();
|
|
59
|
+
result.layout(rect.width);
|
|
60
|
+
return result;
|
|
61
|
+
}, [
|
|
62
|
+
color,
|
|
63
|
+
fontManager,
|
|
64
|
+
fontFamily,
|
|
65
|
+
fontSize,
|
|
66
|
+
fontWeight,
|
|
67
|
+
horizontalAlign,
|
|
68
|
+
rect.width,
|
|
69
|
+
text,
|
|
70
|
+
theme.colors.text.secondary,
|
|
71
|
+
theme.fontSize.xs,
|
|
72
|
+
tnum,
|
|
73
|
+
maxLines
|
|
74
|
+
]);
|
|
75
|
+
const rotationProps = useMemo(
|
|
76
|
+
() => ({
|
|
77
|
+
origin: {
|
|
78
|
+
x: rect.x + rect.width / 2,
|
|
79
|
+
y: rect.y + rect.height / 2
|
|
80
|
+
},
|
|
81
|
+
transform: [{ rotate: rotation * Math.PI / 180 }]
|
|
82
|
+
}),
|
|
83
|
+
[rect.height, rect.width, rect.x, rect.y, rotation]
|
|
84
|
+
);
|
|
85
|
+
if (!paragraph) {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
const y = getLabelY(rect, paragraph.getHeight(), verticalAlign);
|
|
89
|
+
return /* @__PURE__ */ jsx(Group, { origin: rotationProps.origin, transform: rotationProps.transform, children: /* @__PURE__ */ jsx(Paragraph, { paragraph, x: rect.x, y, width: rect.width }) });
|
|
90
|
+
});
|
|
91
|
+
export {
|
|
92
|
+
Label
|
|
93
|
+
};
|
|
94
|
+
//# sourceMappingURL=label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/primitives/label.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport {\n Group,\n Paragraph,\n Skia,\n SkTextFontFeatures,\n SkTextStyle,\n} from \"@shopify/react-native-skia\";\n\nimport { memo } from \"@impulse-ui-native/core\";\n\nimport {\n LabelDefaultHorizontalAlignment,\n LabelDefaultVerticalAlignment,\n TabularNumsFeature,\n} from \"../../constants\";\nimport { LabelProps } from \"../../types\";\nimport {\n createParagraphBuilder,\n getLabelTextAlign,\n getLabelY,\n} from \"../../utils\";\n\nexport const Label = memo(function Label(props: LabelProps) {\n const {\n color,\n fontManager,\n fontSize,\n fontFamily,\n fontWeight,\n horizontalAlign = LabelDefaultHorizontalAlignment,\n rect,\n rotation = 0,\n text,\n theme,\n tnum,\n maxLines = 1,\n verticalAlign = LabelDefaultVerticalAlignment,\n } = props;\n\n const paragraph = useMemo(() => {\n const fontFeatures: SkTextFontFeatures[] = [];\n\n if (tnum) {\n fontFeatures.push(TabularNumsFeature);\n }\n\n const textStyle: SkTextStyle = {\n color: Skia.Color(color ?? theme.colors.text.secondary),\n fontSize: fontSize ?? theme.fontSize.xs,\n fontFeatures,\n };\n\n if (fontFamily) {\n textStyle.fontFamilies = [fontFamily];\n }\n\n if (fontWeight !== undefined) {\n textStyle.fontStyle = { weight: fontWeight };\n }\n\n const result = createParagraphBuilder({\n paragraphStyle: {\n ellipsis: \"\\u2026\",\n maxLines: Math.max(1, Math.floor(maxLines)),\n textAlign: getLabelTextAlign(horizontalAlign),\n },\n typefaceProvider: fontManager,\n })\n .pushStyle(textStyle)\n .addText(text)\n .pop()\n .build();\n\n result.layout(rect.width);\n\n return result;\n }, [\n color,\n fontManager,\n fontFamily,\n fontSize,\n fontWeight,\n horizontalAlign,\n rect.width,\n text,\n theme.colors.text.secondary,\n theme.fontSize.xs,\n tnum,\n maxLines,\n ]);\n\n const rotationProps = useMemo(\n () => ({\n origin: {\n x: rect.x + rect.width / 2,\n y: rect.y + rect.height / 2,\n },\n transform: [{ rotate: (rotation * Math.PI) / 180 }],\n }),\n [rect.height, rect.width, rect.x, rect.y, rotation],\n );\n\n if (!paragraph) {\n return null;\n }\n\n const y = getLabelY(rect, paragraph.getHeight(), verticalAlign);\n\n return (\n <Group origin={rotationProps.origin} transform={rotationProps.transform}>\n <Paragraph paragraph={paragraph} x={rect.x} y={y} width={rect.width} />\n </Group>\n );\n});\n"],"mappings":"AA+GM;AA/GN,SAAS,eAAe;AACxB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAEP,SAAS,YAAY;AAErB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEA,MAAM,QAAQ,KAAK,SAASA,OAAM,OAAmB;AAC1D,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,kBAAkB;AAAA,IAClB;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX,gBAAgB;AAAA,EAClB,IAAI;AAEJ,QAAM,YAAY,QAAQ,MAAM;AAC9B,UAAM,eAAqC,CAAC;AAE5C,QAAI,MAAM;AACR,mBAAa,KAAK,kBAAkB;AAAA,IACtC;AAEA,UAAM,YAAyB;AAAA,MAC7B,OAAO,KAAK,MAAM,SAAS,MAAM,OAAO,KAAK,SAAS;AAAA,MACtD,UAAU,YAAY,MAAM,SAAS;AAAA,MACrC;AAAA,IACF;AAEA,QAAI,YAAY;AACd,gBAAU,eAAe,CAAC,UAAU;AAAA,IACtC;AAEA,QAAI,eAAe,QAAW;AAC5B,gBAAU,YAAY,EAAE,QAAQ,WAAW;AAAA,IAC7C;AAEA,UAAM,SAAS,uBAAuB;AAAA,MACpC,gBAAgB;AAAA,QACd,UAAU;AAAA,QACV,UAAU,KAAK,IAAI,GAAG,KAAK,MAAM,QAAQ,CAAC;AAAA,QAC1C,WAAW,kBAAkB,eAAe;AAAA,MAC9C;AAAA,MACA,kBAAkB;AAAA,IACpB,CAAC,EACE,UAAU,SAAS,EACnB,QAAQ,IAAI,EACZ,IAAI,EACJ,MAAM;AAET,WAAO,OAAO,KAAK,KAAK;AAExB,WAAO;AAAA,EACT,GAAG;AAAA,IACD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,KAAK;AAAA,IACL;AAAA,IACA,MAAM,OAAO,KAAK;AAAA,IAClB,MAAM,SAAS;AAAA,IACf;AAAA,IACA;AAAA,EACF,CAAC;AAED,QAAM,gBAAgB;AAAA,IACpB,OAAO;AAAA,MACL,QAAQ;AAAA,QACN,GAAG,KAAK,IAAI,KAAK,QAAQ;AAAA,QACzB,GAAG,KAAK,IAAI,KAAK,SAAS;AAAA,MAC5B;AAAA,MACA,WAAW,CAAC,EAAE,QAAS,WAAW,KAAK,KAAM,IAAI,CAAC;AAAA,IACpD;AAAA,IACA,CAAC,KAAK,QAAQ,KAAK,OAAO,KAAK,GAAG,KAAK,GAAG,QAAQ;AAAA,EACpD;AAEA,MAAI,CAAC,WAAW;AACd,WAAO;AAAA,EACT;AAEA,QAAM,IAAI,UAAU,MAAM,UAAU,UAAU,GAAG,aAAa;AAE9D,SACE,oBAAC,SAAM,QAAQ,cAAc,QAAQ,WAAW,cAAc,WAC5D,8BAAC,aAAU,WAAsB,GAAG,KAAK,GAAG,GAAM,OAAO,KAAK,OAAO,GACvE;AAEJ,CAAC;","names":["Label"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { b as ChartXValue } from '../../line-chart.types-yxru5uWc.mjs';
|
|
3
|
+
import { LineProps } from '../../types/line.types.mjs';
|
|
4
|
+
import '@shopify/react-native-skia';
|
|
5
|
+
import '../../types/common.types.mjs';
|
|
6
|
+
import '../../types/style.types.mjs';
|
|
7
|
+
import '@impulse-ui-native/theme';
|
|
8
|
+
|
|
9
|
+
declare const Line: <X extends ChartXValue = number>(props: LineProps<X>) => react_jsx_runtime.JSX.Element | null;
|
|
10
|
+
|
|
11
|
+
export { Line };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { DashPathEffect, Path } from "@shopify/react-native-skia";
|
|
4
|
+
import { memo } from "@impulse-ui-native/core";
|
|
5
|
+
import {
|
|
6
|
+
LineDefaultCap,
|
|
7
|
+
LineDefaultColor,
|
|
8
|
+
LineDefaultCurve,
|
|
9
|
+
LineDefaultJoin,
|
|
10
|
+
LineDefaultOpacity,
|
|
11
|
+
LineDefaultWidth
|
|
12
|
+
} from "../../constants";
|
|
13
|
+
import { createLinePath } from "../../utils";
|
|
14
|
+
const Line = memo(function Line2(props) {
|
|
15
|
+
const {
|
|
16
|
+
cap = LineDefaultCap,
|
|
17
|
+
color = LineDefaultColor,
|
|
18
|
+
coordinates,
|
|
19
|
+
curve = LineDefaultCurve,
|
|
20
|
+
dash,
|
|
21
|
+
join = LineDefaultJoin,
|
|
22
|
+
opacity = LineDefaultOpacity,
|
|
23
|
+
visible = true,
|
|
24
|
+
width = LineDefaultWidth
|
|
25
|
+
} = props;
|
|
26
|
+
const path = useMemo(
|
|
27
|
+
() => createLinePath(coordinates, curve),
|
|
28
|
+
[coordinates, curve]
|
|
29
|
+
);
|
|
30
|
+
if (!visible || !path) {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
return /* @__PURE__ */ jsx(
|
|
34
|
+
Path,
|
|
35
|
+
{
|
|
36
|
+
path,
|
|
37
|
+
color,
|
|
38
|
+
opacity,
|
|
39
|
+
strokeWidth: width,
|
|
40
|
+
style: "stroke",
|
|
41
|
+
strokeCap: cap,
|
|
42
|
+
strokeJoin: join,
|
|
43
|
+
children: dash?.length ? /* @__PURE__ */ jsx(DashPathEffect, { intervals: [...dash] }) : null
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
});
|
|
47
|
+
export {
|
|
48
|
+
Line
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=line.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/primitives/line.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport { DashPathEffect, Path } from \"@shopify/react-native-skia\";\n\nimport { memo } from \"@impulse-ui-native/core\";\n\nimport {\n LineDefaultCap,\n LineDefaultColor,\n LineDefaultCurve,\n LineDefaultJoin,\n LineDefaultOpacity,\n LineDefaultWidth,\n} from \"../../constants\";\nimport { ChartXValue, LineProps } from \"../../types\";\nimport { createLinePath } from \"../../utils\";\n\nexport const Line = memo(function Line<X extends ChartXValue = number>(\n props: LineProps<X>,\n) {\n const {\n cap = LineDefaultCap,\n color = LineDefaultColor,\n coordinates,\n curve = LineDefaultCurve,\n dash,\n join = LineDefaultJoin,\n opacity = LineDefaultOpacity,\n visible = true,\n width = LineDefaultWidth,\n } = props;\n\n const path = useMemo(\n () => createLinePath(coordinates, curve),\n [coordinates, curve],\n );\n\n if (!visible || !path) {\n return null;\n }\n\n return (\n <Path\n path={path}\n color={color}\n opacity={opacity}\n strokeWidth={width}\n style=\"stroke\"\n strokeCap={cap}\n strokeJoin={join}\n >\n {dash?.length ? <DashPathEffect intervals={[...dash]} /> : null}\n </Path>\n );\n});\n"],"mappings":"AAkDsB;AAlDtB,SAAS,eAAe;AACxB,SAAS,gBAAgB,YAAY;AAErC,SAAS,YAAY;AAErB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,sBAAsB;AAExB,MAAM,OAAO,KAAK,SAASA,MAChC,OACA;AACA,QAAM;AAAA,IACJ,MAAM;AAAA,IACN,QAAQ;AAAA,IACR;AAAA,IACA,QAAQ;AAAA,IACR;AAAA,IACA,OAAO;AAAA,IACP,UAAU;AAAA,IACV,UAAU;AAAA,IACV,QAAQ;AAAA,EACV,IAAI;AAEJ,QAAM,OAAO;AAAA,IACX,MAAM,eAAe,aAAa,KAAK;AAAA,IACvC,CAAC,aAAa,KAAK;AAAA,EACrB;AAEA,MAAI,CAAC,WAAW,CAAC,MAAM;AACrB,WAAO;AAAA,EACT;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA,aAAa;AAAA,MACb,OAAM;AAAA,MACN,WAAW;AAAA,MACX,YAAY;AAAA,MAEX,gBAAM,SAAS,oBAAC,kBAAe,WAAW,CAAC,GAAG,IAAI,GAAG,IAAK;AAAA;AAAA,EAC7D;AAEJ,CAAC;","names":["Line"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { XAxisProps } from '../../types/axis.types.mjs';
|
|
3
|
+
import { b as ChartXValue } from '../../line-chart.types-yxru5uWc.mjs';
|
|
4
|
+
import '@shopify/react-native-skia';
|
|
5
|
+
import '@impulse-ui-native/theme';
|
|
6
|
+
import '../../types/common.types.mjs';
|
|
7
|
+
import '../../types/style.types.mjs';
|
|
8
|
+
|
|
9
|
+
declare const XAxis: <X extends ChartXValue = number>(props: XAxisProps<X>) => react_jsx_runtime.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { XAxis };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment, useMemo } from "react";
|
|
3
|
+
import {
|
|
4
|
+
DashPathEffect,
|
|
5
|
+
Group,
|
|
6
|
+
Line as SkiaLine
|
|
7
|
+
} from "@shopify/react-native-skia";
|
|
8
|
+
import { memo } from "@impulse-ui-native/core";
|
|
9
|
+
import {
|
|
10
|
+
AxisDefaultLabelGap,
|
|
11
|
+
AxisDefaultOpacity,
|
|
12
|
+
AxisDefaultTickLength,
|
|
13
|
+
AxisDefaultWidth
|
|
14
|
+
} from "../../constants";
|
|
15
|
+
import { createXAxisLayout, formatAxisTick } from "../../utils";
|
|
16
|
+
import { Label } from "./label";
|
|
17
|
+
const XAxis = memo(function XAxis2(props) {
|
|
18
|
+
const {
|
|
19
|
+
fontManager,
|
|
20
|
+
lineVisible = true,
|
|
21
|
+
options,
|
|
22
|
+
plot,
|
|
23
|
+
region,
|
|
24
|
+
scale,
|
|
25
|
+
theme,
|
|
26
|
+
ticks,
|
|
27
|
+
tickVisible = true
|
|
28
|
+
} = props;
|
|
29
|
+
const line = options?.line;
|
|
30
|
+
const tick = options?.tick;
|
|
31
|
+
const label = options?.label;
|
|
32
|
+
const tickLength = tick?.length ?? AxisDefaultTickLength;
|
|
33
|
+
const labelGap = label?.gap ?? AxisDefaultLabelGap;
|
|
34
|
+
const fontSize = label?.fontSize ?? theme.fontSize.xs;
|
|
35
|
+
const layout = useMemo(
|
|
36
|
+
() => createXAxisLayout({
|
|
37
|
+
values: ticks,
|
|
38
|
+
scale,
|
|
39
|
+
plot,
|
|
40
|
+
region,
|
|
41
|
+
tickLength,
|
|
42
|
+
labelGap
|
|
43
|
+
}),
|
|
44
|
+
[labelGap, plot, region, scale, tickLength, ticks]
|
|
45
|
+
);
|
|
46
|
+
return /* @__PURE__ */ jsxs(Group, { children: [
|
|
47
|
+
lineVisible && line?.visible !== false ? /* @__PURE__ */ jsx(
|
|
48
|
+
SkiaLine,
|
|
49
|
+
{
|
|
50
|
+
p1: layout.line.start,
|
|
51
|
+
p2: layout.line.end,
|
|
52
|
+
color: line?.color ?? theme.colors.border.default.value,
|
|
53
|
+
opacity: line?.opacity ?? AxisDefaultOpacity,
|
|
54
|
+
strokeWidth: line?.width ?? AxisDefaultWidth,
|
|
55
|
+
children: line?.dash?.length ? /* @__PURE__ */ jsx(DashPathEffect, { intervals: [...line.dash] }) : null
|
|
56
|
+
}
|
|
57
|
+
) : null,
|
|
58
|
+
layout.ticks.map((tick2, index) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
59
|
+
tickVisible && options?.tick?.visible !== false ? /* @__PURE__ */ jsx(
|
|
60
|
+
SkiaLine,
|
|
61
|
+
{
|
|
62
|
+
p1: tick2.start,
|
|
63
|
+
p2: tick2.end,
|
|
64
|
+
color: options?.tick?.color ?? theme.colors.border.default.value,
|
|
65
|
+
opacity: options?.tick?.opacity ?? AxisDefaultOpacity,
|
|
66
|
+
strokeWidth: options?.tick?.width ?? AxisDefaultWidth,
|
|
67
|
+
children: options?.tick?.dash?.length ? /* @__PURE__ */ jsx(DashPathEffect, { intervals: [...options.tick.dash] }) : null
|
|
68
|
+
}
|
|
69
|
+
) : null,
|
|
70
|
+
label?.visible !== false ? /* @__PURE__ */ jsx(
|
|
71
|
+
Label,
|
|
72
|
+
{
|
|
73
|
+
text: formatAxisTick(tick2.value, options?.format),
|
|
74
|
+
rect: tick2.labelRect,
|
|
75
|
+
horizontalAlign: "center",
|
|
76
|
+
color: label?.color,
|
|
77
|
+
fontSize,
|
|
78
|
+
fontFamily: label?.fontFamily,
|
|
79
|
+
fontWeight: label?.fontWeight,
|
|
80
|
+
fontManager,
|
|
81
|
+
maxLines: label?.maxLines,
|
|
82
|
+
rotation: label?.rotation,
|
|
83
|
+
theme,
|
|
84
|
+
tnum: typeof tick2.value === "number"
|
|
85
|
+
}
|
|
86
|
+
) : null
|
|
87
|
+
] }, `${String(tick2.value)}-${index}`))
|
|
88
|
+
] });
|
|
89
|
+
});
|
|
90
|
+
export {
|
|
91
|
+
XAxis
|
|
92
|
+
};
|
|
93
|
+
//# sourceMappingURL=x-axis.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/primitives/x-axis.tsx"],"sourcesContent":["import { Fragment, useMemo } from \"react\";\nimport {\n DashPathEffect,\n Group,\n Line as SkiaLine,\n} from \"@shopify/react-native-skia\";\n\nimport { memo } from \"@impulse-ui-native/core\";\n\nimport {\n AxisDefaultLabelGap,\n AxisDefaultOpacity,\n AxisDefaultTickLength,\n AxisDefaultWidth,\n} from \"../../constants\";\nimport { ChartXValue, XAxisProps } from \"../../types\";\nimport { createXAxisLayout, formatAxisTick } from \"../../utils\";\nimport { Label } from \"./label\";\n\nexport const XAxis = memo(function XAxis<X extends ChartXValue = number>(\n props: XAxisProps<X>,\n) {\n const {\n fontManager,\n lineVisible = true,\n options,\n plot,\n region,\n scale,\n theme,\n ticks,\n tickVisible = true,\n } = props;\n\n const line = options?.line;\n const tick = options?.tick;\n const label = options?.label;\n const tickLength = tick?.length ?? AxisDefaultTickLength;\n const labelGap = label?.gap ?? AxisDefaultLabelGap;\n const fontSize = label?.fontSize ?? theme.fontSize.xs;\n\n const layout = useMemo(\n () =>\n createXAxisLayout({\n values: ticks,\n scale,\n plot,\n region,\n tickLength,\n labelGap,\n }),\n [labelGap, plot, region, scale, tickLength, ticks],\n );\n\n return (\n <Group>\n {lineVisible && line?.visible !== false ? (\n <SkiaLine\n p1={layout.line.start}\n p2={layout.line.end}\n color={line?.color ?? theme.colors.border.default.value}\n opacity={line?.opacity ?? AxisDefaultOpacity}\n strokeWidth={line?.width ?? AxisDefaultWidth}\n >\n {line?.dash?.length ? (\n <DashPathEffect intervals={[...line.dash]} />\n ) : null}\n </SkiaLine>\n ) : null}\n\n {layout.ticks.map((tick, index) => (\n <Fragment key={`${String(tick.value)}-${index}`}>\n {tickVisible && options?.tick?.visible !== false ? (\n <SkiaLine\n p1={tick.start}\n p2={tick.end}\n color={options?.tick?.color ?? theme.colors.border.default.value}\n opacity={options?.tick?.opacity ?? AxisDefaultOpacity}\n strokeWidth={options?.tick?.width ?? AxisDefaultWidth}\n >\n {options?.tick?.dash?.length ? (\n <DashPathEffect intervals={[...options.tick.dash]} />\n ) : null}\n </SkiaLine>\n ) : null}\n {label?.visible !== false ? (\n <Label\n text={formatAxisTick(tick.value, options?.format)}\n rect={tick.labelRect}\n horizontalAlign=\"center\"\n color={label?.color}\n fontSize={fontSize}\n fontFamily={label?.fontFamily}\n fontWeight={label?.fontWeight}\n fontManager={fontManager}\n maxLines={label?.maxLines}\n rotation={label?.rotation}\n theme={theme}\n tnum={typeof tick.value === \"number\"}\n />\n ) : null}\n </Fragment>\n ))}\n </Group>\n );\n});\n"],"mappings":"AAiEY,cAMJ,YANI;AAjEZ,SAAS,UAAU,eAAe;AAClC;AAAA,EACE;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,OACH;AAEP,SAAS,YAAY;AAErB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,mBAAmB,sBAAsB;AAClD,SAAS,aAAa;AAEf,MAAM,QAAQ,KAAK,SAASA,OACjC,OACA;AACA,QAAM;AAAA,IACJ;AAAA,IACA,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,cAAc;AAAA,EAChB,IAAI;AAEJ,QAAM,OAAO,SAAS;AACtB,QAAM,OAAO,SAAS;AACtB,QAAM,QAAQ,SAAS;AACvB,QAAM,aAAa,MAAM,UAAU;AACnC,QAAM,WAAW,OAAO,OAAO;AAC/B,QAAM,WAAW,OAAO,YAAY,MAAM,SAAS;AAEnD,QAAM,SAAS;AAAA,IACb,MACE,kBAAkB;AAAA,MAChB,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAAA,IACH,CAAC,UAAU,MAAM,QAAQ,OAAO,YAAY,KAAK;AAAA,EACnD;AAEA,SACE,qBAAC,SACE;AAAA,mBAAe,MAAM,YAAY,QAChC;AAAA,MAAC;AAAA;AAAA,QACC,IAAI,OAAO,KAAK;AAAA,QAChB,IAAI,OAAO,KAAK;AAAA,QAChB,OAAO,MAAM,SAAS,MAAM,OAAO,OAAO,QAAQ;AAAA,QAClD,SAAS,MAAM,WAAW;AAAA,QAC1B,aAAa,MAAM,SAAS;AAAA,QAE3B,gBAAM,MAAM,SACX,oBAAC,kBAAe,WAAW,CAAC,GAAG,KAAK,IAAI,GAAG,IACzC;AAAA;AAAA,IACN,IACE;AAAA,IAEH,OAAO,MAAM,IAAI,CAACC,OAAM,UACvB,qBAAC,YACE;AAAA,qBAAe,SAAS,MAAM,YAAY,QACzC;AAAA,QAAC;AAAA;AAAA,UACC,IAAIA,MAAK;AAAA,UACT,IAAIA,MAAK;AAAA,UACT,OAAO,SAAS,MAAM,SAAS,MAAM,OAAO,OAAO,QAAQ;AAAA,UAC3D,SAAS,SAAS,MAAM,WAAW;AAAA,UACnC,aAAa,SAAS,MAAM,SAAS;AAAA,UAEpC,mBAAS,MAAM,MAAM,SACpB,oBAAC,kBAAe,WAAW,CAAC,GAAG,QAAQ,KAAK,IAAI,GAAG,IACjD;AAAA;AAAA,MACN,IACE;AAAA,MACH,OAAO,YAAY,QAClB;AAAA,QAAC;AAAA;AAAA,UACC,MAAM,eAAeA,MAAK,OAAO,SAAS,MAAM;AAAA,UAChD,MAAMA,MAAK;AAAA,UACX,iBAAgB;AAAA,UAChB,OAAO,OAAO;AAAA,UACd;AAAA,UACA,YAAY,OAAO;AAAA,UACnB,YAAY,OAAO;AAAA,UACnB;AAAA,UACA,UAAU,OAAO;AAAA,UACjB,UAAU,OAAO;AAAA,UACjB;AAAA,UACA,MAAM,OAAOA,MAAK,UAAU;AAAA;AAAA,MAC9B,IACE;AAAA,SA7BS,GAAG,OAAOA,MAAK,KAAK,CAAC,IAAI,KAAK,EA8B7C,CACD;AAAA,KACH;AAEJ,CAAC;","names":["XAxis","tick"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { YAxisProps } from '../../types/axis.types.mjs';
|
|
3
|
+
import '@shopify/react-native-skia';
|
|
4
|
+
import '@impulse-ui-native/theme';
|
|
5
|
+
import '../../types/common.types.mjs';
|
|
6
|
+
import '../../types/style.types.mjs';
|
|
7
|
+
import '../../line-chart.types-yxru5uWc.mjs';
|
|
8
|
+
|
|
9
|
+
declare const YAxis: (props: YAxisProps) => react_jsx_runtime.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { YAxis };
|