@vizzly/dashboard 0.15.0-dev-ec22f31a049b4f844d3ea606a85bd487c4553b03 → 0.15.0-dev-eee3e3fd0a4936db9e65592ae2ac639fc993b559

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.
@@ -53,6 +53,13 @@ export declare type BubbleChartRepresentation = {
53
53
  [keyId: string]: DataItem;
54
54
  }[];
55
55
  lines: LegendItem[];
56
+ groupByKey: string;
57
+ legend: {
58
+ keys: {
59
+ [keyId: string]: Key;
60
+ };
61
+ items: LegendItem[];
62
+ };
56
63
  };
57
64
  export declare type DataItem = {
58
65
  value: number | string | null;
@@ -4,11 +4,10 @@ import { ValueAlias } from '../ValueAlias/types';
4
4
  import { Result } from '../Result/types';
5
5
  import { PivotConfig } from '../PivotConfig/types';
6
6
  import { QueryAttributes } from '../QueryAttributes/types';
7
- import { Component, FormatType } from '../Component/types';
8
- import { seriesLabelFormatter } from '../Result/formattedResultToSeries';
7
+ import { ApproxAxisLabelCount, Component, FormatType } from '../Component/types';
9
8
  interface buildBubbleChartRepresentationArgs {
10
9
  axisTitles?: Component.AxisTitles;
11
- colors?: CSSProperties['color'][];
10
+ colors: CSSProperties['color'][];
12
11
  conditionalFormattingAttributes: Component.ConditionalFormatting.Rule[];
13
12
  dateTimeFormatOptions: {
14
13
  [id: string]: DateTimeFormatter;
@@ -24,7 +23,6 @@ interface buildBubbleChartRepresentationArgs {
24
23
  order: QueryAttributes.Order[];
25
24
  pivotConfig: PivotConfig;
26
25
  result: Result;
27
- trendsAndForecasts?: Component.Trends[];
28
26
  valueAlias?: ValueAlias;
29
27
  xAxisFormat: FormatType;
30
28
  xAxisPostfix: string;
@@ -32,9 +30,8 @@ interface buildBubbleChartRepresentationArgs {
32
30
  yAxisFormat: FormatType;
33
31
  yAxisPostfix: string;
34
32
  yAxisPrefix: string;
35
- approxYAxisLabelCount: number;
36
- seriesLabelFormatter: seriesLabelFormatter;
33
+ approxYAxisLabelCount: ApproxAxisLabelCount;
37
34
  zFieldId: string;
38
35
  }
39
- export declare const buildBubbleChartRepresentation: ({ axisTitles, colors, conditionalFormattingAttributes, dateTimeFormatOptions, defaultFormats, goalLineAttributes, nullValue, numberFormatOptions, order, pivotConfig, result, trendsAndForecasts, xAxisFormat, xAxisPostfix, xAxisPrefix, yAxisFormat, yAxisPostfix, yAxisPrefix, approxYAxisLabelCount, seriesLabelFormatter, valueAlias, zFieldId, }: buildBubbleChartRepresentationArgs) => BubbleChartRepresentation;
36
+ export declare const buildBubbleChartRepresentation: ({ axisTitles, colors, conditionalFormattingAttributes, dateTimeFormatOptions, defaultFormats, goalLineAttributes, nullValue, numberFormatOptions, order, pivotConfig, result, xAxisFormat, xAxisPostfix, xAxisPrefix, yAxisFormat, yAxisPostfix, yAxisPrefix, approxYAxisLabelCount, valueAlias, zFieldId, }: buildBubbleChartRepresentationArgs) => BubbleChartRepresentation;
40
37
  export {};
@@ -3,6 +3,7 @@ import { QueryAttributes } from '../QueryAttributes/types';
3
3
  import { DataType } from '../Field/types';
4
4
  import { FormattedResult } from '../Result/types';
5
5
  import { Tick } from '../ChartsV2/types';
6
+ import { ApproxAxisLabelCount } from '../../../shared-logic/src/Component/types';
6
7
  declare type FormattingFunction = (value: any, nullValueAlias?: string) => string;
7
8
  interface getScaleAndTicksArgs {
8
9
  data: FormattedResult['contentMapped'];
@@ -10,7 +11,7 @@ interface getScaleAndTicksArgs {
10
11
  xScaleDataType: DataType;
11
12
  yKeys: string[];
12
13
  nullValue: string | undefined;
13
- tickCountYAxis: number;
14
+ approxYAxisLabelCount: ApproxAxisLabelCount;
14
15
  formattingFunctionX: FormattingFunction;
15
16
  formattingFunctionY: FormattingFunction;
16
17
  order: QueryAttributes.Order[];
@@ -32,11 +33,11 @@ interface getScaleAndTicksReturn {
32
33
  scale: {
33
34
  max: number;
34
35
  min: number;
35
- key: null;
36
+ key: string | null;
36
37
  ordering: 'asc' | 'desc';
37
38
  dataType: 'number';
38
39
  };
39
40
  };
40
41
  }
41
- export declare const getScaleAndTicks: ({ data, xKey, yKeys, xScaleDataType, nullValue, tickCountYAxis, formattingFunctionX, formattingFunctionY, order, goalLines, }: getScaleAndTicksArgs) => getScaleAndTicksReturn;
42
+ export declare const getScaleAndTicks: ({ data, xKey, yKeys, xScaleDataType, nullValue, approxYAxisLabelCount, formattingFunctionX, formattingFunctionY, order, goalLines, }: getScaleAndTicksArgs) => getScaleAndTicksReturn;
42
43
  export {};
@@ -36,6 +36,12 @@ export declare type Key = {
36
36
  keyFormatted: string;
37
37
  dataType: DataType;
38
38
  };
39
+ export declare type Legend = {
40
+ keys: {
41
+ [key: KeyId]: Key;
42
+ };
43
+ items: LegendItem[];
44
+ };
39
45
  export declare type BubbleChartRepresentation = {
40
46
  keys: {
41
47
  [key: KeyId]: Key;
@@ -53,6 +59,8 @@ export declare type BubbleChartRepresentation = {
53
59
  [keyId: string]: DataItem;
54
60
  }[];
55
61
  lines: LegendItem[];
62
+ groupByKey: string;
63
+ legend: Legend;
56
64
  };
57
65
  export declare type DataItem = {
58
66
  value: number | string | null;
@@ -0,0 +1,3 @@
1
+ import { QueryAttributes } from '../QueryAttributes/types';
2
+ import { PivotConfig } from '../PivotConfig/types';
3
+ export declare const init: (xMeasure: QueryAttributes.Measure[], yMeasure: QueryAttributes.Measure[]) => PivotConfig;
@@ -0,0 +1,25 @@
1
+ import { DataType } from '@vizzly/sqlbuilder-public';
2
+ import { PivotConfig } from '../PivotConfig/types';
3
+ import { FormattedResult } from './types';
4
+ declare type Key = {
5
+ key: string;
6
+ keyFormatted: string;
7
+ dataType: DataType;
8
+ outputDataType: DataType;
9
+ };
10
+ declare type FormattedResultToSeriesReturn = {
11
+ yKeys: string[];
12
+ xKeys: string[];
13
+ zKey: string;
14
+ keys: {
15
+ [keyId: string]: Key;
16
+ };
17
+ seriesData: FormattedResult['contentMapped'];
18
+ };
19
+ export declare type seriesLabelFormatter = (params: {
20
+ yResultField: FormattedResult['fields'][number];
21
+ yPivotFields: FormattedResult['fields'];
22
+ row: FormattedResult['contentMapped'][number];
23
+ }) => string;
24
+ export declare const formattedResultToSeries: (formattedResult: FormattedResult, pivotConfig: PivotConfig, zFieldId: string) => FormattedResultToSeriesReturn;
25
+ export {};
@@ -1,10 +1,10 @@
1
1
  /// <reference types="react" />
2
- import { VizzlyComponents } from '../../types';
3
2
  import { Component } from '../../../../shared-logic/src/Component/types';
4
3
  import { Dashboard } from '../../../../shared-logic/src/Dashboard/types';
5
- import { IdPrefix, DashboardBehaviour } from '../../contexts/DashboardBehaviour/types';
6
- import { HeadlineStatsProps } from '../HeadlineStats/HeadlineStats';
7
4
  import * as Drilldown from '../../../../shared-logic/src/Drilldown/Drilldown';
5
+ import { DashboardBehaviour, IdPrefix } from '../../contexts/DashboardBehaviour/types';
6
+ import { VizzlyComponents } from '../../types';
7
+ import { HeadlineStatsProps } from '../HeadlineStats/HeadlineStats';
8
8
  export declare type BarChartV2ViewProps = Omit<VizzlyComponents.ViewProps<{
9
9
  attributes: Component.BarChartV2Attributes;
10
10
  }>, 'supportedTimeTruncFunctions' | 'supportedTransformationFunctions' | 'supportedAggregates'>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vizzly/dashboard",
3
3
  "author": "james@vizzly.co",
4
- "version": "0.15.0-dev-ec22f31a049b4f844d3ea606a85bd487c4553b03",
4
+ "version": "0.15.0-dev-eee3e3fd0a4936db9e65592ae2ac639fc993b559",
5
5
  "source": "src/index.tsx",
6
6
  "types": "./dist/dashboard/src/index.d.ts",
7
7
  "module": "./dist/dashboard.esm.js",