@aveonline/ui-react 2.19.8 → 2.19.9
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.
|
@@ -1,16 +1,24 @@
|
|
|
1
|
-
import { XAxisProps } from 'recharts';
|
|
1
|
+
import { XAxisProps, YAxisProps } from 'recharts';
|
|
2
2
|
import { CurveType } from 'recharts/types/shape/Curve';
|
|
3
3
|
export interface ILineConfig {
|
|
4
4
|
dataKey: string;
|
|
5
5
|
stroke: string;
|
|
6
6
|
}
|
|
7
|
+
export interface IPercentageData {
|
|
8
|
+
dataKey: string;
|
|
9
|
+
percentage: number;
|
|
10
|
+
}
|
|
7
11
|
export interface IPropsLine<T> {
|
|
8
12
|
data: T[];
|
|
9
13
|
width: number;
|
|
10
14
|
height: number;
|
|
11
15
|
xaxis: XAxisProps;
|
|
16
|
+
yaxis: YAxisProps;
|
|
12
17
|
type?: CurveType;
|
|
13
18
|
strokeDasharray?: string;
|
|
14
19
|
linesConfig: ILineConfig[];
|
|
15
20
|
isLoading?: boolean;
|
|
21
|
+
yAxisTickFormatter?: (tick: number) => string;
|
|
22
|
+
percentageData?: IPercentageData[];
|
|
23
|
+
simbol?: string;
|
|
16
24
|
}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import { IPropsLine } from './ILine';
|
|
2
|
-
export default function Line<T>({ data, width, height, linesConfig, xaxis, type, strokeDasharray, isLoading }: IPropsLine<T>
|
|
2
|
+
export default function Line<T>({ data, width, height, linesConfig, xaxis, yaxis, type, strokeDasharray, isLoading, simbol, yAxisTickFormatter }: IPropsLine<T> & {
|
|
3
|
+
yAxisTickFormatter?: (tick: number) => string;
|
|
4
|
+
simbol?: string;
|
|
5
|
+
}): JSX.Element;
|
package/dist/ui-react.mjs
CHANGED
|
@@ -41850,23 +41850,26 @@ function Kue({
|
|
|
41850
41850
|
height: n,
|
|
41851
41851
|
linesConfig: r,
|
|
41852
41852
|
xaxis: i,
|
|
41853
|
-
|
|
41854
|
-
|
|
41855
|
-
|
|
41853
|
+
yaxis: a,
|
|
41854
|
+
type: o = "linear",
|
|
41855
|
+
strokeDasharray: s = "3 3",
|
|
41856
|
+
isLoading: l = !1,
|
|
41857
|
+
simbol: u,
|
|
41858
|
+
yAxisTickFormatter: c = (f) => `${f}` || `${u}`
|
|
41856
41859
|
}) {
|
|
41857
|
-
return
|
|
41858
|
-
/* @__PURE__ */ m.jsx(lc, { strokeDasharray:
|
|
41860
|
+
return l ? /* @__PURE__ */ m.jsx("div", { className: "flex flex-col items-center gap-y-3 justify-center text-center rounded-b-sm border-border-subdued", children: /* @__PURE__ */ m.jsx("div", { className: "py-8", children: /* @__PURE__ */ m.jsx(ya, { size: "lg" }) }) }) : /* @__PURE__ */ m.jsxs(Yie, { width: t, height: n, data: e, children: [
|
|
41861
|
+
/* @__PURE__ */ m.jsx(lc, { strokeDasharray: s }),
|
|
41859
41862
|
/* @__PURE__ */ m.jsx(gi, { ...i }),
|
|
41860
|
-
/* @__PURE__ */ m.jsx(hi, {}),
|
|
41861
|
-
/* @__PURE__ */ m.jsx(ti, {}),
|
|
41862
|
-
r.map((
|
|
41863
|
+
/* @__PURE__ */ m.jsx(hi, { ...a, tickFormatter: c }),
|
|
41864
|
+
/* @__PURE__ */ m.jsx(ti, { formatter: (f) => `${f} ${u}` }),
|
|
41865
|
+
r.map((f, d) => /* @__PURE__ */ m.jsx(
|
|
41863
41866
|
uc,
|
|
41864
41867
|
{
|
|
41865
|
-
type:
|
|
41866
|
-
dataKey:
|
|
41867
|
-
stroke:
|
|
41868
|
+
type: o,
|
|
41869
|
+
dataKey: f.dataKey,
|
|
41870
|
+
stroke: f.stroke
|
|
41868
41871
|
},
|
|
41869
|
-
|
|
41872
|
+
d
|
|
41870
41873
|
))
|
|
41871
41874
|
] });
|
|
41872
41875
|
}
|