@visactor/vseed 0.0.3 → 0.0.5
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/builder/builder/buildAdvanced.d.ts +1 -1
- package/dist/builder/builder/buildSpec.d.ts +1 -1
- package/dist/builder/builder/builder.d.ts +387 -7
- package/dist/builder/register/all.d.ts +1 -0
- package/dist/builder/register/index.d.ts +3 -1
- package/dist/builder/register/theme.d.ts +4 -0
- package/dist/dataReshape/dataReshapeFor1D1M.d.ts +1 -1
- package/dist/dataReshape/dataReshapeFor2D1M.d.ts +1 -1
- package/dist/dataReshape/foldMeasures.d.ts +2 -2
- package/dist/dataReshape/unfoldDimensions.d.ts +2 -2
- package/dist/index.cjs +691 -265
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +446 -80
- package/dist/index.js.map +1 -0
- package/dist/pipeline/advanced/pipeline/area.d.ts +1 -1
- package/dist/pipeline/advanced/pipeline/areaPercent.d.ts +1 -1
- package/dist/pipeline/advanced/pipeline/bar.d.ts +1 -1
- package/dist/pipeline/advanced/pipeline/barParallel.d.ts +1 -1
- package/dist/pipeline/advanced/pipeline/barPercent.d.ts +1 -1
- package/dist/pipeline/advanced/pipeline/column.d.ts +1 -1
- package/dist/pipeline/advanced/pipeline/columnParallel.d.ts +1 -1
- package/dist/pipeline/advanced/pipeline/columnPercent.d.ts +1 -1
- package/dist/pipeline/advanced/pipeline/line.d.ts +1 -1
- package/dist/pipeline/advanced/pipes/baseConfig/baseConfig.d.ts +3 -0
- package/dist/pipeline/advanced/pipes/baseConfig/index.d.ts +1 -0
- package/dist/pipeline/advanced/pipes/encoding/encodingCartesian.d.ts +1 -1
- package/dist/pipeline/advanced/pipes/index.d.ts +2 -0
- package/dist/pipeline/advanced/pipes/init/autoDimensions.d.ts +2 -0
- package/dist/pipeline/advanced/pipes/init/autoMeasures.d.ts +2 -0
- package/dist/pipeline/advanced/pipes/init/index.d.ts +2 -0
- package/dist/pipeline/advanced/pipes/init/initAdvancedVSeed.d.ts +1 -1
- package/dist/pipeline/advanced/pipes/init/utils.d.ts +1 -0
- package/dist/pipeline/advanced/pipes/reshape/reshapeTo1D1M.d.ts +1 -1
- package/dist/pipeline/advanced/pipes/reshape/reshapeTo2D1M.d.ts +1 -1
- package/dist/pipeline/advanced/pipes/theme/index.d.ts +1 -0
- package/dist/pipeline/advanced/pipes/theme/theme.d.ts +3 -0
- package/dist/pipeline/spec/pipeline/area.d.ts +1 -1
- package/dist/pipeline/spec/pipeline/areaPercent.d.ts +1 -1
- package/dist/pipeline/spec/pipeline/bar.d.ts +1 -1
- package/dist/pipeline/spec/pipeline/barParallel.d.ts +1 -1
- package/dist/pipeline/spec/pipeline/barPercent.d.ts +1 -1
- package/dist/pipeline/spec/pipeline/column.d.ts +1 -1
- package/dist/pipeline/spec/pipeline/columnParallel.d.ts +1 -1
- package/dist/pipeline/spec/pipeline/columnPercent.d.ts +1 -1
- package/dist/pipeline/spec/pipeline/line.d.ts +1 -1
- package/dist/pipeline/spec/pipes/axes/xBand.d.ts +1 -1
- package/dist/pipeline/spec/pipes/axes/xLinear.d.ts +1 -1
- package/dist/pipeline/spec/pipes/axes/yBand.d.ts +1 -1
- package/dist/pipeline/spec/pipes/axes/yLinear.d.ts +1 -1
- package/dist/pipeline/spec/pipes/backgroundColor/background.d.ts +2 -0
- package/dist/pipeline/spec/pipes/backgroundColor/index.d.ts +1 -0
- package/dist/pipeline/spec/pipes/color/color.d.ts +2 -0
- package/dist/pipeline/spec/pipes/color/index.d.ts +1 -0
- package/dist/pipeline/spec/pipes/dataset/dataset.d.ts +1 -1
- package/dist/pipeline/spec/pipes/index.d.ts +5 -0
- package/dist/pipeline/spec/pipes/init/area.d.ts +1 -1
- package/dist/pipeline/spec/pipes/init/bar.d.ts +1 -1
- package/dist/pipeline/spec/pipes/init/barParallel.d.ts +1 -1
- package/dist/pipeline/spec/pipes/init/column.d.ts +1 -1
- package/dist/pipeline/spec/pipes/init/columnParallel.d.ts +1 -1
- package/dist/pipeline/spec/pipes/init/line.d.ts +1 -1
- package/dist/pipeline/spec/pipes/label/index.d.ts +1 -0
- package/dist/pipeline/spec/pipes/label/label.d.ts +2 -0
- package/dist/pipeline/spec/pipes/legend/index.d.ts +1 -0
- package/dist/pipeline/spec/pipes/legend/legend.d.ts +2 -0
- package/dist/pipeline/spec/pipes/percent/percent.d.ts +1 -1
- package/dist/pipeline/spec/pipes/stack/stack.d.ts +1 -1
- package/dist/pipeline/spec/pipes/tooltip/index.d.ts +1 -0
- package/dist/pipeline/spec/pipes/tooltip/tooltip.d.ts +2 -0
- package/dist/pipeline/utils/chatType.d.ts +3 -0
- package/dist/pipeline/utils/index.d.ts +1 -0
- package/dist/pipeline/utils/pipeline.d.ts +1 -1
- package/dist/theme/dark.d.ts +2 -0
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/light.d.ts +2 -0
- package/dist/types/{properties/advancedVSeed.d.ts → advancedVSeed.d.ts} +53 -8
- package/dist/types/builder/builder.d.ts +10 -3
- package/dist/types/chartType/area/area.d.ts +38 -3
- package/dist/types/chartType/areaPercent/areaPercent.d.ts +38 -3
- package/dist/types/chartType/bar/bar.d.ts +38 -3
- package/dist/types/chartType/barParallel/barParallel.d.ts +38 -3
- package/dist/types/chartType/barPercent/barPercent.d.ts +38 -3
- package/dist/types/chartType/column/column.d.ts +38 -3
- package/dist/types/chartType/columnParallel/columnParallel.d.ts +38 -3
- package/dist/types/chartType/columnPercent/columnPercent.d.ts +38 -3
- package/dist/types/chartType/donut/donut.d.ts +38 -3
- package/dist/types/chartType/dualAxis/dualAxis.d.ts +38 -3
- package/dist/types/chartType/index.d.ts +1 -1
- package/dist/types/chartType/line/line.d.ts +38 -3
- package/dist/types/chartType/pie/pie.d.ts +38 -3
- package/dist/types/chartType/pivotTable/pivotTable.d.ts +18 -3
- package/dist/types/chartType/rose/rose.d.ts +38 -3
- package/dist/types/chartType/table/table.d.ts +18 -3
- package/dist/types/index.d.ts +2 -0
- package/dist/types/pipeline/advancedVSeed/advancedVSeed.d.ts +4 -1
- package/dist/types/pipeline/spec/spec.d.ts +2 -1
- package/dist/types/properties/baseConfig/backgroundColor.d.ts +8 -0
- package/dist/types/properties/baseConfig/baseConfig.d.ts +44 -0
- package/dist/types/properties/baseConfig/color.d.ts +23 -0
- package/dist/types/properties/baseConfig/index.d.ts +12 -0
- package/dist/types/properties/baseConfig/label.d.ts +11 -0
- package/dist/types/properties/baseConfig/legend.d.ts +11 -0
- package/dist/types/properties/baseConfig/tooltip.d.ts +11 -0
- package/dist/types/properties/chartType/zChartType.d.ts +8 -8
- package/dist/types/properties/index.d.ts +2 -2
- package/dist/types/properties/theme/customTheme.d.ts +49 -0
- package/dist/types/properties/theme/index.d.ts +4 -0
- package/dist/types/properties/theme/theme.d.ts +15 -0
- package/dist/types/{properties/vseed.d.ts → vseed.d.ts} +25 -18
- package/package.json +2 -1
- package/dist/types/chartType/vseedDSL.d.ts +0 -16
- /package/dist/builder/register/{register.d.ts → chartType.d.ts} +0 -0
@@ -1,4 +1,4 @@
|
|
1
1
|
import type { ISpec } from '@visactor/vchart';
|
2
2
|
import type { Builder } from './builder';
|
3
|
-
import type { AdvancedVSeed } from '
|
3
|
+
import type { AdvancedVSeed } from '../../types';
|
4
4
|
export declare const buildSpec: (builder: Builder, advancedVSeed: AdvancedVSeed) => ISpec;
|
@@ -1,18 +1,398 @@
|
|
1
|
-
import type { AdvancedPipeline, AdvancedVSeed, ChartType, SpecPipeline, VSeed, VSeedBuilder } from '
|
1
|
+
import type { AdvancedPipeline, AdvancedVSeed, ChartType, CustomThemeConfig, SpecPipeline, VSeed, VSeedBuilder } from '../../types';
|
2
2
|
export declare class Builder implements VSeedBuilder {
|
3
3
|
private _vseed;
|
4
4
|
private _advancedVSeed;
|
5
|
-
static _advancedPipelineMap: Partial<Record<ChartType, AdvancedPipeline>>;
|
6
|
-
static _specPipelineMap: Partial<Record<ChartType, SpecPipeline>>;
|
7
|
-
static from: (vseed: VSeed) => Builder;
|
8
5
|
constructor(vseed: VSeed);
|
9
6
|
build: () => import("@visactor/vchart").ISpec;
|
10
7
|
buildSpec: (advanced: AdvancedVSeed) => import("@visactor/vchart").ISpec;
|
11
|
-
buildAdvanced: () =>
|
8
|
+
buildAdvanced: () => {
|
9
|
+
chartType: "table" | "pivotTable" | "line" | "column" | "columnPercent" | "columnParallel" | "bar" | "barPercent" | "barParallel" | "area" | "areaPercent" | "rose" | "pie" | "donut" | "dualAxis";
|
10
|
+
dataset: Record<string | number, any>[];
|
11
|
+
datasetReshapeInfo: {
|
12
|
+
foldInfo: {
|
13
|
+
foldMap: Record<string, string | undefined>;
|
14
|
+
measureId: string;
|
15
|
+
measureName: string;
|
16
|
+
measureValue: string;
|
17
|
+
};
|
18
|
+
unfoldInfo: {
|
19
|
+
colorItems: string[];
|
20
|
+
groupName: string;
|
21
|
+
};
|
22
|
+
};
|
23
|
+
encoding: {
|
24
|
+
x?: string[] | undefined;
|
25
|
+
y?: string[] | undefined;
|
26
|
+
color?: string[] | undefined;
|
27
|
+
group?: string[] | undefined;
|
28
|
+
angle?: string[] | undefined;
|
29
|
+
radius?: string[] | undefined;
|
30
|
+
tooltip?: string[] | undefined;
|
31
|
+
}[];
|
32
|
+
baseConfig: {
|
33
|
+
vchart?: {
|
34
|
+
backgroundColor?: string | undefined;
|
35
|
+
label?: {
|
36
|
+
enable?: boolean | undefined;
|
37
|
+
} | undefined;
|
38
|
+
color?: {
|
39
|
+
colorScheme?: string[] | undefined;
|
40
|
+
colorMapping?: Record<string, string> | undefined;
|
41
|
+
} | undefined;
|
42
|
+
tooltip?: {
|
43
|
+
enable?: boolean | undefined;
|
44
|
+
} | undefined;
|
45
|
+
legend?: {
|
46
|
+
enable?: boolean | undefined;
|
47
|
+
} | undefined;
|
48
|
+
} | undefined;
|
49
|
+
vtable?: {
|
50
|
+
backgroundColor?: string | undefined;
|
51
|
+
} | undefined;
|
52
|
+
};
|
53
|
+
theme: string;
|
54
|
+
dimensions?: {
|
55
|
+
id: string;
|
56
|
+
location: "dimension" | "rowDimension" | "columnDimension";
|
57
|
+
alias?: string | undefined;
|
58
|
+
visible?: boolean | undefined;
|
59
|
+
}[] | undefined;
|
60
|
+
measures?: ({
|
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
|
+
} | {
|
76
|
+
id: string;
|
77
|
+
alias?: string | undefined;
|
78
|
+
visible?: boolean | undefined;
|
79
|
+
children?: ({
|
80
|
+
id: string;
|
81
|
+
alias?: string | undefined;
|
82
|
+
visible?: boolean | undefined;
|
83
|
+
autoFormat?: boolean | undefined;
|
84
|
+
format?: {
|
85
|
+
type: "number" | "percent" | "permille";
|
86
|
+
ratio: number;
|
87
|
+
symbol: string;
|
88
|
+
thousandSeparator: boolean;
|
89
|
+
decimalPlaces: number;
|
90
|
+
round: "round" | "floor" | "ceil";
|
91
|
+
prefix: string;
|
92
|
+
suffix: string;
|
93
|
+
} | undefined;
|
94
|
+
} | /*elided*/ any)[] | undefined;
|
95
|
+
})[] | undefined;
|
96
|
+
customTheme?: Record<string, {
|
97
|
+
baseConfig?: {
|
98
|
+
vchart?: {
|
99
|
+
backgroundColor?: string | undefined;
|
100
|
+
label?: {
|
101
|
+
enable?: boolean | undefined;
|
102
|
+
} | undefined;
|
103
|
+
color?: {
|
104
|
+
colorScheme?: string[] | undefined;
|
105
|
+
colorMapping?: Record<string, string> | undefined;
|
106
|
+
} | undefined;
|
107
|
+
tooltip?: {
|
108
|
+
enable?: boolean | undefined;
|
109
|
+
} | undefined;
|
110
|
+
legend?: {
|
111
|
+
enable?: boolean | undefined;
|
112
|
+
} | undefined;
|
113
|
+
} | undefined;
|
114
|
+
vtable?: {
|
115
|
+
backgroundColor?: string | undefined;
|
116
|
+
} | undefined;
|
117
|
+
} | undefined;
|
118
|
+
}> | undefined;
|
119
|
+
} | null;
|
12
120
|
getAdvancedPipeline: (chartType: ChartType) => AdvancedPipeline;
|
13
121
|
getSpecPipeline: (chartType: ChartType) => SpecPipeline;
|
122
|
+
getTheme: (themeKey: string) => {
|
123
|
+
baseConfig?: {
|
124
|
+
vchart?: {
|
125
|
+
backgroundColor?: string | undefined;
|
126
|
+
label?: {
|
127
|
+
enable?: boolean | undefined;
|
128
|
+
} | undefined;
|
129
|
+
color?: {
|
130
|
+
colorScheme?: string[] | undefined;
|
131
|
+
colorMapping?: Record<string, string> | undefined;
|
132
|
+
} | undefined;
|
133
|
+
tooltip?: {
|
134
|
+
enable?: boolean | undefined;
|
135
|
+
} | undefined;
|
136
|
+
legend?: {
|
137
|
+
enable?: boolean | undefined;
|
138
|
+
} | undefined;
|
139
|
+
} | undefined;
|
140
|
+
vtable?: {
|
141
|
+
backgroundColor?: string | undefined;
|
142
|
+
} | undefined;
|
143
|
+
} | undefined;
|
144
|
+
};
|
145
|
+
getThemeMap: () => Record<string, {
|
146
|
+
baseConfig?: {
|
147
|
+
vchart?: {
|
148
|
+
backgroundColor?: string | undefined;
|
149
|
+
label?: {
|
150
|
+
enable?: boolean | undefined;
|
151
|
+
} | undefined;
|
152
|
+
color?: {
|
153
|
+
colorScheme?: string[] | undefined;
|
154
|
+
colorMapping?: Record<string, string> | undefined;
|
155
|
+
} | undefined;
|
156
|
+
tooltip?: {
|
157
|
+
enable?: boolean | undefined;
|
158
|
+
} | undefined;
|
159
|
+
legend?: {
|
160
|
+
enable?: boolean | undefined;
|
161
|
+
} | undefined;
|
162
|
+
} | undefined;
|
163
|
+
vtable?: {
|
164
|
+
backgroundColor?: string | undefined;
|
165
|
+
} | undefined;
|
166
|
+
} | undefined;
|
167
|
+
}>;
|
14
168
|
get vseed(): VSeed;
|
15
169
|
set vseed(value: VSeed);
|
16
|
-
get advancedVSeed():
|
17
|
-
|
170
|
+
get advancedVSeed(): {
|
171
|
+
chartType: "table" | "pivotTable" | "line" | "column" | "columnPercent" | "columnParallel" | "bar" | "barPercent" | "barParallel" | "area" | "areaPercent" | "rose" | "pie" | "donut" | "dualAxis";
|
172
|
+
dataset: Record<string | number, any>[];
|
173
|
+
datasetReshapeInfo: {
|
174
|
+
foldInfo: {
|
175
|
+
foldMap: Record<string, string | undefined>;
|
176
|
+
measureId: string;
|
177
|
+
measureName: string;
|
178
|
+
measureValue: string;
|
179
|
+
};
|
180
|
+
unfoldInfo: {
|
181
|
+
colorItems: string[];
|
182
|
+
groupName: string;
|
183
|
+
};
|
184
|
+
};
|
185
|
+
encoding: {
|
186
|
+
x?: string[] | undefined;
|
187
|
+
y?: string[] | undefined;
|
188
|
+
color?: string[] | undefined;
|
189
|
+
group?: string[] | undefined;
|
190
|
+
angle?: string[] | undefined;
|
191
|
+
radius?: string[] | undefined;
|
192
|
+
tooltip?: string[] | undefined;
|
193
|
+
}[];
|
194
|
+
baseConfig: {
|
195
|
+
vchart?: {
|
196
|
+
backgroundColor?: string | undefined;
|
197
|
+
label?: {
|
198
|
+
enable?: boolean | undefined;
|
199
|
+
} | undefined;
|
200
|
+
color?: {
|
201
|
+
colorScheme?: string[] | undefined;
|
202
|
+
colorMapping?: Record<string, string> | undefined;
|
203
|
+
} | undefined;
|
204
|
+
tooltip?: {
|
205
|
+
enable?: boolean | undefined;
|
206
|
+
} | undefined;
|
207
|
+
legend?: {
|
208
|
+
enable?: boolean | undefined;
|
209
|
+
} | undefined;
|
210
|
+
} | undefined;
|
211
|
+
vtable?: {
|
212
|
+
backgroundColor?: string | undefined;
|
213
|
+
} | undefined;
|
214
|
+
};
|
215
|
+
theme: string;
|
216
|
+
dimensions?: {
|
217
|
+
id: string;
|
218
|
+
location: "dimension" | "rowDimension" | "columnDimension";
|
219
|
+
alias?: string | undefined;
|
220
|
+
visible?: boolean | undefined;
|
221
|
+
}[] | undefined;
|
222
|
+
measures?: ({
|
223
|
+
id: string;
|
224
|
+
alias?: string | undefined;
|
225
|
+
visible?: boolean | undefined;
|
226
|
+
autoFormat?: boolean | undefined;
|
227
|
+
format?: {
|
228
|
+
type: "number" | "percent" | "permille";
|
229
|
+
ratio: number;
|
230
|
+
symbol: string;
|
231
|
+
thousandSeparator: boolean;
|
232
|
+
decimalPlaces: number;
|
233
|
+
round: "round" | "floor" | "ceil";
|
234
|
+
prefix: string;
|
235
|
+
suffix: string;
|
236
|
+
} | undefined;
|
237
|
+
} | {
|
238
|
+
id: string;
|
239
|
+
alias?: string | undefined;
|
240
|
+
visible?: boolean | undefined;
|
241
|
+
children?: ({
|
242
|
+
id: string;
|
243
|
+
alias?: string | undefined;
|
244
|
+
visible?: boolean | undefined;
|
245
|
+
autoFormat?: boolean | undefined;
|
246
|
+
format?: {
|
247
|
+
type: "number" | "percent" | "permille";
|
248
|
+
ratio: number;
|
249
|
+
symbol: string;
|
250
|
+
thousandSeparator: boolean;
|
251
|
+
decimalPlaces: number;
|
252
|
+
round: "round" | "floor" | "ceil";
|
253
|
+
prefix: string;
|
254
|
+
suffix: string;
|
255
|
+
} | undefined;
|
256
|
+
} | /*elided*/ any)[] | undefined;
|
257
|
+
})[] | undefined;
|
258
|
+
customTheme?: Record<string, {
|
259
|
+
baseConfig?: {
|
260
|
+
vchart?: {
|
261
|
+
backgroundColor?: string | undefined;
|
262
|
+
label?: {
|
263
|
+
enable?: boolean | undefined;
|
264
|
+
} | undefined;
|
265
|
+
color?: {
|
266
|
+
colorScheme?: string[] | undefined;
|
267
|
+
colorMapping?: Record<string, string> | undefined;
|
268
|
+
} | undefined;
|
269
|
+
tooltip?: {
|
270
|
+
enable?: boolean | undefined;
|
271
|
+
} | undefined;
|
272
|
+
legend?: {
|
273
|
+
enable?: boolean | undefined;
|
274
|
+
} | undefined;
|
275
|
+
} | undefined;
|
276
|
+
vtable?: {
|
277
|
+
backgroundColor?: string | undefined;
|
278
|
+
} | undefined;
|
279
|
+
} | undefined;
|
280
|
+
}> | undefined;
|
281
|
+
} | null;
|
282
|
+
set advancedVSeed(value: {
|
283
|
+
chartType: "table" | "pivotTable" | "line" | "column" | "columnPercent" | "columnParallel" | "bar" | "barPercent" | "barParallel" | "area" | "areaPercent" | "rose" | "pie" | "donut" | "dualAxis";
|
284
|
+
dataset: Record<string | number, any>[];
|
285
|
+
datasetReshapeInfo: {
|
286
|
+
foldInfo: {
|
287
|
+
foldMap: Record<string, string | undefined>;
|
288
|
+
measureId: string;
|
289
|
+
measureName: string;
|
290
|
+
measureValue: string;
|
291
|
+
};
|
292
|
+
unfoldInfo: {
|
293
|
+
colorItems: string[];
|
294
|
+
groupName: string;
|
295
|
+
};
|
296
|
+
};
|
297
|
+
encoding: {
|
298
|
+
x?: string[] | undefined;
|
299
|
+
y?: string[] | undefined;
|
300
|
+
color?: string[] | undefined;
|
301
|
+
group?: string[] | undefined;
|
302
|
+
angle?: string[] | undefined;
|
303
|
+
radius?: string[] | undefined;
|
304
|
+
tooltip?: string[] | undefined;
|
305
|
+
}[];
|
306
|
+
baseConfig: {
|
307
|
+
vchart?: {
|
308
|
+
backgroundColor?: string | undefined;
|
309
|
+
label?: {
|
310
|
+
enable?: boolean | undefined;
|
311
|
+
} | undefined;
|
312
|
+
color?: {
|
313
|
+
colorScheme?: string[] | undefined;
|
314
|
+
colorMapping?: Record<string, string> | undefined;
|
315
|
+
} | undefined;
|
316
|
+
tooltip?: {
|
317
|
+
enable?: boolean | undefined;
|
318
|
+
} | undefined;
|
319
|
+
legend?: {
|
320
|
+
enable?: boolean | undefined;
|
321
|
+
} | undefined;
|
322
|
+
} | undefined;
|
323
|
+
vtable?: {
|
324
|
+
backgroundColor?: string | undefined;
|
325
|
+
} | undefined;
|
326
|
+
};
|
327
|
+
theme: string;
|
328
|
+
dimensions?: {
|
329
|
+
id: string;
|
330
|
+
location: "dimension" | "rowDimension" | "columnDimension";
|
331
|
+
alias?: string | undefined;
|
332
|
+
visible?: boolean | undefined;
|
333
|
+
}[] | undefined;
|
334
|
+
measures?: ({
|
335
|
+
id: string;
|
336
|
+
alias?: string | undefined;
|
337
|
+
visible?: boolean | undefined;
|
338
|
+
autoFormat?: boolean | undefined;
|
339
|
+
format?: {
|
340
|
+
type: "number" | "percent" | "permille";
|
341
|
+
ratio: number;
|
342
|
+
symbol: string;
|
343
|
+
thousandSeparator: boolean;
|
344
|
+
decimalPlaces: number;
|
345
|
+
round: "round" | "floor" | "ceil";
|
346
|
+
prefix: string;
|
347
|
+
suffix: string;
|
348
|
+
} | undefined;
|
349
|
+
} | {
|
350
|
+
id: string;
|
351
|
+
alias?: string | undefined;
|
352
|
+
visible?: boolean | undefined;
|
353
|
+
children?: ({
|
354
|
+
id: string;
|
355
|
+
alias?: string | undefined;
|
356
|
+
visible?: boolean | undefined;
|
357
|
+
autoFormat?: boolean | undefined;
|
358
|
+
format?: {
|
359
|
+
type: "number" | "percent" | "permille";
|
360
|
+
ratio: number;
|
361
|
+
symbol: string;
|
362
|
+
thousandSeparator: boolean;
|
363
|
+
decimalPlaces: number;
|
364
|
+
round: "round" | "floor" | "ceil";
|
365
|
+
prefix: string;
|
366
|
+
suffix: string;
|
367
|
+
} | undefined;
|
368
|
+
} | /*elided*/ any)[] | undefined;
|
369
|
+
})[] | undefined;
|
370
|
+
customTheme?: Record<string, {
|
371
|
+
baseConfig?: {
|
372
|
+
vchart?: {
|
373
|
+
backgroundColor?: string | undefined;
|
374
|
+
label?: {
|
375
|
+
enable?: boolean | undefined;
|
376
|
+
} | undefined;
|
377
|
+
color?: {
|
378
|
+
colorScheme?: string[] | undefined;
|
379
|
+
colorMapping?: Record<string, string> | undefined;
|
380
|
+
} | undefined;
|
381
|
+
tooltip?: {
|
382
|
+
enable?: boolean | undefined;
|
383
|
+
} | undefined;
|
384
|
+
legend?: {
|
385
|
+
enable?: boolean | undefined;
|
386
|
+
} | undefined;
|
387
|
+
} | undefined;
|
388
|
+
vtable?: {
|
389
|
+
backgroundColor?: string | undefined;
|
390
|
+
} | undefined;
|
391
|
+
} | undefined;
|
392
|
+
}> | undefined;
|
393
|
+
} | null);
|
394
|
+
static _advancedPipelineMap: Partial<Record<ChartType, AdvancedPipeline>>;
|
395
|
+
static _specPipelineMap: Partial<Record<ChartType, SpecPipeline>>;
|
396
|
+
static _themeMap: Record<string, CustomThemeConfig>;
|
397
|
+
static from: (vseed: VSeed) => Builder;
|
18
398
|
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const registerAll: () => void;
|
@@ -1 +1,3 @@
|
|
1
|
-
export { registerColumn,
|
1
|
+
export { registerLine, registerArea, registerAreaPercent, registerColumn, registerColumnParallel, registerColumnPercent, registerBar, registerBarPercent, registerBarParallel, } from './chartType';
|
2
|
+
export { registerCustomTheme, registerLightTheme, registerDarkTheme } from './theme';
|
3
|
+
export { registerAll } from './all';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { Dataset, FoldInfo, Measure, Measures } from '
|
1
|
+
import type { Dataset, FoldInfo, Measure, Measures } from '../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:
|
23
|
+
dataset: Record<string | number, any>[];
|
24
24
|
datasetGroup?: undefined;
|
25
25
|
} | {
|
26
26
|
datasetGroup: (never[] | {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import type { Dataset, Datum, Dimension, Measure } from '
|
2
|
-
import type { UnfoldInfo } from '
|
1
|
+
import type { Dataset, Datum, Dimension, Measure } from '../types';
|
2
|
+
import type { UnfoldInfo } from '../types';
|
3
3
|
/**
|
4
4
|
* TODO: 优化展开维度的性能
|
5
5
|
* 展开指定的维度
|