@foodpilot/foods 2.11.22 → 2.11.23
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/Chart/WaterfallChart/WaterfallChart.d.ts +3 -0
- package/dist/components/Chart/WaterfallChart/WaterfallChart.js +4 -2
- package/dist/components/Chart/WaterfallChart/WaterfallChartCore.d.ts +3 -0
- package/dist/components/Chart/WaterfallChart/WaterfallChartCore.js +3 -2
- package/package.json +1 -1
|
@@ -37,5 +37,8 @@ export type WaterfallChartProps = {
|
|
|
37
37
|
valueFormatterFn?: (value: number, precision?: number) => string;
|
|
38
38
|
precision?: number;
|
|
39
39
|
sx?: SxProps<Theme>;
|
|
40
|
+
CoreOverride?: {
|
|
41
|
+
XAxisHeight?: number;
|
|
42
|
+
};
|
|
40
43
|
};
|
|
41
44
|
export declare const WaterfallChart: (props: WaterfallChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -20,7 +20,8 @@ const WaterfallChart = (props) => {
|
|
|
20
20
|
textOptions,
|
|
21
21
|
showLegend = true,
|
|
22
22
|
valueFormatterFn = theme.numbers.valueFormatterFn,
|
|
23
|
-
sx
|
|
23
|
+
sx,
|
|
24
|
+
CoreOverride
|
|
24
25
|
} = props;
|
|
25
26
|
const rawValues = useMemo(
|
|
26
27
|
() => (values == null ? void 0 : values.length) ? values.map((v) => v.value).filter((value) => value !== null) : null,
|
|
@@ -71,7 +72,8 @@ const WaterfallChart = (props) => {
|
|
|
71
72
|
improvement,
|
|
72
73
|
targetValueFinal: (target == null ? void 0 : target.value) ?? ((start == null ? void 0 : start.value) ?? (reference == null ? void 0 : reference.value) ?? 0) + (actionsTotalValue ?? 0),
|
|
73
74
|
valueFormatterFn,
|
|
74
|
-
precision: forcedPrecision
|
|
75
|
+
precision: forcedPrecision,
|
|
76
|
+
CoreOverride
|
|
75
77
|
}
|
|
76
78
|
)
|
|
77
79
|
}
|
|
@@ -13,5 +13,8 @@ export type WaterfallChartCoreProps = {
|
|
|
13
13
|
targetValueFinal?: number;
|
|
14
14
|
valueFormatterFn?: (value: number, precision?: number) => string;
|
|
15
15
|
precision?: number;
|
|
16
|
+
CoreOverride?: {
|
|
17
|
+
XAxisHeight?: number;
|
|
18
|
+
};
|
|
16
19
|
};
|
|
17
20
|
export declare const WaterfallChartCore: (props: WaterfallChartCoreProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -28,7 +28,8 @@ const WaterfallChartCore = (props) => {
|
|
|
28
28
|
improvement,
|
|
29
29
|
targetValueFinal,
|
|
30
30
|
valueFormatterFn = theme.numbers.valueFormatterFn,
|
|
31
|
-
precision
|
|
31
|
+
precision,
|
|
32
|
+
CoreOverride
|
|
32
33
|
} = props;
|
|
33
34
|
const containerRef = useRef(null);
|
|
34
35
|
const FALLBACK_CHART_WIDTH = 800;
|
|
@@ -86,7 +87,7 @@ const WaterfallChartCore = (props) => {
|
|
|
86
87
|
interval: labelSettings.interval,
|
|
87
88
|
tickLine: false,
|
|
88
89
|
padding: { left: 0, right: 0 },
|
|
89
|
-
height: AXIS_HEIGHT
|
|
90
|
+
height: (CoreOverride == null ? void 0 : CoreOverride.XAxisHeight) ?? AXIS_HEIGHT
|
|
90
91
|
}
|
|
91
92
|
),
|
|
92
93
|
/* @__PURE__ */ jsx(
|