@foodpilot/foods 2.5.2 → 2.5.4
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/Legend/Legend.d.ts +1 -0
- package/dist/components/Chart/Legend/LegendBottom.d.ts +1 -0
- package/dist/components/Chart/Legend/LegendRight.d.ts +1 -0
- package/dist/components/Chart/Legend/utils.d.ts +1 -0
- package/dist/components/Chart/PolymorphicChart/PolymorphicChart.d.ts +7 -0
- package/dist/components/Chart/PolymorphicChart/index.d.ts +1 -1
- package/dist/components/Chart/WaterfallChart/WaterfallLegend/WaterfallLegend.d.ts +1 -0
- package/dist/components/Chart/WaterfallChart/WaterfallLegend/useBuildLegendBlocks.d.ts +1 -0
- package/dist/main.js +20767 -20596
- package/dist/main.umd.cjs +154 -154
- package/package.json +1 -1
|
@@ -15,6 +15,7 @@ export type ChartLegendProps = {
|
|
|
15
15
|
isLoading?: boolean;
|
|
16
16
|
maxScore?: number | number[];
|
|
17
17
|
separator?: string;
|
|
18
|
+
threshold?: number;
|
|
18
19
|
valuesFormatterFn?: (value: number, precision?: number) => string;
|
|
19
20
|
};
|
|
20
21
|
export declare const Legend: (props: ChartLegendProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -15,6 +15,7 @@ type ChartLegendVariantProps = {
|
|
|
15
15
|
isLoading?: boolean;
|
|
16
16
|
maxScore?: number | number[];
|
|
17
17
|
separator?: string;
|
|
18
|
+
threshold?: number;
|
|
18
19
|
valuesFormatterFn?: (value: number, precision?: number) => string;
|
|
19
20
|
};
|
|
20
21
|
export declare const LegendBottom: (props: ChartLegendVariantProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -15,6 +15,7 @@ type ChartLegendVariantProps = {
|
|
|
15
15
|
isLoading?: boolean;
|
|
16
16
|
maxScore?: number | number[];
|
|
17
17
|
separator?: string;
|
|
18
|
+
threshold?: number;
|
|
18
19
|
valuesFormatterFn?: (value: number, precision?: number) => string;
|
|
19
20
|
};
|
|
20
21
|
export declare const LegendRight: (props: ChartLegendVariantProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,3 +5,4 @@ export declare const createPalette: (colors: Property.Color[], values: number[])
|
|
|
5
5
|
export declare const createDistribution: (values: number[]) => number[];
|
|
6
6
|
export declare const dispatchMouseEventOnChart: (element: HTMLElement | null, x: number, y: number) => void;
|
|
7
7
|
export declare const dispatchMouseLeaveOnChart: (element: HTMLElement | null) => void;
|
|
8
|
+
export declare const formatPercentage: (percentage: number, threshold?: number) => string;
|
|
@@ -3,6 +3,12 @@ import { TypographyProps } from '@mui/material';
|
|
|
3
3
|
import { Property } from 'csstype';
|
|
4
4
|
import { ChartLegend } from '../Legend';
|
|
5
5
|
export type ChartType = "donut" | "bar" | "line" | "pie" | "radar" | "table" | "raw";
|
|
6
|
+
export type AggregationOptions = {
|
|
7
|
+
showAggregateToggle?: boolean;
|
|
8
|
+
aggregateToggleLabel?: string;
|
|
9
|
+
othersCategoryLabel?: string;
|
|
10
|
+
othersThresholdPercent?: number;
|
|
11
|
+
};
|
|
6
12
|
export type PolymorphicChartProps = {
|
|
7
13
|
chartType: ChartType;
|
|
8
14
|
values?: number[];
|
|
@@ -28,5 +34,6 @@ export type PolymorphicChartProps = {
|
|
|
28
34
|
height?: number;
|
|
29
35
|
maxScore?: number | number[];
|
|
30
36
|
separator?: string;
|
|
37
|
+
aggregation?: AggregationOptions;
|
|
31
38
|
};
|
|
32
39
|
export declare const PolymorphicChart: (props: PolymorphicChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { PolymorphicChart } from './PolymorphicChart';
|
|
2
|
-
export type { PolymorphicChartProps, ChartType } from './PolymorphicChart';
|
|
2
|
+
export type { PolymorphicChartProps, ChartType, AggregationOptions } from './PolymorphicChart';
|
|
3
3
|
export { PolymorphicChartRenderer } from './PolymorphicChartRenderer';
|
|
@@ -9,5 +9,6 @@ export interface WaterfallLegendProps {
|
|
|
9
9
|
improvement: Improvement;
|
|
10
10
|
unit?: string;
|
|
11
11
|
precision?: number;
|
|
12
|
+
valueFormatterFn?: (value: number) => string;
|
|
12
13
|
}
|
|
13
14
|
export declare const WaterfallLegend: (props: WaterfallLegendProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -10,6 +10,7 @@ interface BuildLegendBlocksParams {
|
|
|
10
10
|
color?: string;
|
|
11
11
|
textOptions?: TextOptions;
|
|
12
12
|
precision?: number;
|
|
13
|
+
valueFormatterFn?: (value: number, precision?: number) => string;
|
|
13
14
|
}
|
|
14
15
|
export declare const useBuildLegendBlocks: (params: BuildLegendBlocksParams) => LegendBlock[];
|
|
15
16
|
export {};
|