@vizzly/dashboard 0.14.4-dev-97acb8d43347ac757049612930b3f8e69e913e55 → 0.14.4-dev-3455fe16fbb312a7c23a46cc2f4bcf62b52bb944
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/charts/src/v2/components/Axis/AxisLeft.d.ts +2 -1
- package/dist/charts/src/v2/components/BarChart/BarChart.d.ts +18 -2
- package/dist/charts/src/v2/components/BarChart/useBarXScale.d.ts +2 -0
- package/dist/charts/src/v2/components/ComboChart/ComboChart.d.ts +22 -0
- package/dist/charts/src/v2/components/Legend/Legend.d.ts +7 -5
- package/dist/charts/src/v2/components/LineChart/LineChart.d.ts +16 -1
- package/dist/charts/src/v2/components/Tooltip/Tooltip.d.ts +6 -4
- package/dist/charts/src/v2/components/hooks/useFlattenedData.d.ts +3 -8
- package/dist/charts/src/v2/components/hooks/useYScale.d.ts +2 -0
- package/dist/charts/src/v2/constants/PADDING.d.ts +4 -0
- package/dist/charts/src/v2/{components/BarChart → utils}/getBarFill.d.ts +2 -2
- package/dist/dashboard.cjs.development.js +356 -309
- package/dist/dashboard.cjs.production.min.js +1 -1
- package/dist/dashboard.esm.js +361 -314
- package/dist/shared-logic/src/ChartsV2/types.d.ts +8 -7
- package/dist/shared-logic/src/ComboChartV2/types.d.ts +15 -0
- package/dist/shared-logic/src/FeatureToggle/types.d.ts +0 -3
- package/package.json +1 -1
|
@@ -3,9 +3,10 @@ import { Margin } from '../../utils/buildMargin';
|
|
|
3
3
|
import { BaseYAxis } from '../../../../../shared-logic/src/ChartsV2/types';
|
|
4
4
|
import { ScaleLinear } from '@visx/vendor/d3-scale';
|
|
5
5
|
import { ChartThemeCSS } from '../../utils/getChartThemeCSS';
|
|
6
|
+
import { ComboYAxis } from '../../../../../shared-logic/src/ComboChartV2/types';
|
|
6
7
|
export declare const AxisLeft: FunctionComponent<{
|
|
7
8
|
show: boolean;
|
|
8
|
-
y: BaseYAxis;
|
|
9
|
+
y: BaseYAxis | ComboYAxis;
|
|
9
10
|
margin: Margin;
|
|
10
11
|
stroke?: string;
|
|
11
12
|
yScale: ScaleLinear<number, number, never>;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { BarChartRepresentation } from '../../../../../shared-logic/src/BarChartV2/types';
|
|
2
|
+
import { BarChartRepresentation, BarStyles } from '../../../../../shared-logic/src/BarChartV2/types';
|
|
3
3
|
import { ChartTheme } from '../../../types';
|
|
4
|
-
import {
|
|
4
|
+
import { DataType } from '../../../../../shared-logic/src/Field/types';
|
|
5
|
+
import { ChartDataDefinition, ChartOnViewClick, ConditionalFormattingRule, ShapeDefinition } from '../../../../../shared-logic/src/ChartsV2/types';
|
|
6
|
+
import { ScaleLinear, ScaleBand } from '@visx/vendor/d3-scale';
|
|
5
7
|
export declare type BarChartProps = {
|
|
6
8
|
width: number;
|
|
7
9
|
height: number;
|
|
@@ -21,3 +23,17 @@ export declare type BarChartProps = {
|
|
|
21
23
|
enableHover?: boolean;
|
|
22
24
|
};
|
|
23
25
|
export declare const BarChart: ({ chart, width, height, options, theme, onClick, enableHover }: BarChartProps) => JSX.Element;
|
|
26
|
+
export declare function BarGroup({ data, keys, height, xKey, xScaleDataType, xScale, innerXScale, yScale, onClick, conditionalFormattingRules, bars, enableHover, }: {
|
|
27
|
+
data: ChartDataDefinition[];
|
|
28
|
+
keys: string[];
|
|
29
|
+
height: number;
|
|
30
|
+
xKey: string;
|
|
31
|
+
xScaleDataType: DataType;
|
|
32
|
+
xScale: ScaleBand<string> | ScaleBand<Date> | ScaleBand<number> | null;
|
|
33
|
+
innerXScale: ScaleBand<string> | undefined;
|
|
34
|
+
yScale: ScaleLinear<number, number, never>;
|
|
35
|
+
onClick: (e: React.MouseEvent<SVGRectElement, MouseEvent>, barGroup: any, bar: any) => void;
|
|
36
|
+
conditionalFormattingRules: ConditionalFormattingRule[];
|
|
37
|
+
bars: ShapeDefinition<BarStyles>[];
|
|
38
|
+
enableHover?: boolean;
|
|
39
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { Datum } from '../../../../../shared-logic/src/DatumKey';
|
|
2
|
+
export declare function useBarXScale(xScaleDataType: string, innerWidth: number, xScaleKey: string | null, data: Datum[]): import("@visx/vendor/d3-scale").ScaleBand<number> | import("@visx/vendor/d3-scale").ScaleBand<string> | import("@visx/vendor/d3-scale").ScaleBand<Date> | null;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ChartTheme } from '../../../types';
|
|
3
|
+
import { ChartOnViewClick } from '../../../../../shared-logic/src/ChartsV2/types';
|
|
4
|
+
import { ComboChartRepresentation } from '../../../../../shared-logic/src/ComboChartV2/types';
|
|
5
|
+
export declare type ComboChartProps = {
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
theme?: ChartTheme;
|
|
9
|
+
chart: ComboChartRepresentation;
|
|
10
|
+
options: {
|
|
11
|
+
showRoundedTotal: boolean;
|
|
12
|
+
showLegend: boolean;
|
|
13
|
+
removeStroke: boolean;
|
|
14
|
+
axis: {
|
|
15
|
+
showXAxisLabels: boolean;
|
|
16
|
+
showYAxisLabels: boolean;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
onClick: (params: ChartOnViewClick) => void;
|
|
20
|
+
enableHover?: boolean;
|
|
21
|
+
};
|
|
22
|
+
export declare const ComboChart: ({ chart, width, height, options, theme, onClick }: ComboChartProps) => JSX.Element;
|
|
@@ -4,14 +4,16 @@ import { BarStyles } from '../../../../../shared-logic/src/BarChartV2/types';
|
|
|
4
4
|
import { LineStyles } from '../../../../../shared-logic/src/LineChartV2/types';
|
|
5
5
|
import { AreaStyles } from '../../../../../shared-logic/src/AreaChartV2/types';
|
|
6
6
|
interface LegendProps<T> {
|
|
7
|
-
setVisibleYKeys
|
|
8
|
-
visibleYKeys: Array<string>;
|
|
7
|
+
setVisibleYKeys?: React.Dispatch<React.SetStateAction<Array<string>>>;
|
|
9
8
|
keys: {
|
|
10
9
|
[key: string]: Key;
|
|
11
10
|
};
|
|
12
|
-
legendItems: Array<ShapeDefinition<T>>;
|
|
13
|
-
conditionalFormattingRules: Array<ConditionalFormattingRule>;
|
|
14
11
|
marginLeft: number;
|
|
12
|
+
items?: {
|
|
13
|
+
legendItems: Array<ShapeDefinition<T>>;
|
|
14
|
+
visibleYKeys: Array<string>;
|
|
15
|
+
conditionalFormattingRules: Array<ConditionalFormattingRule>;
|
|
16
|
+
}[];
|
|
15
17
|
}
|
|
16
|
-
export declare const Legend: ({ keys,
|
|
18
|
+
export declare const Legend: ({ keys, setVisibleYKeys, marginLeft, items, }: LegendProps<BarStyles | LineStyles | AreaStyles>) => JSX.Element;
|
|
17
19
|
export {};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ChartTheme } from '../../../types';
|
|
3
|
-
import { LineChartRepresentation } from '../../../../../shared-logic/src/LineChartV2/types';
|
|
3
|
+
import { LineChartRepresentation, LineStyles } from '../../../../../shared-logic/src/LineChartV2/types';
|
|
4
|
+
import { DataType } from '../../../../../shared-logic/src/Field/types';
|
|
5
|
+
import { ChartDataDefinition, ConditionalFormattingRule, ShapeDefinition } from '../../../../../shared-logic/src/ChartsV2/types';
|
|
6
|
+
import { ScaleLinear, ScaleTime, ScalePoint } from '@visx/vendor/d3-scale';
|
|
4
7
|
export declare type LineChartProps = {
|
|
5
8
|
width: number;
|
|
6
9
|
height: number;
|
|
@@ -18,3 +21,15 @@ export declare type LineChartProps = {
|
|
|
18
21
|
};
|
|
19
22
|
};
|
|
20
23
|
export declare const LineChart: ({ chart, options, theme, width, height }: LineChartProps) => JSX.Element;
|
|
24
|
+
export declare function Lines({ yKeys, visibleYKeys, data, xScaleKey, xScaleDataType, xScale, yScale, lines, curve, conditionalFormattingRules, }: {
|
|
25
|
+
yKeys: string[];
|
|
26
|
+
lines: ShapeDefinition<LineStyles>[];
|
|
27
|
+
conditionalFormattingRules: ConditionalFormattingRule[];
|
|
28
|
+
curve: any;
|
|
29
|
+
data: ChartDataDefinition[];
|
|
30
|
+
visibleYKeys: string[];
|
|
31
|
+
xScaleKey: string;
|
|
32
|
+
xScaleDataType: DataType;
|
|
33
|
+
xScale: ScalePoint<string> | ScaleTime<number, number, never> | ScaleLinear<number, number, never>;
|
|
34
|
+
yScale: ScaleLinear<number, number, never>;
|
|
35
|
+
}): JSX.Element;
|
|
@@ -7,18 +7,20 @@ interface TooltipProps<T> {
|
|
|
7
7
|
keys: {
|
|
8
8
|
[key: string]: Key;
|
|
9
9
|
};
|
|
10
|
-
legendItems: Array<ShapeDefinition<T>>;
|
|
11
10
|
showRoundedTotal: boolean;
|
|
12
11
|
tooltipData: {
|
|
13
12
|
[keyId: string]: DataItem;
|
|
14
13
|
};
|
|
15
14
|
tooltipLeft: number;
|
|
16
15
|
tooltipTop: number;
|
|
17
|
-
visibleYKeys: string[];
|
|
18
16
|
xKey: string;
|
|
19
17
|
yKeys: string[];
|
|
20
|
-
|
|
18
|
+
items: {
|
|
19
|
+
legendItems: Array<ShapeDefinition<T>>;
|
|
20
|
+
conditionalFormattingRules: Array<ConditionalFormattingRule>;
|
|
21
|
+
visibleYKeys: string[];
|
|
22
|
+
}[];
|
|
21
23
|
theme: CSSProperties;
|
|
22
24
|
}
|
|
23
|
-
export declare const Tooltip: ({ keys,
|
|
25
|
+
export declare const Tooltip: ({ keys, showRoundedTotal, tooltipData, tooltipLeft, tooltipTop, xKey, yKeys, theme, items, }: TooltipProps<LineStyles | BarStyles | AreaStyles>) => React.ReactPortal;
|
|
24
26
|
export {};
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import { DataType } from '../../../../../shared-logic/src/Field/types';
|
|
2
|
-
export declare function useFlattenedData<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}[];
|
|
6
|
-
y: {
|
|
7
|
-
keys: string[];
|
|
8
|
-
};
|
|
9
|
-
}, Y>(xScaleKey: string | null, xScaleDataType: DataType, chart: T): Y[];
|
|
2
|
+
export declare function useFlattenedData<Y>(xScaleKey: string | null, xScaleDataType: DataType, data: {
|
|
3
|
+
[keyId: string]: any;
|
|
4
|
+
}[], yKeys: string[]): Y[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { BarStyles } from '
|
|
2
|
-
import { ShapeDefinition, ConditionalFormattingRule, ChartDataDefinition } from '
|
|
1
|
+
import { BarStyles } from '../../../../shared-logic/src/BarChartV2/types';
|
|
2
|
+
import { ShapeDefinition, ConditionalFormattingRule, ChartDataDefinition } from '../../../../shared-logic/src/ChartsV2/types';
|
|
3
3
|
export declare function getBarFill(bars: ShapeDefinition<BarStyles>[], conditionalFormattingRules: ConditionalFormattingRule[], barKey: string, barValues?: ChartDataDefinition | number): string | undefined;
|