@vizzly/dashboard 0.14.4-dev-8252b10a001b6d371cf542597333bfa8f0f1ed5a → 0.14.4-dev-28ace990f8935dcd353f0b09527a2a1b32940e13

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.
@@ -1,21 +1,9 @@
1
- import { Axis, ShapeDefinition, ConditionalFormattingRule, DataItem, GoalLine, Key, KeyId } from '../ChartsV2/types';
2
- export declare type BarChartRepresentation = {
3
- keys: {
4
- [key: KeyId]: Key;
5
- };
6
- x: Axis<Date | string | number, {
7
- key: KeyId;
8
- }>;
9
- y: Axis<number, {
10
- keys: KeyId[];
11
- }>;
1
+ import { ShapeDefinition, ConditionalFormattingRule, GoalLine, BaseChartRepresentation } from '../ChartsV2/types';
2
+ export interface BarChartRepresentation extends BaseChartRepresentation {
12
3
  conditionalFormattingRules: ConditionalFormattingRule[];
13
4
  goalLines: GoalLine[];
14
- data: {
15
- [keyId: string]: DataItem;
16
- }[];
17
5
  bars: ShapeDefinition<BarStyles>[];
18
- };
6
+ }
19
7
  export declare type BarStyles = {
20
8
  type: 'bar';
21
9
  };
@@ -72,3 +72,19 @@ export declare type ShapeDefinition<T> = {
72
72
  color: string;
73
73
  style: T;
74
74
  };
75
+ export declare type BaseXAxis = Axis<Date | string | number, {
76
+ key: KeyId;
77
+ }>;
78
+ export declare type BaseYAxis = Axis<number, {
79
+ keys: KeyId[];
80
+ }>;
81
+ export declare type BaseChartRepresentation = {
82
+ keys: {
83
+ [key: KeyId]: Key;
84
+ };
85
+ x: BaseXAxis;
86
+ y: BaseYAxis;
87
+ data: {
88
+ [keyId: string]: DataItem;
89
+ }[];
90
+ };
@@ -1,21 +1,9 @@
1
- import { Axis, ShapeDefinition, ConditionalFormattingRule, DataItem, GoalLine, Key, KeyId } from '../ChartsV2/types';
2
- export declare type LineChartRepresentation = {
3
- keys: {
4
- [key: KeyId]: Key;
5
- };
6
- x: Axis<Date | string | number, {
7
- key: KeyId;
8
- }>;
9
- y: Axis<number, {
10
- keys: KeyId[];
11
- }>;
1
+ import { ShapeDefinition, ConditionalFormattingRule, GoalLine, BaseChartRepresentation } from '../ChartsV2/types';
2
+ export interface LineChartRepresentation extends BaseChartRepresentation {
12
3
  conditionalFormattingRules: ConditionalFormattingRule[];
13
4
  goalLines: GoalLine[];
14
- data: {
15
- [keyId: string]: DataItem;
16
- }[];
17
5
  lines: ShapeDefinition<LineStyles>[];
18
- };
6
+ }
19
7
  export declare type LineStyles = {
20
8
  type: 'line';
21
9
  strokeDasharray: string | number | null;
@@ -0,0 +1,60 @@
1
+ import { Tick } from '../ChartsV2/types';
2
+ import { DataType } from '../Field/types';
3
+ export declare type KeyId = string;
4
+ export declare type Operator = string;
5
+ export declare type Axis<SupportedVizzlyDataTypes, AxisKeys> = {
6
+ ticks: Tick<SupportedVizzlyDataTypes>[];
7
+ scale: {
8
+ dataType: DataType;
9
+ key: KeyId | null;
10
+ ordering: 'asc' | 'desc' | null;
11
+ min: SupportedVizzlyDataTypes | null;
12
+ max: SupportedVizzlyDataTypes | null;
13
+ };
14
+ postfix: string;
15
+ prefix: string;
16
+ title: string | null;
17
+ } & AxisKeys;
18
+ export declare type LinesItemStyleLine = {
19
+ type: 'line';
20
+ strokeDasharray: string | number | null;
21
+ strokeWidth: number;
22
+ };
23
+ export declare type LinesItem = {
24
+ yKey: KeyId;
25
+ color: string;
26
+ style: LinesItemStyleLine;
27
+ };
28
+ export declare type Key = {
29
+ key: KeyId;
30
+ keyFormatted: string;
31
+ dataType: DataType;
32
+ };
33
+ export declare type RadarChartRepresentation = {
34
+ keys: {
35
+ [key: KeyId]: Key;
36
+ };
37
+ x: Axis<Date | string | number, {
38
+ key: KeyId;
39
+ }>;
40
+ y: Axis<number, {
41
+ keys: KeyId[];
42
+ }>;
43
+ data: {
44
+ [keyId: string]: DataItem;
45
+ }[];
46
+ lines: LinesItem[];
47
+ };
48
+ export declare type DataItem = {
49
+ value: number | string | null;
50
+ formattedValue: string | null;
51
+ };
52
+ export declare type RadarChartOptions = {
53
+ showRoundedTotal: boolean;
54
+ showLegend: boolean;
55
+ removeStroke: boolean;
56
+ axis: {
57
+ showXAxisLabels: boolean;
58
+ showYAxisLabels: boolean;
59
+ };
60
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vizzly/dashboard",
3
3
  "author": "james@vizzly.co",
4
- "version": "0.14.4-dev-8252b10a001b6d371cf542597333bfa8f0f1ed5a",
4
+ "version": "0.14.4-dev-28ace990f8935dcd353f0b09527a2a1b32940e13",
5
5
  "source": "src/index.tsx",
6
6
  "types": "./dist/dashboard/src/index.d.ts",
7
7
  "module": "./dist/dashboard.esm.js",