@visactor/vseed 0.0.2 → 0.0.3

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.
Files changed (77) hide show
  1. package/dist/builder/builder/buildAdvanced.d.ts +1 -1
  2. package/dist/builder/builder/buildSpec.d.ts +1 -1
  3. package/dist/builder/builder/builder.d.ts +4 -202
  4. package/dist/builder/register/register.d.ts +7 -0
  5. package/dist/dataReshape/dataReshapeFor1D1M.d.ts +1 -1
  6. package/dist/dataReshape/dataReshapeFor2D1M.d.ts +1 -1
  7. package/dist/dataReshape/foldMeasures.d.ts +2 -2
  8. package/dist/dataReshape/unfoldDimensions.d.ts +2 -2
  9. package/dist/index.cjs +300 -23
  10. package/dist/index.js +244 -9
  11. package/dist/pipeline/advanced/pipeline/area.d.ts +2 -0
  12. package/dist/pipeline/advanced/pipeline/areaPercent.d.ts +2 -0
  13. package/dist/pipeline/advanced/pipeline/bar.d.ts +1 -1
  14. package/dist/pipeline/advanced/pipeline/barParallel.d.ts +2 -0
  15. package/dist/pipeline/advanced/pipeline/barPercent.d.ts +2 -0
  16. package/dist/pipeline/advanced/pipeline/column.d.ts +1 -1
  17. package/dist/pipeline/advanced/pipeline/columnParallel.d.ts +2 -0
  18. package/dist/pipeline/advanced/pipeline/columnPercent.d.ts +2 -0
  19. package/dist/pipeline/advanced/pipeline/index.d.ts +7 -0
  20. package/dist/pipeline/advanced/pipeline/line.d.ts +2 -0
  21. package/dist/pipeline/advanced/pipes/encoding/encodingCartesian.d.ts +3 -2
  22. package/dist/pipeline/advanced/pipes/encoding/index.d.ts +1 -1
  23. package/dist/pipeline/advanced/pipes/index.d.ts +1 -0
  24. package/dist/pipeline/advanced/pipes/init/index.d.ts +1 -0
  25. package/dist/pipeline/advanced/pipes/init/initAdvancedVSeed.d.ts +2 -0
  26. package/dist/pipeline/advanced/pipes/reshape/reshapeTo1D1M.d.ts +1 -1
  27. package/dist/pipeline/advanced/pipes/reshape/reshapeTo2D1M.d.ts +1 -1
  28. package/dist/pipeline/spec/pipeline/area.d.ts +2 -0
  29. package/dist/pipeline/spec/pipeline/areaPercent.d.ts +2 -0
  30. package/dist/pipeline/spec/pipeline/bar.d.ts +1 -1
  31. package/dist/pipeline/spec/pipeline/barParallel.d.ts +2 -0
  32. package/dist/pipeline/spec/pipeline/barPercent.d.ts +2 -0
  33. package/dist/pipeline/spec/pipeline/column.d.ts +1 -1
  34. package/dist/pipeline/spec/pipeline/columnParallel.d.ts +2 -0
  35. package/dist/pipeline/spec/pipeline/columnPercent.d.ts +2 -0
  36. package/dist/pipeline/spec/pipeline/index.d.ts +7 -0
  37. package/dist/pipeline/spec/pipeline/line.d.ts +2 -0
  38. package/dist/pipeline/spec/pipes/axes/xBand.d.ts +1 -1
  39. package/dist/pipeline/spec/pipes/axes/xLinear.d.ts +1 -1
  40. package/dist/pipeline/spec/pipes/axes/yBand.d.ts +1 -1
  41. package/dist/pipeline/spec/pipes/axes/yLinear.d.ts +1 -1
  42. package/dist/pipeline/spec/pipes/dataset/dataset.d.ts +1 -1
  43. package/dist/pipeline/spec/pipes/index.d.ts +2 -0
  44. package/dist/pipeline/spec/pipes/init/area.d.ts +2 -0
  45. package/dist/pipeline/spec/pipes/init/bar.d.ts +1 -1
  46. package/dist/pipeline/spec/pipes/init/barParallel.d.ts +2 -0
  47. package/dist/pipeline/spec/pipes/init/column.d.ts +1 -1
  48. package/dist/pipeline/spec/pipes/init/columnParallel.d.ts +2 -0
  49. package/dist/pipeline/spec/pipes/init/index.d.ts +4 -0
  50. package/dist/pipeline/spec/pipes/init/line.d.ts +2 -0
  51. package/dist/pipeline/spec/pipes/percent/index.d.ts +1 -0
  52. package/dist/pipeline/spec/pipes/percent/percent.d.ts +2 -0
  53. package/dist/pipeline/spec/pipes/stack/index.d.ts +1 -0
  54. package/dist/pipeline/spec/pipes/stack/stack.d.ts +2 -0
  55. package/dist/pipeline/utils/pipeline.d.ts +1 -1
  56. package/dist/types/chartType/area/area.d.ts +1 -1
  57. package/dist/types/chartType/areaPercent/areaPercent.d.ts +1 -1
  58. package/dist/types/chartType/bar/bar.d.ts +1 -1
  59. package/dist/types/chartType/barParallel/barParallel.d.ts +1 -1
  60. package/dist/types/chartType/barPercent/barPercent.d.ts +1 -1
  61. package/dist/types/chartType/column/column.d.ts +1 -1
  62. package/dist/types/chartType/columnParallel/columnParallel.d.ts +1 -1
  63. package/dist/types/chartType/columnPercent/columnPercent.d.ts +1 -1
  64. package/dist/types/chartType/donut/donut.d.ts +1 -1
  65. package/dist/types/chartType/dualAxis/dualAxis.d.ts +1 -1
  66. package/dist/types/chartType/line/line.d.ts +1 -1
  67. package/dist/types/chartType/pie/pie.d.ts +1 -1
  68. package/dist/types/chartType/pivotTable/pivotTable.d.ts +1 -1
  69. package/dist/types/chartType/rose/rose.d.ts +1 -1
  70. package/dist/types/chartType/table/table.d.ts +1 -1
  71. package/dist/types/properties/advancedVSeed.d.ts +8 -8
  72. package/dist/types/properties/chartType/zChartType.d.ts +8 -8
  73. package/dist/types/properties/vseed.d.ts +8 -8
  74. package/package.json +1 -1
  75. package/dist/pipeline/spec/pipes/axes/xBand copy.d.ts +0 -0
  76. package/dist/pipeline/spec/pipes/axes/xLinear copy.d.ts +0 -0
  77. package/dist/pipeline/spec/pipes/axes/yLinear copy.d.ts +0 -0
@@ -1,3 +1,3 @@
1
- import type { AdvancedVSeed } from '../../types';
1
+ import type { AdvancedVSeed } from 'src/types';
2
2
  import type { Builder } from './builder';
3
3
  export declare const buildAdvanced: (builder: Builder) => AdvancedVSeed | null;
@@ -1,4 +1,4 @@
1
1
  import type { ISpec } from '@visactor/vchart';
2
2
  import type { Builder } from './builder';
3
- import type { AdvancedVSeed } from '../../types';
3
+ import type { AdvancedVSeed } from 'src/types';
4
4
  export declare const buildSpec: (builder: Builder, advancedVSeed: AdvancedVSeed) => ISpec;
@@ -1,4 +1,4 @@
1
- import type { AdvancedPipeline, AdvancedVSeed, ChartType, SpecPipeline, VSeed, VSeedBuilder } from '../../types';
1
+ import type { AdvancedPipeline, AdvancedVSeed, ChartType, SpecPipeline, VSeed, VSeedBuilder } from 'src/types';
2
2
  export declare class Builder implements VSeedBuilder {
3
3
  private _vseed;
4
4
  private _advancedVSeed;
@@ -8,209 +8,11 @@ export declare class Builder implements VSeedBuilder {
8
8
  constructor(vseed: VSeed);
9
9
  build: () => import("@visactor/vchart").ISpec;
10
10
  buildSpec: (advanced: AdvancedVSeed) => import("@visactor/vchart").ISpec;
11
- buildAdvanced: () => {
12
- chartType: "table" | "pivotTable" | "line" | "column" | "columnPercent" | "columnParallel" | "bar" | "barPercent" | "barParallel" | "area" | "areaPercent" | "rose" | "pie" | "donut" | "dualAxis";
13
- dataset: Record<string | number, any>[];
14
- datasetReshapeInfo: {
15
- foldInfo: {
16
- foldMap: Record<string, string | undefined>;
17
- measureId: string;
18
- measureName: string;
19
- measureValue: string;
20
- };
21
- unfoldInfo: {
22
- colorItems: string[];
23
- groupName: string;
24
- };
25
- };
26
- encoding: {
27
- x?: string[] | undefined;
28
- y?: string[] | undefined;
29
- color?: string[] | undefined;
30
- group?: string[] | undefined;
31
- angle?: string[] | undefined;
32
- radius?: string[] | undefined;
33
- tooltip?: string[] | undefined;
34
- }[];
35
- dimensions?: {
36
- id: string;
37
- location: "dimension" | "rowDimension" | "columnDimension";
38
- alias?: string | undefined;
39
- visible?: boolean | undefined;
40
- }[] | undefined;
41
- measures?: ({
42
- id: string;
43
- alias?: string | undefined;
44
- visible?: boolean | undefined;
45
- autoFormat?: boolean | undefined;
46
- format?: {
47
- type: "number" | "percent" | "permille";
48
- ratio: number;
49
- symbol: string;
50
- thousandSeparator: boolean;
51
- decimalPlaces: number;
52
- round: "round" | "floor" | "ceil";
53
- prefix: string;
54
- suffix: string;
55
- } | undefined;
56
- } | {
57
- id: string;
58
- alias?: string | undefined;
59
- visible?: boolean | undefined;
60
- children?: ({
61
- id: string;
62
- alias?: string | undefined;
63
- visible?: boolean | undefined;
64
- autoFormat?: boolean | undefined;
65
- format?: {
66
- type: "number" | "percent" | "permille";
67
- ratio: number;
68
- symbol: string;
69
- thousandSeparator: boolean;
70
- decimalPlaces: number;
71
- round: "round" | "floor" | "ceil";
72
- prefix: string;
73
- suffix: string;
74
- } | undefined;
75
- } | /*elided*/ any)[] | undefined;
76
- })[] | undefined;
77
- } | null;
11
+ buildAdvanced: () => any;
78
12
  getAdvancedPipeline: (chartType: ChartType) => AdvancedPipeline;
79
13
  getSpecPipeline: (chartType: ChartType) => SpecPipeline;
80
14
  get vseed(): VSeed;
81
15
  set vseed(value: VSeed);
82
- get advancedVSeed(): {
83
- chartType: "table" | "pivotTable" | "line" | "column" | "columnPercent" | "columnParallel" | "bar" | "barPercent" | "barParallel" | "area" | "areaPercent" | "rose" | "pie" | "donut" | "dualAxis";
84
- dataset: Record<string | number, any>[];
85
- datasetReshapeInfo: {
86
- foldInfo: {
87
- foldMap: Record<string, string | undefined>;
88
- measureId: string;
89
- measureName: string;
90
- measureValue: string;
91
- };
92
- unfoldInfo: {
93
- colorItems: string[];
94
- groupName: string;
95
- };
96
- };
97
- encoding: {
98
- x?: string[] | undefined;
99
- y?: string[] | undefined;
100
- color?: string[] | undefined;
101
- group?: string[] | undefined;
102
- angle?: string[] | undefined;
103
- radius?: string[] | undefined;
104
- tooltip?: string[] | undefined;
105
- }[];
106
- dimensions?: {
107
- id: string;
108
- location: "dimension" | "rowDimension" | "columnDimension";
109
- alias?: string | undefined;
110
- visible?: boolean | undefined;
111
- }[] | undefined;
112
- measures?: ({
113
- id: string;
114
- alias?: string | undefined;
115
- visible?: boolean | undefined;
116
- autoFormat?: boolean | undefined;
117
- format?: {
118
- type: "number" | "percent" | "permille";
119
- ratio: number;
120
- symbol: string;
121
- thousandSeparator: boolean;
122
- decimalPlaces: number;
123
- round: "round" | "floor" | "ceil";
124
- prefix: string;
125
- suffix: string;
126
- } | undefined;
127
- } | {
128
- id: string;
129
- alias?: string | undefined;
130
- visible?: boolean | undefined;
131
- children?: ({
132
- id: string;
133
- alias?: string | undefined;
134
- visible?: boolean | undefined;
135
- autoFormat?: boolean | undefined;
136
- format?: {
137
- type: "number" | "percent" | "permille";
138
- ratio: number;
139
- symbol: string;
140
- thousandSeparator: boolean;
141
- decimalPlaces: number;
142
- round: "round" | "floor" | "ceil";
143
- prefix: string;
144
- suffix: string;
145
- } | undefined;
146
- } | /*elided*/ any)[] | undefined;
147
- })[] | undefined;
148
- } | null;
149
- set advancedVSeed(value: {
150
- chartType: "table" | "pivotTable" | "line" | "column" | "columnPercent" | "columnParallel" | "bar" | "barPercent" | "barParallel" | "area" | "areaPercent" | "rose" | "pie" | "donut" | "dualAxis";
151
- dataset: Record<string | number, any>[];
152
- datasetReshapeInfo: {
153
- foldInfo: {
154
- foldMap: Record<string, string | undefined>;
155
- measureId: string;
156
- measureName: string;
157
- measureValue: string;
158
- };
159
- unfoldInfo: {
160
- colorItems: string[];
161
- groupName: string;
162
- };
163
- };
164
- encoding: {
165
- x?: string[] | undefined;
166
- y?: string[] | undefined;
167
- color?: string[] | undefined;
168
- group?: string[] | undefined;
169
- angle?: string[] | undefined;
170
- radius?: string[] | undefined;
171
- tooltip?: string[] | undefined;
172
- }[];
173
- dimensions?: {
174
- id: string;
175
- location: "dimension" | "rowDimension" | "columnDimension";
176
- alias?: string | undefined;
177
- visible?: boolean | undefined;
178
- }[] | undefined;
179
- measures?: ({
180
- id: string;
181
- alias?: string | undefined;
182
- visible?: boolean | undefined;
183
- autoFormat?: boolean | undefined;
184
- format?: {
185
- type: "number" | "percent" | "permille";
186
- ratio: number;
187
- symbol: string;
188
- thousandSeparator: boolean;
189
- decimalPlaces: number;
190
- round: "round" | "floor" | "ceil";
191
- prefix: string;
192
- suffix: string;
193
- } | undefined;
194
- } | {
195
- id: string;
196
- alias?: string | undefined;
197
- visible?: boolean | undefined;
198
- children?: ({
199
- id: string;
200
- alias?: string | undefined;
201
- visible?: boolean | undefined;
202
- autoFormat?: boolean | undefined;
203
- format?: {
204
- type: "number" | "percent" | "permille";
205
- ratio: number;
206
- symbol: string;
207
- thousandSeparator: boolean;
208
- decimalPlaces: number;
209
- round: "round" | "floor" | "ceil";
210
- prefix: string;
211
- suffix: string;
212
- } | undefined;
213
- } | /*elided*/ any)[] | undefined;
214
- })[] | undefined;
215
- } | null);
16
+ get advancedVSeed(): any;
17
+ set advancedVSeed(value: any);
216
18
  }
@@ -1,3 +1,10 @@
1
1
  export declare const registerAll: () => void;
2
2
  export declare const registerColumn: () => void;
3
3
  export declare const registerBar: () => void;
4
+ export declare const registerLine: () => void;
5
+ export declare const registerArea: () => void;
6
+ export declare const registerAreaPercent: () => void;
7
+ export declare const registerBarPercent: () => void;
8
+ export declare const registerColumnPercent: () => void;
9
+ export declare const registerColumnParallel: () => void;
10
+ export declare const registerBarParallel: () => void;
@@ -1,4 +1,4 @@
1
- import type { Dataset, Dimension, FoldInfo, Measure, UnfoldInfo } from '../types';
1
+ import type { Dataset, Dimension, FoldInfo, Measure, UnfoldInfo } from 'src/types';
2
2
  /**
3
3
  * 数据重塑为1个维度1个指标
4
4
  * @param dataset
@@ -1,4 +1,4 @@
1
- import type { Dataset, Dimension, FoldInfo, Measure, UnfoldInfo } from '../types';
1
+ import type { Dataset, Dimension, FoldInfo, Measure, UnfoldInfo } from 'src/types';
2
2
  /**
3
3
  * 数据重塑为2个维度1个指标
4
4
  * @param dataset
@@ -1,4 +1,4 @@
1
- import type { Dataset, FoldInfo, Measure, Measures } from '../types';
1
+ import type { Dataset, FoldInfo, Measure, Measures } from 'src/types';
2
2
  /**
3
3
  * 折叠指定的指标
4
4
  * @description 合并指定的指标为1个, 无论多少个, 都能转换为1个, 取名为fold, 意为折叠后混合在一起.
@@ -20,7 +20,7 @@ export declare const foldMeasureGroups: (dataset: Dataset, measures: Required<Me
20
20
  dataset: Dataset;
21
21
  foldInfo: FoldInfo;
22
22
  } | {
23
- dataset: Record<string | number, any>[];
23
+ dataset: Dataset;
24
24
  datasetGroup?: undefined;
25
25
  } | {
26
26
  datasetGroup: (never[] | {
@@ -1,5 +1,5 @@
1
- import type { Dataset, Datum, Dimension, Measure } from '../types';
2
- import type { UnfoldInfo } from '../types';
1
+ import type { Dataset, Datum, Dimension, Measure } from 'src/types';
2
+ import type { UnfoldInfo } from 'src/types';
3
3
  /**
4
4
  * TODO: 优化展开维度的性能
5
5
  * 展开指定的维度