@vizzly/dashboard 0.15.0-dev-49869c9c13edb3e12eaa72adb00c9f4704f04940 → 0.15.0-dev-7a0950140407e5d00da47b05fcfee58cb3dd2399
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/HorizontalBarChart/getTooltipDataForHorizontalChart.d.ts +7 -2
- package/dist/charts/src/v2/components/VerticalGoalLine/VerticalGoalLines.d.ts +2 -2
- package/dist/charts/src/v2/components/hooks/useGroupingAxisBaselineShift.d.ts +4 -1
- package/dist/charts/src/v2/constants/HORIZONTAL_BAR_CHART_LABEL_X_GAP.d.ts +1 -0
- package/dist/charts/src/v2/utils/buildMargin.d.ts +1 -0
- package/dist/charts/src/v2/utils/castToDataType.d.ts +1 -0
- package/dist/charts/src/v2/utils/components/BarStackSegment.d.ts +23 -0
- package/dist/charts/src/v2/utils/components/BarStackSegment.test.d.ts +1 -0
- package/dist/charts/src/v2/utils/components/HorizontalBarGroup.d.ts +1 -1
- package/dist/charts/src/v2/utils/components/HorizontalBarGroupStacked.d.ts +27 -0
- package/dist/charts/src/v2/utils/components/HorizontalBarStacked.d.ts +2 -1
- package/dist/charts/src/v2/utils/{components/filterDataByVisibleBandDomain.d.ts → filterDataByVisibleBandDomain.d.ts} +1 -1
- package/dist/charts/src/v2/utils/getStackedBarColor.d.ts +6 -0
- package/dist/charts/src/v2/utils/index.d.ts +3 -1
- package/dist/charts/src/v2/utils/useVisibleBandData.d.ts +11 -0
- package/dist/dashboard.cjs.development.js +2248 -1817
- package/dist/dashboard.cjs.production.min.js +1 -1
- package/dist/dashboard.esm.js +2249 -1818
- package/dist/shared-logic/src/ChartsV2/convertToStackedPercentages.d.ts +1 -1
- package/dist/shared-logic/src/ChartsV2/getGroupedTonalStyleDefinition.d.ts +10 -0
- package/dist/shared-logic/src/ChartsV2/getStackedMinAndMax.d.ts +2 -1
- package/dist/shared-logic/src/ChartsV2/getStackedPercentageAxisTicks.d.ts +1 -1
- package/dist/shared-logic/src/ChartsV2/getStackedPercentageScaleLinearDomain.d.ts +1 -1
- package/dist/shared-logic/src/ChartsV2/getStackedPercentageTickValues.d.ts +1 -1
- package/dist/shared-logic/src/ChartsV2/getStackedScaleAndTicks.d.ts +1 -0
- package/dist/shared-logic/src/ChartsV2/partitionSeriesKeysByGroup.d.ts +6 -0
- package/dist/shared-logic/src/Field/Field.d.ts +4 -1
- package/dist/shared-logic/src/Result/formattedResultToSeries.d.ts +4 -0
- package/dist/shared-logic/src/Theme/Theme.d.ts +4 -0
- package/dist/shared-logic/src/VizzlyState/index.d.ts +7 -3
- package/package.json +1 -1
package/dist/charts/src/v2/components/HorizontalBarChart/getTooltipDataForHorizontalChart.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { DataItem } from '../../../../../shared-logic/src/ChartsV2/types';
|
|
|
4
4
|
import { DataType } from '../../../../../shared-logic/src/Field/types';
|
|
5
5
|
import { ChartType } from '../../../Legend/types';
|
|
6
6
|
import { TooltipDataReturn } from '../../utils/getTooltipData';
|
|
7
|
+
declare type HorizontalTooltipScale = ScaleBand<number> | ScaleBand<string> | ScaleBand<Date> | ScaleBand<boolean> | ScaleTime<number, number> | ScaleLinear<number, number> | ScalePoint<string>;
|
|
7
8
|
interface getTooltipDataForHorizontalChartArgs {
|
|
8
9
|
data: Array<{
|
|
9
10
|
[keyId: string]: DataItem;
|
|
@@ -17,9 +18,13 @@ interface getTooltipDataForHorizontalChartArgs {
|
|
|
17
18
|
};
|
|
18
19
|
yScaleKey: string;
|
|
19
20
|
yScaleDataType: DataType;
|
|
20
|
-
yScale:
|
|
21
|
+
yScale: HorizontalTooltipScale;
|
|
21
22
|
yOrdering: 'asc' | 'desc' | null;
|
|
22
23
|
chartType: ChartType;
|
|
24
|
+
innerYScale?: ScaleBand<string>;
|
|
23
25
|
}
|
|
24
|
-
export
|
|
26
|
+
export interface HorizontalTooltipDataReturn extends TooltipDataReturn {
|
|
27
|
+
group?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare const getTooltipDataForHorizontalChart: ({ data, event, margin, yScaleKey, yScaleDataType, yScale, yOrdering, chartType, innerYScale, }: getTooltipDataForHorizontalChartArgs) => HorizontalTooltipDataReturn | undefined;
|
|
25
30
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { GoalLine as GoalLineType } from '../../../../../shared-logic/src/ChartsV2/types';
|
|
3
3
|
import { Margin } from '../../utils/buildMargin';
|
|
4
4
|
export declare const shouldUpdate: (previousProps: any, nextProps: any) => boolean;
|
|
5
|
-
declare const _default:
|
|
5
|
+
declare const _default: React.NamedExoticComponent<{
|
|
6
6
|
goalLines: GoalLineType[];
|
|
7
7
|
x: (value: number) => number;
|
|
8
8
|
margin: Margin;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import { ChartTheme } from '../../../types';
|
|
1
2
|
export declare type UseGroupingAxisBaseLineShiftProps = {
|
|
2
3
|
showDetailedSubGroupingLabels: boolean;
|
|
3
4
|
hasBottomTitle: boolean;
|
|
4
5
|
hasLeftTitle: boolean;
|
|
5
6
|
isChartHorizontal?: boolean;
|
|
7
|
+
subLabels?: string[];
|
|
8
|
+
theme?: ChartTheme;
|
|
6
9
|
};
|
|
7
|
-
export declare const useGroupingAxisBaseLineShift: ({ showDetailedSubGroupingLabels, hasBottomTitle, hasLeftTitle, isChartHorizontal, }: UseGroupingAxisBaseLineShiftProps) => {
|
|
10
|
+
export declare const useGroupingAxisBaseLineShift: ({ showDetailedSubGroupingLabels, hasBottomTitle, hasLeftTitle, isChartHorizontal, subLabels, theme, }: UseGroupingAxisBaseLineShiftProps) => {
|
|
8
11
|
groupingAxisBaselineShift: number;
|
|
9
12
|
bottomOffset: number;
|
|
10
13
|
leftOffset: number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const HORIZONTAL_BAR_CHART_LABEL_X_GAP = 15;
|
|
@@ -11,3 +11,4 @@ export declare type Margin = {
|
|
|
11
11
|
};
|
|
12
12
|
export declare const buildMargin: (yTicks: Tick<number>[], showYAxisLabels: boolean, hasYAxisTitle: boolean, hasXAxisTitle: boolean, showDetailedSubGroupingLabels?: boolean, isDualAxisEnabled?: boolean, hasDualYAxisTitle?: boolean, yTicksDual?: Tick<number>[] | undefined, labelRotationExtraHeight?: number | undefined, theme?: ChartTheme | undefined, xTicks?: Tick<string | number | boolean | Date>[] | undefined) => Margin;
|
|
13
13
|
export declare const buildMarginForHorizontalChart: (xTicks: Tick<number>[], yTicks: Tick<Date | string | number | boolean>[], showXAxisLabels: boolean, showYAxisLabels: boolean, hasYAxisTitle: boolean, hasXAxisTitle: boolean, theme?: ChartTheme | undefined, labelRotationExtraWidth?: number | undefined) => Margin;
|
|
14
|
+
export declare const getGroupingAxisSubLabelBandWidth: (subLabels: string[], theme?: ChartTheme | undefined) => number;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BarStyles } from '../../../../../shared-logic/src/BarChartV2/types';
|
|
3
|
+
import { ConditionalFormattingRule, ShapeDefinition } from '../../../../../shared-logic/src/ChartsV2/types';
|
|
4
|
+
import { StackedLabelCandidate } from '../stackedLabelPlacement';
|
|
5
|
+
export declare type BarStackSegmentProps = {
|
|
6
|
+
bar: any;
|
|
7
|
+
barStack: any;
|
|
8
|
+
bars: ShapeDefinition<BarStyles>[];
|
|
9
|
+
conditionalFormattingRules: ConditionalFormattingRule[];
|
|
10
|
+
keysMetadata?: Record<string, {
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
} | undefined>;
|
|
13
|
+
totalItems: number;
|
|
14
|
+
showLabels: boolean;
|
|
15
|
+
labelDictionary: {
|
|
16
|
+
[key: string]: string;
|
|
17
|
+
};
|
|
18
|
+
xKey: string;
|
|
19
|
+
dataLabelFontSize?: number;
|
|
20
|
+
labelCandidate?: StackedLabelCandidate;
|
|
21
|
+
orientation: 'horizontal' | 'vertical';
|
|
22
|
+
};
|
|
23
|
+
export declare const BarStackSegment: ({ bar, barStack, bars, conditionalFormattingRules, keysMetadata, totalItems, showLabels, labelDictionary, xKey, dataLabelFontSize, labelCandidate, orientation, }: BarStackSegmentProps) => JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ScaleBand, ScaleLinear } from '@visx/vendor/d3-scale';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import { BarStyles } from '../../../../../shared-logic/src/BarChartV2/types';
|
|
4
4
|
import { ChartDataDefinition, ConditionalFormattingRule, ShapeDefinition } from '../../../../../shared-logic/src/ChartsV2/types';
|
|
5
5
|
import { DataType } from '../../../../../shared-logic/src/Field/types';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ScaleBand, ScaleLinear } from '@visx/vendor/d3-scale';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { BarStyles } from '../../../../../shared-logic/src/BarChartV2/types';
|
|
4
|
+
import { SeriesKeyGroup } from '../../../../../shared-logic/src/ChartsV2/partitionSeriesKeysByGroup';
|
|
5
|
+
import { ChartDataDefinition, ConditionalFormattingRule, ShapeDefinition } from '../../../../../shared-logic/src/ChartsV2/types';
|
|
6
|
+
import { DataType } from '../../../../../shared-logic/src/Field/types';
|
|
7
|
+
export declare type HorizontalBarGroupStackedProps = {
|
|
8
|
+
data: ChartDataDefinition[];
|
|
9
|
+
keyGroups: SeriesKeyGroup[];
|
|
10
|
+
yKey: string;
|
|
11
|
+
yScaleDataType: DataType;
|
|
12
|
+
yScale: ScaleBand<string> | ScaleBand<Date> | ScaleBand<number> | ScaleBand<boolean>;
|
|
13
|
+
innerYScale: ScaleBand<string>;
|
|
14
|
+
xScale: ScaleLinear<number, number, never>;
|
|
15
|
+
width: number;
|
|
16
|
+
conditionalFormattingRules: ConditionalFormattingRule[];
|
|
17
|
+
bars: ShapeDefinition<BarStyles>[];
|
|
18
|
+
showLabels: boolean;
|
|
19
|
+
labelDictionary: {
|
|
20
|
+
[key: string]: string;
|
|
21
|
+
};
|
|
22
|
+
dataLabelFontSize?: number;
|
|
23
|
+
showDetailedSubGroupingLabels?: boolean;
|
|
24
|
+
xLabelPosition?: number;
|
|
25
|
+
labelStyle?: React.CSSProperties;
|
|
26
|
+
};
|
|
27
|
+
export declare const HorizontalBarGroupStacked: ({ data, keyGroups, yKey, yScaleDataType, yScale, innerYScale, xScale, width, conditionalFormattingRules, bars, showLabels, labelDictionary, dataLabelFontSize, showDetailedSubGroupingLabels, xLabelPosition, labelStyle, }: HorizontalBarGroupStackedProps) => JSX.Element;
|
|
@@ -3,13 +3,14 @@ import { DatumObject } from '@visx/shape/lib/types';
|
|
|
3
3
|
import { ScaleBand, ScaleLinear } from '@visx/vendor/d3-scale';
|
|
4
4
|
import { BarStyles } from '../../../../../shared-logic/src/BarChartV2/types';
|
|
5
5
|
import { ConditionalFormattingRule, ShapeDefinition } from '../../../../../shared-logic/src/ChartsV2/types';
|
|
6
|
+
import { DataType } from '../../../../../shared-logic/src/Field/types';
|
|
6
7
|
export declare type HorizontalBarStackedProps = {
|
|
7
8
|
conditionalFormattingRules: ConditionalFormattingRule[];
|
|
8
9
|
bars: ShapeDefinition<BarStyles>[];
|
|
9
10
|
keys: string[];
|
|
10
11
|
xScale: ScaleLinear<number, number, never>;
|
|
11
12
|
yScale: ScaleBand<string> | ScaleBand<Date> | ScaleBand<number> | ScaleBand<boolean>;
|
|
12
|
-
yScaleDataType:
|
|
13
|
+
yScaleDataType: DataType;
|
|
13
14
|
yScaleKey: string;
|
|
14
15
|
data: DatumObject[];
|
|
15
16
|
height: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataType } from '
|
|
1
|
+
import { DataType } from '../../../../shared-logic/src/Field/types';
|
|
2
2
|
declare type FilterDataByVisibleBandDomainArgs<TData extends Record<string, unknown>> = {
|
|
3
3
|
data: TData[];
|
|
4
4
|
scaleDomain: unknown[] | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BarStyles } from '../../../../shared-logic/src/BarChartV2/types';
|
|
2
|
+
import { ConditionalFormattingRule, ShapeDefinition } from '../../../../shared-logic/src/ChartsV2/types';
|
|
3
|
+
import { GetStackedBarColor } from './stackedLabelPlacement';
|
|
4
|
+
export declare const getStackedBarColor: (bars: ShapeDefinition<BarStyles>[], conditionalFormattingRules: ConditionalFormattingRule[], rowKey: string, keysMetadata?: Record<string, {
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
} | undefined> | undefined) => GetStackedBarColor;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export { addTrendAndForecast } from './addTrendAndForecast';
|
|
2
|
+
export { castToDataType } from './castToDataType';
|
|
3
|
+
export { filterDataByVisibleBandDomain } from './filterDataByVisibleBandDomain';
|
|
2
4
|
export { flattenData } from './flattenData';
|
|
3
5
|
export { getChartThemeCSS } from './getChartThemeCSS';
|
|
4
6
|
export { getClipArea } from './getClipArea';
|
|
5
7
|
export { getColor } from './getColor';
|
|
6
8
|
export { getTooltipData } from './getTooltipData';
|
|
7
9
|
export { getTrend } from './getTrend';
|
|
8
|
-
export {
|
|
10
|
+
export { useVisibleBandData } from './useVisibleBandData';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DataType } from '../../../../shared-logic/src/Field/types';
|
|
2
|
+
declare type UseVisibleBandDataArgs<TData extends Record<string, unknown>> = {
|
|
3
|
+
data: TData[];
|
|
4
|
+
scale: {
|
|
5
|
+
domain?: () => unknown[];
|
|
6
|
+
} | undefined;
|
|
7
|
+
scaleKey: string;
|
|
8
|
+
scaleDataType: DataType | string;
|
|
9
|
+
};
|
|
10
|
+
export declare const useVisibleBandData: <TData extends Record<string, unknown>>({ data, scale, scaleKey, scaleDataType, }: UseVisibleBandDataArgs<TData>) => TData[];
|
|
11
|
+
export {};
|