@vizzly/dashboard 0.14.4-dev-470d6f9c95d1b6422dbe1be22378ce12cdf6580a → 0.14.4-dev-a92622560305a2aadfb851574db2d2f43a80cb14

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.
@@ -0,0 +1,22 @@
1
+ /// <reference types="react" />
2
+ import { ChartTheme } from '../../../types';
3
+ import { AreaChartRepresentation, CurveTypes } from '../../../../../shared-logic/src/AreaChartV2/types';
4
+ export declare type AreaChartProps = {
5
+ uniqueId: string;
6
+ width: number;
7
+ height: number;
8
+ chart: AreaChartRepresentation;
9
+ theme?: ChartTheme;
10
+ options: {
11
+ stacked: boolean;
12
+ curve: CurveTypes;
13
+ showRoundedTotal: boolean;
14
+ showLegend: boolean;
15
+ removeStroke: boolean;
16
+ axis: {
17
+ showXAxisLabels: boolean;
18
+ showYAxisLabels: boolean;
19
+ };
20
+ };
21
+ };
22
+ export declare const AreaChart: ({ chart, options, theme, width, height, uniqueId }: AreaChartProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const AREA_GRADIENT_ID_PREFIX = "area-gradient";
@@ -0,0 +1 @@
1
+ export { AreaChart } from './AreaChart';
@@ -1,5 +1,3 @@
1
1
  import { BarStyles } from '../../../../../shared-logic/src/BarChartV2/types';
2
- import { ShapeDefinition, ConditionalFormattingRule } from '../../../../../shared-logic/src/ChartsV2/types';
3
- export declare function getBarFill(bars: ShapeDefinition<BarStyles>[], conditionalFormattingRules: ConditionalFormattingRule[], barKey: string, barValues?: {
4
- [keyId: string]: string | number | Date | null;
5
- } | number): string | undefined;
2
+ import { ShapeDefinition, ConditionalFormattingRule, ChartDataDefinition } from '../../../../../shared-logic/src/ChartsV2/types';
3
+ export declare function getBarFill(bars: ShapeDefinition<BarStyles>[], conditionalFormattingRules: ConditionalFormattingRule[], barKey: string, barValues?: ChartDataDefinition | number): string | undefined;
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { ShapeDefinition, ConditionalFormattingRule, Key } from '../../../../../shared-logic/src/ChartsV2/types';
3
3
  import { BarStyles } from '../../../../../shared-logic/src/BarChartV2/types';
4
4
  import { LineStyles } from '../../../../../shared-logic/src/LineChartV2/types';
5
+ import { AreaStyles } from '../../../../../shared-logic/src/AreaChartV2/types';
5
6
  interface LegendProps<T> {
6
7
  setVisibleYKeys: React.Dispatch<React.SetStateAction<Array<string>>>;
7
8
  visibleYKeys: Array<string>;
@@ -12,5 +13,5 @@ interface LegendProps<T> {
12
13
  conditionalFormattingRules: Array<ConditionalFormattingRule>;
13
14
  marginLeft: number;
14
15
  }
15
- export declare const Legend: ({ keys, visibleYKeys, legendItems, setVisibleYKeys, conditionalFormattingRules, marginLeft, }: LegendProps<BarStyles | LineStyles>) => JSX.Element;
16
+ export declare const Legend: ({ keys, visibleYKeys, legendItems, setVisibleYKeys, conditionalFormattingRules, marginLeft, }: LegendProps<BarStyles | LineStyles | AreaStyles>) => JSX.Element;
16
17
  export {};
@@ -2,11 +2,12 @@
2
2
  import { ShapeDefinition, ConditionalFormattingRule } from '../../../../../../shared-logic/src/ChartsV2/types';
3
3
  import { LineStyles } from '../../../../../../shared-logic/src/LineChartV2/types';
4
4
  import { BarStyles } from '../../../../../../shared-logic/src/BarChartV2/types';
5
+ import { AreaStyles } from '../../../../../../shared-logic/src/AreaChartV2/types';
5
6
  interface LegendItemProps<T> extends ShapeDefinition<T> {
6
7
  onClick: () => void;
7
8
  visible: boolean;
8
9
  yKeyFormatted: string | undefined;
9
10
  conditionalFormattingRules: Array<ConditionalFormattingRule>;
10
11
  }
11
- export declare const LegendItem: ({ yKey, yKeyFormatted, color, style, onClick, visible, conditionalFormattingRules, }: LegendItemProps<BarStyles | LineStyles>) => JSX.Element;
12
+ export declare const LegendItem: ({ yKey, yKeyFormatted, color, style, onClick, visible, conditionalFormattingRules, }: LegendItemProps<BarStyles | LineStyles | AreaStyles>) => JSX.Element;
12
13
  export {};
@@ -5,3 +5,6 @@ export declare const LegendItemBox: ({ color, style }: ShapeDefinition<LineStyle
5
5
  export declare const LegendItemSquare: ({ color }: {
6
6
  color: string;
7
7
  }) => JSX.Element;
8
+ export declare const LegendItemTriangle: ({ color }: {
9
+ color: string;
10
+ }) => JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { ConditionalFormattingRule } from '../../../../../shared-logic/src/ChartsV2/types';
3
+ import { ChartThresholdTheme } from '../../../types';
4
+ import { Margin } from '../../utils/buildMargin';
5
+ export declare const ThresholdArea: FunctionComponent<{
6
+ rules: ConditionalFormattingRule[];
7
+ height: number;
8
+ width: number;
9
+ margin: Margin;
10
+ idPrefix: string;
11
+ theme?: ChartThresholdTheme;
12
+ uniqueId: string;
13
+ yScale: (value: number) => number;
14
+ }>;
@@ -0,0 +1,4 @@
1
+ import { ConditionalFormattingRule } from '../../../../../shared-logic/src/ChartsV2/types';
2
+ export declare const thresholdId: (args: ConditionalFormattingRule, idPrefix: string, position: 'above' | 'below' | 'intermediate', uniqueId: string) => string;
3
+ export declare function buildClipPathId(rule: ConditionalFormattingRule, idPrefix: string, uniqueId: string): string;
4
+ export declare function getRule(rules: ConditionalFormattingRule[], yKey: string): ConditionalFormattingRule[];
@@ -0,0 +1,20 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { Margin } from '../../utils/buildMargin';
3
+ import { DataItem, ShapeDefinition } from '../../../../../shared-logic/src/ChartsV2/types';
4
+ import { DataType } from '../../../../../shared-logic/src/Field/types';
5
+ import { AreaStyles } from '../../../../../shared-logic/src/AreaChartV2/types';
6
+ import { LineStyles } from '../../../../../shared-logic/src/LineChartV2/types';
7
+ export declare const CrosshairCircle: FunctionComponent<{
8
+ dataType: DataType;
9
+ yKeys: string[];
10
+ tooltipData: {
11
+ [keyId: string]: DataItem;
12
+ };
13
+ xKey: string | null;
14
+ margin: Margin;
15
+ legendItems: ShapeDefinition<AreaStyles | LineStyles>[];
16
+ conditionalFormattingRules: any;
17
+ visibleYKeys: string[];
18
+ yScale: (yKey: string) => number;
19
+ xScale: (value: string | number | Date) => number | undefined;
20
+ }>;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { Margin } from '../../utils/buildMargin';
3
+ export declare const Line: ({ margin, x, height }: {
4
+ margin: Margin;
5
+ x: number;
6
+ height: number;
7
+ }) => JSX.Element;
@@ -2,6 +2,7 @@ import { CSSProperties } from 'react';
2
2
  import { ShapeDefinition, ConditionalFormattingRule, DataItem, Key } from '../../../../../shared-logic/src/ChartsV2/types';
3
3
  import { LineStyles } from '../../../../../shared-logic/src/LineChartV2/types';
4
4
  import { BarStyles } from '../../../../../shared-logic/src/BarChartV2/types';
5
+ import { AreaStyles } from '../../../../../shared-logic/src/AreaChartV2/types';
5
6
  interface TooltipProps<T> {
6
7
  keys: {
7
8
  [key: string]: Key;
@@ -19,5 +20,5 @@ interface TooltipProps<T> {
19
20
  conditionalFormattingRules: Array<ConditionalFormattingRule>;
20
21
  theme: CSSProperties;
21
22
  }
22
- export declare const Tooltip: ({ keys, legendItems, showRoundedTotal, tooltipData, tooltipLeft, tooltipTop, visibleYKeys, xKey, yKeys, conditionalFormattingRules, theme, }: TooltipProps<LineStyles | BarStyles>) => JSX.Element;
23
+ export declare const Tooltip: ({ keys, legendItems, showRoundedTotal, tooltipData, tooltipLeft, tooltipTop, visibleYKeys, xKey, yKeys, conditionalFormattingRules, theme, }: TooltipProps<LineStyles | BarStyles | AreaStyles>) => JSX.Element;
23
24
  export {};
@@ -6,6 +6,4 @@ export declare function useFlattenedData<T extends {
6
6
  y: {
7
7
  keys: string[];
8
8
  };
9
- }>(xScaleKey: string | null, xScaleDataType: DataType, chart: T): {
10
- [keyId: string]: string | number | Date | null;
11
- }[];
9
+ }, Y>(xScaleKey: string | null, xScaleDataType: DataType, chart: T): Y[];
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { ShapeDefinition } from '../../../../../shared-logic/src/ChartsV2/types';
3
+ export declare function useVisibleYKeys<T>(areas: ShapeDefinition<T>[]): {
4
+ visibleYKeys: string[];
5
+ setVisibleYKeys: import("react").Dispatch<import("react").SetStateAction<string[]>>;
6
+ };
@@ -0,0 +1 @@
1
+ export declare const useableId: (key: string, prefix: string) => string;