@visactor/vseed 0.0.6 → 0.0.8
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/builder.d.ts +5752 -0
- package/dist/builder/register/chartType.d.ts +1 -0
- package/dist/dataReshape/index.d.ts +1 -0
- package/dist/index.cjs +1362 -137
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1316 -133
- package/dist/index.js.map +1 -1
- package/dist/pipeline/advanced/pipeline/index.d.ts +1 -0
- package/dist/pipeline/advanced/pipeline/pie.d.ts +2 -0
- package/dist/pipeline/advanced/pipes/config/config.d.ts +11 -0
- package/dist/pipeline/advanced/pipes/config/index.d.ts +1 -0
- package/dist/pipeline/advanced/pipes/encoding/encodingPolar.d.ts +2 -0
- package/dist/pipeline/advanced/pipes/encoding/index.d.ts +1 -0
- package/dist/pipeline/advanced/pipes/index.d.ts +2 -1
- package/dist/pipeline/spec/pipeline/index.d.ts +1 -0
- package/dist/pipeline/spec/pipeline/pie.d.ts +2 -0
- package/dist/pipeline/spec/pipes/init/index.d.ts +1 -0
- package/dist/pipeline/spec/pipes/init/pie.d.ts +2 -0
- package/dist/pipeline/spec/pipes/pivotChart/index.d.ts +3 -0
- package/dist/pipeline/spec/pipes/pivotChart/pivotColumnDimensions.d.ts +2 -0
- package/dist/pipeline/spec/pipes/pivotChart/pivotGridStyle.d.ts +2 -0
- package/dist/pipeline/spec/pipes/pivotChart/pivotRowDimensions.d.ts +2 -0
- package/dist/pipeline/utils/chatType.d.ts +37 -1
- package/dist/pipeline/utils/index.d.ts +1 -1
- package/dist/types/advancedVSeed.d.ts +1438 -0
- package/dist/types/chartType/area/area.d.ts +11 -1
- package/dist/types/chartType/areaPercent/areaPercent.d.ts +11 -1
- package/dist/types/chartType/bar/bar.d.ts +11 -1
- package/dist/types/chartType/barParallel/barParallel.d.ts +11 -1
- package/dist/types/chartType/barPercent/barPercent.d.ts +11 -1
- package/dist/types/chartType/column/column.d.ts +11 -1
- package/dist/types/chartType/columnParallel/columnParallel.d.ts +11 -1
- package/dist/types/chartType/columnPercent/columnPercent.d.ts +11 -1
- package/dist/types/chartType/donut/donut.d.ts +1 -1
- package/dist/types/chartType/dualAxis/dualAxis.d.ts +1 -1
- package/dist/types/chartType/line/line.d.ts +11 -1
- package/dist/types/chartType/pie/pie.d.ts +4 -4
- package/dist/types/chartType/pivotTable/pivotTable.d.ts +1 -1
- package/dist/types/chartType/rose/rose.d.ts +4 -4
- package/dist/types/chartType/table/table.d.ts +1 -1
- package/dist/types/properties/chartType/index.d.ts +2 -2
- package/dist/types/properties/config/axis.d.ts +257 -0
- package/dist/types/properties/config/bandAxis.d.ts +82 -0
- package/dist/types/properties/config/config.d.ts +721 -0
- package/dist/types/properties/config/index.d.ts +4 -0
- package/dist/types/properties/config/linearAxis.d.ts +80 -0
- package/dist/types/properties/index.d.ts +1 -0
- package/dist/types/properties/theme/customTheme.d.ts +1438 -0
- package/package.json +1 -1
- /package/dist/types/properties/chartType/{zChartType.d.ts → chartType.d.ts} +0 -0
package/dist/index.cjs
CHANGED
@@ -24,9 +24,10 @@ var __webpack_require__ = {};
|
|
24
24
|
var __webpack_exports__ = {};
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
27
|
-
|
27
|
+
registerBar: ()=>registerBar,
|
28
28
|
isVChart: ()=>isVChart,
|
29
|
-
|
29
|
+
columnPercentSpecPipeline: ()=>columnPercentSpecPipeline,
|
30
|
+
pieAdvancedPipeline: ()=>pieAdvancedPipeline,
|
30
31
|
execPipeline: ()=>execPipeline,
|
31
32
|
areaSpecPipeline: ()=>areaSpecPipeline,
|
32
33
|
registerCustomTheme: ()=>registerCustomTheme,
|
@@ -35,21 +36,29 @@ __webpack_require__.d(__webpack_exports__, {
|
|
35
36
|
zMeasureGroup: ()=>zMeasureGroup,
|
36
37
|
zUnfoldInfo: ()=>zUnfoldInfo,
|
37
38
|
zMeasures: ()=>zMeasures,
|
39
|
+
FoldMeasureName: ()=>FoldMeasureName,
|
38
40
|
darkTheme: ()=>darkTheme,
|
39
41
|
columnPercentAdvancedPipeline: ()=>columnPercentAdvancedPipeline,
|
42
|
+
zAxis: ()=>zAxis,
|
40
43
|
isVTable: ()=>isVTable,
|
41
44
|
columnSpecPipeline: ()=>columnSpecPipeline,
|
42
|
-
|
45
|
+
UnfoldDimensionGroup: ()=>UnfoldDimensionGroup,
|
43
46
|
zDatasetReshapeInfo: ()=>zDatasetReshapeInfo,
|
44
|
-
|
47
|
+
zFoldInfo: ()=>zFoldInfo,
|
48
|
+
zYBandAxis: ()=>zYBandAxis,
|
49
|
+
zYLinearAxis: ()=>zYLinearAxis,
|
50
|
+
Separator: ()=>Separator,
|
45
51
|
columnAdvancedPipeline: ()=>columnAdvancedPipeline,
|
52
|
+
columnParallelSpecPipeline: ()=>columnParallelSpecPipeline,
|
46
53
|
zLabel: ()=>zLabel,
|
47
54
|
registerColumn: ()=>registerColumn,
|
48
55
|
zDimension: ()=>zDimension,
|
49
56
|
lightTheme: ()=>lightTheme,
|
50
57
|
registerColumnParallel: ()=>registerColumnParallel,
|
58
|
+
isPivotChart: ()=>isPivotChart,
|
51
59
|
zCustomTheme: ()=>zCustomTheme,
|
52
|
-
|
60
|
+
zXBandAxis: ()=>zXBandAxis,
|
61
|
+
dataReshapeFor1D1M: ()=>dataReshapeFor1D1M,
|
53
62
|
registerArea: ()=>registerArea,
|
54
63
|
zDataset: ()=>zDataset,
|
55
64
|
barPercentAdvancedPipeline: ()=>barPercentAdvancedPipeline,
|
@@ -59,9 +68,12 @@ __webpack_require__.d(__webpack_exports__, {
|
|
59
68
|
zMeasure: ()=>zMeasure,
|
60
69
|
zDimensions: ()=>zDimensions,
|
61
70
|
zLegend: ()=>zLegend,
|
71
|
+
FoldMeasureId: ()=>FoldMeasureId,
|
62
72
|
zTheme: ()=>zTheme,
|
63
73
|
zEncoding: ()=>zEncoding,
|
64
74
|
registerAreaPercent: ()=>registerAreaPercent,
|
75
|
+
zXLinearAxis: ()=>zXLinearAxis,
|
76
|
+
zConfig: ()=>zConfig,
|
65
77
|
zDatum: ()=>zDatum,
|
66
78
|
barAdvancedPipeline: ()=>barAdvancedPipeline,
|
67
79
|
zCustomThemeConfig: ()=>zCustomThemeConfig,
|
@@ -71,29 +83,150 @@ __webpack_require__.d(__webpack_exports__, {
|
|
71
83
|
foldMeasures: ()=>foldMeasures,
|
72
84
|
dataReshapeFor2D1M: ()=>dataReshapeFor2D1M,
|
73
85
|
registerLightTheme: ()=>registerLightTheme,
|
74
|
-
registerDarkTheme: ()=>registerDarkTheme,
|
75
86
|
zChartType: ()=>zChartType,
|
87
|
+
registerDarkTheme: ()=>registerDarkTheme,
|
76
88
|
barParallelAdvancedPipeline: ()=>barParallelAdvancedPipeline,
|
89
|
+
FoldMeasureValue: ()=>FoldMeasureValue,
|
77
90
|
barPercentSpecPipeline: ()=>barPercentSpecPipeline,
|
78
91
|
lineAdvancedPipeline: ()=>lineAdvancedPipeline,
|
79
|
-
|
92
|
+
pieSpecPipeline: ()=>pieSpecPipeline,
|
80
93
|
barSpecPipeline: ()=>barSpecPipeline,
|
81
94
|
lineSpecPipeline: ()=>lineSpecPipeline,
|
95
|
+
zTooltip: ()=>zTooltip,
|
82
96
|
zBaseConfig: ()=>zBaseConfig,
|
83
97
|
unfoldDimensions: ()=>unfoldDimensions,
|
84
98
|
areaAdvancedPipeline: ()=>areaAdvancedPipeline,
|
85
99
|
areaPercentSpecPipeline: ()=>areaPercentSpecPipeline,
|
86
100
|
Builder: ()=>Builder,
|
87
101
|
barParallelSpecPipeline: ()=>barParallelSpecPipeline,
|
88
|
-
|
102
|
+
registerAll: ()=>all_registerAll
|
89
103
|
});
|
90
|
-
const
|
91
|
-
const
|
92
|
-
const
|
93
|
-
|
104
|
+
const initAdvancedVSeed = (advancedVSeed, context)=>{
|
105
|
+
const { vseed } = context;
|
106
|
+
const { chartType = 'table' } = vseed;
|
107
|
+
return {
|
108
|
+
...advancedVSeed,
|
109
|
+
chartType
|
110
|
+
};
|
111
|
+
};
|
112
|
+
const isVTable = (chartType)=>[
|
113
|
+
'table',
|
114
|
+
'pivotTable'
|
115
|
+
].includes(chartType);
|
116
|
+
const isVChart = (chartType)=>!isVTable(chartType);
|
117
|
+
const isPivotChart = (vseed)=>{
|
118
|
+
const { measures, dimensions } = vseed;
|
119
|
+
const hasRowOrColumnDimension = dimensions && dimensions.some((dimension)=>'rowDimension' === dimension.location || 'columnDimension' === dimension.location);
|
120
|
+
const hasMeasureGroup = measures && measures.find((measure)=>measure && measure.children);
|
121
|
+
return hasRowOrColumnDimension || hasMeasureGroup;
|
122
|
+
};
|
123
|
+
const autoMeasures = (advancedVSeed, context)=>{
|
124
|
+
const result = {
|
125
|
+
...advancedVSeed
|
126
|
+
};
|
127
|
+
const { vseed } = context;
|
128
|
+
const { measures, dataset } = vseed;
|
129
|
+
if (!dataset) throw new Error('dataset is required');
|
130
|
+
if (0 === dataset.length) return result;
|
131
|
+
if (isPivotChart(vseed)) return autoMeasureGroup(advancedVSeed, context);
|
132
|
+
if (measures) {
|
133
|
+
result.measures = measures;
|
134
|
+
return result;
|
135
|
+
}
|
136
|
+
const top100dataset = dataset.slice(0, 100);
|
137
|
+
const sample = top100dataset.reduce((prev, cur)=>({
|
138
|
+
...prev,
|
139
|
+
...cur
|
140
|
+
}), {});
|
141
|
+
result.measures = Object.keys(sample).filter((key)=>top100dataset.some((item)=>'number' == typeof item[key]) && ![
|
142
|
+
'',
|
143
|
+
null,
|
144
|
+
void 0
|
145
|
+
].includes(key)).map((measure)=>({
|
146
|
+
id: measure,
|
147
|
+
alias: measure
|
148
|
+
}));
|
149
|
+
return result;
|
150
|
+
};
|
151
|
+
const autoMeasureGroup = (advancedVSeed, context)=>{
|
152
|
+
const { vseed } = context;
|
153
|
+
const { measures } = vseed;
|
154
|
+
const hasMeasureGroup = measures?.some((measure)=>measure.children);
|
155
|
+
if (!measures) return advancedVSeed;
|
156
|
+
if (!hasMeasureGroup) {
|
157
|
+
const newMeasures = [
|
158
|
+
{
|
159
|
+
id: 'measureGroup',
|
160
|
+
alias: 'measureGroup',
|
161
|
+
children: measures
|
162
|
+
}
|
163
|
+
];
|
164
|
+
return {
|
165
|
+
...advancedVSeed,
|
166
|
+
measures: newMeasures
|
167
|
+
};
|
168
|
+
}
|
169
|
+
let currentGroup = createEmptyMeasureGroup();
|
170
|
+
const measureGroups = [];
|
171
|
+
for (const measure of measures)if ('children' in measure) {
|
172
|
+
if (currentGroup.children?.length) {
|
173
|
+
currentGroup.id = currentGroup.children.map((item)=>item.id).join('-');
|
174
|
+
currentGroup.alias = currentGroup.children.map((item)=>item.alias).join('-');
|
175
|
+
measureGroups.push(currentGroup);
|
176
|
+
currentGroup = createEmptyMeasureGroup();
|
177
|
+
}
|
178
|
+
measureGroups.push(measure);
|
179
|
+
} else currentGroup.children?.push(measure);
|
180
|
+
if (currentGroup.children?.length) {
|
181
|
+
currentGroup.id = currentGroup.children.map((item)=>item.id).join('-');
|
182
|
+
currentGroup.alias = currentGroup.children.map((item)=>item.alias).join('-');
|
183
|
+
measureGroups.push(currentGroup);
|
184
|
+
currentGroup = createEmptyMeasureGroup();
|
185
|
+
}
|
186
|
+
advancedVSeed.measures = measureGroups;
|
187
|
+
return advancedVSeed;
|
188
|
+
};
|
189
|
+
const createEmptyMeasureGroup = ()=>({
|
190
|
+
id: '',
|
191
|
+
alias: '',
|
192
|
+
children: []
|
193
|
+
});
|
194
|
+
const autoDimensions = (advancedVSeed, context)=>{
|
195
|
+
const result = {
|
196
|
+
...advancedVSeed
|
197
|
+
};
|
198
|
+
const { vseed } = context;
|
199
|
+
const { dimensions, dataset } = vseed;
|
200
|
+
const { measures = [] } = advancedVSeed;
|
201
|
+
if (!dataset) throw new Error('dataset is required');
|
202
|
+
if (0 === dataset.length) return result;
|
203
|
+
if (dimensions) {
|
204
|
+
result.dimensions = dimensions;
|
205
|
+
return result;
|
206
|
+
}
|
207
|
+
const top100dataset = dataset.slice(0, 100);
|
208
|
+
const sample = top100dataset.reduce((prev, cur)=>({
|
209
|
+
...prev,
|
210
|
+
...cur
|
211
|
+
}), {});
|
212
|
+
result.dimensions = Object.keys(sample).filter((key)=>top100dataset.some((item)=>'string' == typeof item[key]) && ![
|
213
|
+
'',
|
214
|
+
null,
|
215
|
+
void 0
|
216
|
+
].includes(key) && !measures.some((measure)=>measure.id === key)).map((dim)=>({
|
217
|
+
id: dim,
|
218
|
+
alias: dim,
|
219
|
+
location: 'dimension'
|
220
|
+
}));
|
221
|
+
return result;
|
222
|
+
};
|
223
|
+
const FoldMeasureName = '__MeaName__';
|
224
|
+
const FoldMeasureValue = '__MeaValue__';
|
225
|
+
const FoldMeasureId = '__MeaId__';
|
226
|
+
const UnfoldDimensionGroup = '__DimGroup__';
|
94
227
|
const Separator = '-';
|
95
228
|
const external_remeda_namespaceObject = require("remeda");
|
96
|
-
const unfoldDimensions = (dataset, dimensions, measures, unfoldStartIndex = 0, foldGroupName =
|
229
|
+
const unfoldDimensions = (dataset, dimensions, measures, unfoldStartIndex = 0, foldGroupName = UnfoldDimensionGroup, dimensionsSeparator = Separator)=>{
|
97
230
|
if (unfoldStartIndex < 0 || unfoldStartIndex >= dimensions.length) throw new Error('unfoldStartIndex is out of range');
|
98
231
|
const dimensionsToBeUnfolded = dimensions.slice(unfoldStartIndex);
|
99
232
|
const unfoldInfo = {
|
@@ -121,7 +254,7 @@ const unfoldDimensions = (dataset, dimensions, measures, unfoldStartIndex = 0, f
|
|
121
254
|
};
|
122
255
|
};
|
123
256
|
const generateDimGroupName = (dimensionsToBeGrouped, datum, dimensionsSeparator)=>dimensionsToBeGrouped.map((dim)=>String(datum[dim.id])).join(dimensionsSeparator);
|
124
|
-
const foldMeasures = (dataset, measures, measureId =
|
257
|
+
const foldMeasures = (dataset, measures, measureId = FoldMeasureId, measureName = FoldMeasureName, measureValue = FoldMeasureValue)=>{
|
125
258
|
const foldInfo = {
|
126
259
|
measureId,
|
127
260
|
measureName,
|
@@ -161,7 +294,7 @@ const emptyReshapeResult = {
|
|
161
294
|
}
|
162
295
|
};
|
163
296
|
const dataReshapeFor2D1M = (dataset, dimensions, measures, options)=>{
|
164
|
-
const { foldMeasureId =
|
297
|
+
const { foldMeasureId = FoldMeasureId, foldMeasureName = FoldMeasureName, foldMeasureValue = FoldMeasureValue, unfoldDimensionGroup = UnfoldDimensionGroup } = options || {};
|
165
298
|
if (0 === dimensions.length && 0 === measures.length) return emptyReshapeResult;
|
166
299
|
const { dataset: foldedDataset, foldInfo } = foldMeasures(dataset, measures, foldMeasureId, foldMeasureName, foldMeasureValue);
|
167
300
|
if (0 === dimensions.length) {
|
@@ -222,8 +355,8 @@ const dataReshapeFor1D1M_emptyReshapeResult = {
|
|
222
355
|
colorItems: []
|
223
356
|
}
|
224
357
|
};
|
225
|
-
const
|
226
|
-
const { foldMeasureId =
|
358
|
+
const dataReshapeFor1D1M = (dataset, dimensions, measures, options)=>{
|
359
|
+
const { foldMeasureId = FoldMeasureId, foldMeasureName = FoldMeasureName, foldMeasureValue = FoldMeasureValue, unfoldDimensionGroup = UnfoldDimensionGroup } = options || {};
|
227
360
|
if (0 === dimensions.length && 0 === measures.length) return dataReshapeFor1D1M_emptyReshapeResult;
|
228
361
|
const { dataset: foldedDataset, foldInfo } = foldMeasures(dataset, measures, foldMeasureId, foldMeasureName, foldMeasureValue);
|
229
362
|
if (0 === dimensions.length) {
|
@@ -290,6 +423,67 @@ const reshapeTo2D1M = (advancedVSeed, context)=>{
|
|
290
423
|
measures
|
291
424
|
};
|
292
425
|
};
|
426
|
+
const reshapeTo1D1M = (advancedVSeed, context)=>{
|
427
|
+
const result = {
|
428
|
+
...advancedVSeed
|
429
|
+
};
|
430
|
+
const { vseed } = context;
|
431
|
+
const { dataset } = vseed;
|
432
|
+
const { dimensions, measures } = advancedVSeed;
|
433
|
+
if (!measures || !dimensions || !dataset) return result;
|
434
|
+
if (0 === measures.length) throw new Error('measures can not be empty');
|
435
|
+
const { dataset: newDatasets, foldInfo, unfoldInfo } = dataReshapeFor1D1M(dataset, dimensions, measures);
|
436
|
+
return {
|
437
|
+
...result,
|
438
|
+
dataset: newDatasets,
|
439
|
+
datasetReshapeInfo: [
|
440
|
+
{
|
441
|
+
id: '1D1M',
|
442
|
+
foldInfo,
|
443
|
+
unfoldInfo
|
444
|
+
}
|
445
|
+
]
|
446
|
+
};
|
447
|
+
};
|
448
|
+
const pivotReshapeTo1D1M = (advancedVSeed, context)=>{
|
449
|
+
const result = {
|
450
|
+
...advancedVSeed
|
451
|
+
};
|
452
|
+
const { vseed } = context;
|
453
|
+
const { dataset } = vseed;
|
454
|
+
const { dimensions, measures } = advancedVSeed;
|
455
|
+
if (!measures || !dimensions) return result;
|
456
|
+
const measureGroups = [];
|
457
|
+
if (measures) measures.forEach((measure)=>{
|
458
|
+
if (measure.children && measure.children.length > 0) measureGroups.push(measure);
|
459
|
+
});
|
460
|
+
const newDatasets = [];
|
461
|
+
const datasetReshapeInfo = [];
|
462
|
+
measureGroups.forEach((measureGroup)=>{
|
463
|
+
const measures = measureGroup.children;
|
464
|
+
if (!measures) return;
|
465
|
+
const commonDimensions = dimensions.filter((dim)=>'dimension' === dim.location);
|
466
|
+
const groupId = measureGroup.id;
|
467
|
+
const { dataset: newSubDataset, foldInfo, unfoldInfo } = dataReshapeFor1D1M(dataset, commonDimensions, measures, {
|
468
|
+
foldMeasureId: FoldMeasureId,
|
469
|
+
foldMeasureName: FoldMeasureName,
|
470
|
+
foldMeasureValue: FoldMeasureValue + groupId,
|
471
|
+
unfoldDimensionGroup: UnfoldDimensionGroup
|
472
|
+
});
|
473
|
+
const reshapeInfo = {
|
474
|
+
id: groupId,
|
475
|
+
foldInfo,
|
476
|
+
unfoldInfo
|
477
|
+
};
|
478
|
+
newDatasets.push(newSubDataset);
|
479
|
+
datasetReshapeInfo.push(reshapeInfo);
|
480
|
+
});
|
481
|
+
return {
|
482
|
+
...result,
|
483
|
+
dataset: newDatasets,
|
484
|
+
datasetReshapeInfo: datasetReshapeInfo
|
485
|
+
};
|
486
|
+
};
|
293
487
|
const pivotReshapeTo2D1M = (advancedVSeed, context)=>{
|
294
488
|
const result = {
|
295
489
|
...advancedVSeed
|
@@ -302,17 +496,18 @@ const pivotReshapeTo2D1M = (advancedVSeed, context)=>{
|
|
302
496
|
if (measures) measures.forEach((measure)=>{
|
303
497
|
if (measure.children && measure.children.length > 0) measureGroups.push(measure);
|
304
498
|
});
|
499
|
+
const commonDimensions = dimensions.filter((dim)=>'dimension' === dim.location);
|
305
500
|
const newDatasets = [];
|
306
501
|
const datasetReshapeInfo = [];
|
307
502
|
measureGroups.forEach((measureGroup)=>{
|
308
503
|
const measures = measureGroup.children;
|
309
504
|
if (!measures) return;
|
310
505
|
const groupId = measureGroup.id;
|
311
|
-
const { dataset: newSubDataset, foldInfo, unfoldInfo } = dataReshapeFor2D1M(dataset,
|
312
|
-
foldMeasureId:
|
313
|
-
foldMeasureName:
|
314
|
-
foldMeasureValue:
|
315
|
-
unfoldDimensionGroup:
|
506
|
+
const { dataset: newSubDataset, foldInfo, unfoldInfo } = dataReshapeFor2D1M(dataset, commonDimensions, measures, {
|
507
|
+
foldMeasureId: FoldMeasureId,
|
508
|
+
foldMeasureName: FoldMeasureName,
|
509
|
+
foldMeasureValue: FoldMeasureValue + groupId,
|
510
|
+
unfoldDimensionGroup: UnfoldDimensionGroup
|
316
511
|
});
|
317
512
|
const reshapeInfo = {
|
318
513
|
id: groupId,
|
@@ -400,69 +595,40 @@ const encodingYX = (advancedVSeed)=>{
|
|
400
595
|
encoding
|
401
596
|
};
|
402
597
|
};
|
403
|
-
const
|
404
|
-
const { vseed } = context;
|
405
|
-
const { chartType = 'table' } = vseed;
|
406
|
-
return {
|
407
|
-
...advancedVSeed,
|
408
|
-
chartType
|
409
|
-
};
|
410
|
-
};
|
411
|
-
const autoMeasures = (advancedVSeed, context)=>{
|
598
|
+
const encodingPolar = (advancedVSeed)=>{
|
412
599
|
const result = {
|
413
600
|
...advancedVSeed
|
414
601
|
};
|
415
|
-
const {
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
602
|
+
const { datasetReshapeInfo, dimensions } = advancedVSeed;
|
603
|
+
if (!datasetReshapeInfo || !dimensions) return result;
|
604
|
+
const encoding = datasetReshapeInfo.reduce((prev, cur)=>{
|
605
|
+
const { foldInfo, unfoldInfo } = cur;
|
606
|
+
const radius = [
|
607
|
+
foldInfo.measureValue
|
608
|
+
];
|
609
|
+
const angle = [
|
610
|
+
unfoldInfo.groupName
|
611
|
+
];
|
612
|
+
const group = [
|
613
|
+
unfoldInfo.groupName
|
614
|
+
];
|
615
|
+
const color = [
|
616
|
+
unfoldInfo.groupName
|
617
|
+
];
|
618
|
+
return [
|
425
619
|
...prev,
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
]
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
};
|
438
|
-
const autoDimensions = (advancedVSeed, context)=>{
|
439
|
-
const result = {
|
440
|
-
...advancedVSeed
|
620
|
+
{
|
621
|
+
angle,
|
622
|
+
radius,
|
623
|
+
group,
|
624
|
+
color
|
625
|
+
}
|
626
|
+
];
|
627
|
+
}, []);
|
628
|
+
return {
|
629
|
+
...result,
|
630
|
+
encoding
|
441
631
|
};
|
442
|
-
const { vseed } = context;
|
443
|
-
const { dimensions, dataset } = vseed;
|
444
|
-
const { measures = [] } = advancedVSeed;
|
445
|
-
if (!dataset) throw new Error('dataset is required');
|
446
|
-
if (0 === dataset.length) return result;
|
447
|
-
if (dimensions) {
|
448
|
-
result.dimensions = dimensions;
|
449
|
-
return result;
|
450
|
-
}
|
451
|
-
const top100dataset = dataset.slice(0, 100);
|
452
|
-
const sample = top100dataset.reduce((prev, cur)=>({
|
453
|
-
...prev,
|
454
|
-
...cur
|
455
|
-
}), {});
|
456
|
-
result.dimensions = Object.keys(sample).filter((key)=>top100dataset.some((item)=>'string' == typeof item[key]) && ![
|
457
|
-
'',
|
458
|
-
null,
|
459
|
-
void 0
|
460
|
-
].includes(key) && !measures.some((measure)=>measure.id === key)).map((dim)=>({
|
461
|
-
id: dim,
|
462
|
-
alias: dim,
|
463
|
-
location: 'dimension'
|
464
|
-
}));
|
465
|
-
return result;
|
466
632
|
};
|
467
633
|
const vchartBaseConfig = (advancedVSeed, context)=>{
|
468
634
|
const { vseed } = context;
|
@@ -483,20 +649,70 @@ const vchartBaseConfig = (advancedVSeed, context)=>{
|
|
483
649
|
};
|
484
650
|
return result;
|
485
651
|
};
|
652
|
+
const lineConfig = (advancedVSeed, context)=>{
|
653
|
+
const { vseed } = context;
|
654
|
+
const { chartType } = vseed;
|
655
|
+
const result = {
|
656
|
+
...advancedVSeed
|
657
|
+
};
|
658
|
+
const config = (0, external_remeda_namespaceObject.pick)(vseed, [
|
659
|
+
'xAxis',
|
660
|
+
'yAxis'
|
661
|
+
]);
|
662
|
+
result.config = {
|
663
|
+
...result.config || {},
|
664
|
+
[chartType]: {
|
665
|
+
...config
|
666
|
+
}
|
667
|
+
};
|
668
|
+
return result;
|
669
|
+
};
|
670
|
+
const pieConfig = (advancedVSeed, context)=>{
|
671
|
+
const { vseed } = context;
|
672
|
+
const { chartType } = vseed;
|
673
|
+
const result = {
|
674
|
+
...advancedVSeed
|
675
|
+
};
|
676
|
+
const config = (0, external_remeda_namespaceObject.pick)(vseed, []);
|
677
|
+
result.config = {
|
678
|
+
...result.config || {},
|
679
|
+
[chartType]: {
|
680
|
+
...config
|
681
|
+
}
|
682
|
+
};
|
683
|
+
return result;
|
684
|
+
};
|
685
|
+
const barConfig = lineConfig;
|
686
|
+
const barParallelConfig = lineConfig;
|
687
|
+
const barPercentConfig = lineConfig;
|
688
|
+
const columnConfig = lineConfig;
|
689
|
+
const columnParallelConfig = lineConfig;
|
690
|
+
const columnPercentConfig = lineConfig;
|
691
|
+
const areaConfig = lineConfig;
|
692
|
+
const areaPercentConfig = lineConfig;
|
486
693
|
const vchartTheme = (advancedVSeed, context)=>{
|
487
694
|
const { customTheme, vseed } = context;
|
488
|
-
const { theme = 'light' } = vseed;
|
695
|
+
const { theme = 'light', chartType } = vseed;
|
489
696
|
const result = {
|
490
697
|
...advancedVSeed
|
491
698
|
};
|
492
699
|
if (!customTheme || !customTheme[theme]) return result;
|
493
|
-
const
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
700
|
+
const baseConfigVChartTheme = customTheme?.[theme].baseConfig?.vchart;
|
701
|
+
if (baseConfigVChartTheme) {
|
702
|
+
const baseConfigVChart = result.baseConfig?.vchart || {};
|
703
|
+
const mergedConfig = (0, external_remeda_namespaceObject.mergeDeep)(baseConfigVChartTheme, (0, external_remeda_namespaceObject.clone)(baseConfigVChart));
|
704
|
+
result.baseConfig = {
|
705
|
+
vchart: mergedConfig
|
706
|
+
};
|
707
|
+
}
|
708
|
+
const chartConfigTheme = customTheme?.[theme].config?.[chartType];
|
709
|
+
if (chartConfigTheme) {
|
710
|
+
const chartConfig = result.config?.[chartType] || {};
|
711
|
+
const mergedConfig = (0, external_remeda_namespaceObject.mergeDeep)(chartConfigTheme, (0, external_remeda_namespaceObject.clone)(chartConfig));
|
712
|
+
result.config = {
|
713
|
+
[chartType]: mergedConfig
|
714
|
+
};
|
715
|
+
}
|
500
716
|
return result;
|
501
717
|
};
|
502
718
|
const execPipeline = (pipeline, context, initialValue = {})=>{
|
@@ -505,8 +721,8 @@ const execPipeline = (pipeline, context, initialValue = {})=>{
|
|
505
721
|
};
|
506
722
|
const pivotAdapter = (pipeline, pivotPipeline)=>(advancedVSeed, context)=>{
|
507
723
|
const { vseed } = context;
|
508
|
-
const
|
509
|
-
if (
|
724
|
+
const usePivotChart = isPivotChart(vseed);
|
725
|
+
if (usePivotChart) return execPipeline(pivotPipeline, context, advancedVSeed);
|
510
726
|
return execPipeline(pipeline, context, advancedVSeed);
|
511
727
|
};
|
512
728
|
const lineAdvancedPipeline = [
|
@@ -520,6 +736,7 @@ const lineAdvancedPipeline = [
|
|
520
736
|
]),
|
521
737
|
encodingXY,
|
522
738
|
vchartBaseConfig,
|
739
|
+
lineConfig,
|
523
740
|
vchartTheme
|
524
741
|
];
|
525
742
|
const barAdvancedPipeline = [
|
@@ -532,6 +749,7 @@ const barAdvancedPipeline = [
|
|
532
749
|
pivotReshapeTo2D1M
|
533
750
|
]),
|
534
751
|
encodingYX,
|
752
|
+
barConfig,
|
535
753
|
vchartBaseConfig,
|
536
754
|
vchartTheme
|
537
755
|
];
|
@@ -545,6 +763,7 @@ const barParallelAdvancedPipeline = [
|
|
545
763
|
pivotReshapeTo2D1M
|
546
764
|
]),
|
547
765
|
encodingYX,
|
766
|
+
barParallelConfig,
|
548
767
|
vchartBaseConfig,
|
549
768
|
vchartTheme
|
550
769
|
];
|
@@ -558,6 +777,7 @@ const barPercentAdvancedPipeline = [
|
|
558
777
|
pivotReshapeTo2D1M
|
559
778
|
]),
|
560
779
|
encodingYX,
|
780
|
+
barPercentConfig,
|
561
781
|
vchartBaseConfig,
|
562
782
|
vchartTheme
|
563
783
|
];
|
@@ -571,6 +791,7 @@ const columnAdvancedPipeline = [
|
|
571
791
|
pivotReshapeTo2D1M
|
572
792
|
]),
|
573
793
|
encodingXY,
|
794
|
+
columnConfig,
|
574
795
|
vchartBaseConfig,
|
575
796
|
vchartTheme
|
576
797
|
];
|
@@ -584,6 +805,7 @@ const columnParallelAdvancedPipeline = [
|
|
584
805
|
pivotReshapeTo2D1M
|
585
806
|
]),
|
586
807
|
encodingXY,
|
808
|
+
columnParallelConfig,
|
587
809
|
vchartBaseConfig,
|
588
810
|
vchartTheme
|
589
811
|
];
|
@@ -597,6 +819,7 @@ const columnPercentAdvancedPipeline = [
|
|
597
819
|
pivotReshapeTo2D1M
|
598
820
|
]),
|
599
821
|
encodingXY,
|
822
|
+
columnPercentConfig,
|
600
823
|
vchartBaseConfig,
|
601
824
|
vchartTheme
|
602
825
|
];
|
@@ -610,6 +833,7 @@ const areaAdvancedPipeline = [
|
|
610
833
|
pivotReshapeTo2D1M
|
611
834
|
]),
|
612
835
|
encodingXY,
|
836
|
+
areaConfig,
|
613
837
|
vchartBaseConfig,
|
614
838
|
vchartTheme
|
615
839
|
];
|
@@ -623,6 +847,21 @@ const areaPercentAdvancedPipeline = [
|
|
623
847
|
pivotReshapeTo2D1M
|
624
848
|
]),
|
625
849
|
encodingXY,
|
850
|
+
areaPercentConfig,
|
851
|
+
vchartBaseConfig,
|
852
|
+
vchartTheme
|
853
|
+
];
|
854
|
+
const pieAdvancedPipeline = [
|
855
|
+
initAdvancedVSeed,
|
856
|
+
autoMeasures,
|
857
|
+
autoDimensions,
|
858
|
+
pivotAdapter([
|
859
|
+
reshapeTo1D1M
|
860
|
+
], [
|
861
|
+
pivotReshapeTo1D1M
|
862
|
+
]),
|
863
|
+
encodingPolar,
|
864
|
+
pieConfig,
|
626
865
|
vchartBaseConfig,
|
627
866
|
vchartTheme
|
628
867
|
];
|
@@ -670,6 +909,11 @@ const initColumn = (spec, context)=>{
|
|
670
909
|
result.yField = encoding[0].y[0];
|
671
910
|
result.seriesField = encoding[0].group[0];
|
672
911
|
result.padding = 0;
|
912
|
+
result.region = [
|
913
|
+
{
|
914
|
+
clip: true
|
915
|
+
}
|
916
|
+
];
|
673
917
|
return result;
|
674
918
|
};
|
675
919
|
const initBar = (spec, context)=>{
|
@@ -685,6 +929,11 @@ const initBar = (spec, context)=>{
|
|
685
929
|
result.xField = encoding[0].x?.[0];
|
686
930
|
result.seriesField = encoding[0].group?.[0];
|
687
931
|
result.padding = 0;
|
932
|
+
result.region = [
|
933
|
+
{
|
934
|
+
clip: true
|
935
|
+
}
|
936
|
+
];
|
688
937
|
return result;
|
689
938
|
};
|
690
939
|
const initBarParallel = (spec, context)=>{
|
@@ -704,6 +953,11 @@ const initBarParallel = (spec, context)=>{
|
|
704
953
|
result.xField = encoding[0].x[0];
|
705
954
|
result.seriesField = encoding[0].group[0];
|
706
955
|
result.padding = 0;
|
956
|
+
result.region = [
|
957
|
+
{
|
958
|
+
clip: true
|
959
|
+
}
|
960
|
+
];
|
707
961
|
return result;
|
708
962
|
};
|
709
963
|
const initArea = (spec, context)=>{
|
@@ -719,6 +973,11 @@ const initArea = (spec, context)=>{
|
|
719
973
|
result.yField = encoding[0].y[0];
|
720
974
|
result.seriesField = encoding[0].group[0];
|
721
975
|
result.padding = 0;
|
976
|
+
result.region = [
|
977
|
+
{
|
978
|
+
clip: true
|
979
|
+
}
|
980
|
+
];
|
722
981
|
return result;
|
723
982
|
};
|
724
983
|
const initLine = (spec, context)=>{
|
@@ -734,6 +993,11 @@ const initLine = (spec, context)=>{
|
|
734
993
|
result.yField = encoding[0].y[0];
|
735
994
|
result.seriesField = encoding[0].group[0];
|
736
995
|
result.padding = 0;
|
996
|
+
result.region = [
|
997
|
+
{
|
998
|
+
clip: true
|
999
|
+
}
|
1000
|
+
];
|
737
1001
|
return result;
|
738
1002
|
};
|
739
1003
|
const initColumnParallel = (spec, context)=>{
|
@@ -753,6 +1017,32 @@ const initColumnParallel = (spec, context)=>{
|
|
753
1017
|
result.yField = encoding[0].y[0];
|
754
1018
|
result.seriesField = encoding[0].group[0];
|
755
1019
|
result.padding = 0;
|
1020
|
+
result.region = [
|
1021
|
+
{
|
1022
|
+
clip: true
|
1023
|
+
}
|
1024
|
+
];
|
1025
|
+
return result;
|
1026
|
+
};
|
1027
|
+
const initPie = (spec, context)=>{
|
1028
|
+
const result = {
|
1029
|
+
...spec
|
1030
|
+
};
|
1031
|
+
const { advancedVSeed } = context;
|
1032
|
+
const { encoding } = advancedVSeed;
|
1033
|
+
if (!encoding[0].angle || !encoding[0].radius || !encoding[0].group) return result;
|
1034
|
+
result.type = 'pie';
|
1035
|
+
result.outerRadius = 0.8;
|
1036
|
+
result.innerRadius = 0;
|
1037
|
+
result.valueField = encoding[0].radius[0];
|
1038
|
+
result.categoryField = encoding[0].angle[0];
|
1039
|
+
result.seriesField = encoding[0].group[0];
|
1040
|
+
result.padding = 0;
|
1041
|
+
result.region = [
|
1042
|
+
{
|
1043
|
+
clip: true
|
1044
|
+
}
|
1045
|
+
];
|
756
1046
|
return result;
|
757
1047
|
};
|
758
1048
|
const initPivot = (spec)=>{
|
@@ -770,67 +1060,328 @@ const initPivot = (spec)=>{
|
|
770
1060
|
indicatorsAsCol: false
|
771
1061
|
};
|
772
1062
|
};
|
773
|
-
const xBand = (spec)=>{
|
1063
|
+
const xBand = (spec, context)=>{
|
774
1064
|
const result = {
|
775
1065
|
...spec
|
776
1066
|
};
|
1067
|
+
const { advancedVSeed, vseed } = context;
|
1068
|
+
const { chartType } = vseed;
|
1069
|
+
const config = advancedVSeed.config?.[chartType]?.xAxis;
|
777
1070
|
if (!result.axes) result.axes = [];
|
1071
|
+
if (!config) {
|
1072
|
+
result.axes = [
|
1073
|
+
...result.axes,
|
1074
|
+
{
|
1075
|
+
visible: true,
|
1076
|
+
type: 'band',
|
1077
|
+
orient: 'bottom'
|
1078
|
+
}
|
1079
|
+
];
|
1080
|
+
return result;
|
1081
|
+
}
|
1082
|
+
const { visible = true, label, tick, title, grid, line, labelAutoHide, labelAutoHideGap, labelAutoLimit, labelAutoLimitLength, labelAutoRotate, labelAutoRotateAngleRange } = config;
|
1083
|
+
const sampling = !(labelAutoHide || labelAutoRotate || labelAutoLimit);
|
1084
|
+
const bandAxis = {
|
1085
|
+
visible,
|
1086
|
+
type: 'band',
|
1087
|
+
orient: 'bottom',
|
1088
|
+
maxHeight: labelAutoLimitLength,
|
1089
|
+
sampling,
|
1090
|
+
hover: true,
|
1091
|
+
label: {
|
1092
|
+
visible: label?.visible,
|
1093
|
+
flush: true,
|
1094
|
+
space: 8,
|
1095
|
+
style: {
|
1096
|
+
maxLineWidth: labelAutoLimitLength,
|
1097
|
+
fill: label?.labelColor,
|
1098
|
+
angle: label?.labelAngle,
|
1099
|
+
fontSize: label?.labelFontSize,
|
1100
|
+
fontWeight: label?.labelFontWeight
|
1101
|
+
},
|
1102
|
+
minGap: labelAutoHideGap,
|
1103
|
+
autoHide: labelAutoHide,
|
1104
|
+
autoHideMethod: 'greedy',
|
1105
|
+
autoHideSeparation: labelAutoHideGap,
|
1106
|
+
autoLimit: labelAutoLimit,
|
1107
|
+
autoRotate: labelAutoRotate,
|
1108
|
+
autoRotateAngle: labelAutoRotateAngleRange,
|
1109
|
+
lastVisible: true
|
1110
|
+
},
|
1111
|
+
title: {
|
1112
|
+
visible: title?.visible,
|
1113
|
+
text: title?.titleText,
|
1114
|
+
style: {
|
1115
|
+
fill: title?.titleColor,
|
1116
|
+
fontSize: title?.titleFontSize,
|
1117
|
+
fontWeight: title?.titleFontWeight
|
1118
|
+
}
|
1119
|
+
},
|
1120
|
+
tick: {
|
1121
|
+
visible: tick?.visible,
|
1122
|
+
tickSize: tick?.tickSize,
|
1123
|
+
inside: tick?.tickInside,
|
1124
|
+
style: {
|
1125
|
+
stroke: tick?.tickColor
|
1126
|
+
}
|
1127
|
+
},
|
1128
|
+
grid: {
|
1129
|
+
visible: grid?.visible,
|
1130
|
+
style: {
|
1131
|
+
lineWidth: grid?.gridWidth,
|
1132
|
+
stroke: grid?.gridColor
|
1133
|
+
}
|
1134
|
+
},
|
1135
|
+
domainLine: {
|
1136
|
+
visible: line?.visible,
|
1137
|
+
style: {
|
1138
|
+
lineWidth: line?.lineWidth,
|
1139
|
+
stroke: line?.lineColor
|
1140
|
+
}
|
1141
|
+
}
|
1142
|
+
};
|
778
1143
|
result.axes = [
|
779
1144
|
...result.axes,
|
780
|
-
|
781
|
-
visible: true,
|
782
|
-
type: 'band',
|
783
|
-
orient: 'bottom'
|
784
|
-
}
|
1145
|
+
bandAxis
|
785
1146
|
];
|
786
1147
|
return result;
|
787
1148
|
};
|
788
|
-
const xLinear = (spec)=>{
|
1149
|
+
const xLinear = (spec, context)=>{
|
789
1150
|
const result = {
|
790
1151
|
...spec
|
791
1152
|
};
|
1153
|
+
const { advancedVSeed, vseed } = context;
|
1154
|
+
const { chartType } = vseed;
|
1155
|
+
const config = advancedVSeed.config?.[chartType]?.xAxis;
|
792
1156
|
if (!result.axes) result.axes = [];
|
1157
|
+
if (!config) {
|
1158
|
+
result.axes = [
|
1159
|
+
...result.axes,
|
1160
|
+
{
|
1161
|
+
visible: true,
|
1162
|
+
type: 'linear',
|
1163
|
+
orient: 'bottom'
|
1164
|
+
}
|
1165
|
+
];
|
1166
|
+
return result;
|
1167
|
+
}
|
1168
|
+
const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min } = config;
|
1169
|
+
const linearAxis = {
|
1170
|
+
visible,
|
1171
|
+
type: 'linear',
|
1172
|
+
orient: 'bottom',
|
1173
|
+
nice,
|
1174
|
+
zero,
|
1175
|
+
inverse,
|
1176
|
+
max,
|
1177
|
+
min,
|
1178
|
+
label: {
|
1179
|
+
visible: label?.visible,
|
1180
|
+
style: {
|
1181
|
+
fill: label?.labelColor,
|
1182
|
+
angle: label?.labelAngle,
|
1183
|
+
fontSize: label?.labelFontSize,
|
1184
|
+
fontWeight: label?.labelFontWeight
|
1185
|
+
}
|
1186
|
+
},
|
1187
|
+
title: {
|
1188
|
+
visible: title?.visible,
|
1189
|
+
text: title?.titleText,
|
1190
|
+
style: {
|
1191
|
+
fill: title?.titleColor,
|
1192
|
+
fontSize: title?.titleFontSize,
|
1193
|
+
fontWeight: title?.titleFontWeight
|
1194
|
+
}
|
1195
|
+
},
|
1196
|
+
tick: {
|
1197
|
+
visible: tick?.visible,
|
1198
|
+
tickSize: tick?.tickSize,
|
1199
|
+
inside: tick?.tickInside,
|
1200
|
+
style: {
|
1201
|
+
stroke: tick?.tickColor
|
1202
|
+
}
|
1203
|
+
},
|
1204
|
+
grid: {
|
1205
|
+
visible: grid?.visible,
|
1206
|
+
style: {
|
1207
|
+
lineWidth: grid?.gridWidth,
|
1208
|
+
stroke: grid?.gridColor
|
1209
|
+
}
|
1210
|
+
},
|
1211
|
+
domainLine: {
|
1212
|
+
visible: line?.visible,
|
1213
|
+
style: {
|
1214
|
+
lineWidth: line?.lineWidth,
|
1215
|
+
stroke: line?.lineColor
|
1216
|
+
}
|
1217
|
+
}
|
1218
|
+
};
|
793
1219
|
result.axes = [
|
794
1220
|
...result.axes,
|
795
|
-
|
796
|
-
visible: true,
|
797
|
-
type: 'linear',
|
798
|
-
orient: 'bottom',
|
799
|
-
nice: true,
|
800
|
-
zero: true
|
801
|
-
}
|
1221
|
+
linearAxis
|
802
1222
|
];
|
803
1223
|
return result;
|
804
1224
|
};
|
805
|
-
const yBand = (spec)=>{
|
1225
|
+
const yBand = (spec, context)=>{
|
806
1226
|
const result = {
|
807
1227
|
...spec
|
808
1228
|
};
|
1229
|
+
const { advancedVSeed, vseed } = context;
|
1230
|
+
const { chartType } = vseed;
|
1231
|
+
const config = advancedVSeed.config?.[chartType]?.yAxis;
|
809
1232
|
if (!result.axes) result.axes = [];
|
1233
|
+
if (!config) {
|
1234
|
+
result.axes = [
|
1235
|
+
...result.axes,
|
1236
|
+
{
|
1237
|
+
visible: true,
|
1238
|
+
type: 'band',
|
1239
|
+
orient: 'left'
|
1240
|
+
}
|
1241
|
+
];
|
1242
|
+
return result;
|
1243
|
+
}
|
1244
|
+
const { visible = true, label, tick, title, grid, line, labelAutoHide, labelAutoHideGap, labelAutoLimit, labelAutoLimitLength, labelAutoRotate, labelAutoRotateAngleRange } = config;
|
1245
|
+
const sampling = !(labelAutoHide || labelAutoRotate || labelAutoLimit);
|
1246
|
+
const bandAxis = {
|
1247
|
+
visible,
|
1248
|
+
type: 'band',
|
1249
|
+
orient: 'left',
|
1250
|
+
maxWidth: labelAutoLimitLength,
|
1251
|
+
sampling,
|
1252
|
+
hover: true,
|
1253
|
+
label: {
|
1254
|
+
visible: label?.visible,
|
1255
|
+
flush: true,
|
1256
|
+
containerAlign: 'left',
|
1257
|
+
space: 8,
|
1258
|
+
style: {
|
1259
|
+
maxLineWidth: labelAutoLimitLength,
|
1260
|
+
fill: label?.labelColor,
|
1261
|
+
angle: label?.labelAngle,
|
1262
|
+
fontSize: label?.labelFontSize,
|
1263
|
+
fontWeight: label?.labelFontWeight
|
1264
|
+
},
|
1265
|
+
minGap: labelAutoHideGap,
|
1266
|
+
autoHide: labelAutoHide,
|
1267
|
+
autoHideMethod: 'greedy',
|
1268
|
+
autoHideSeparation: labelAutoHideGap,
|
1269
|
+
autoLimit: labelAutoLimit,
|
1270
|
+
autoRotate: labelAutoRotate,
|
1271
|
+
autoRotateAngle: labelAutoRotateAngleRange,
|
1272
|
+
lastVisible: true
|
1273
|
+
},
|
1274
|
+
title: {
|
1275
|
+
visible: title?.visible,
|
1276
|
+
text: title?.titleText,
|
1277
|
+
style: {
|
1278
|
+
fill: title?.titleColor,
|
1279
|
+
fontSize: title?.titleFontSize,
|
1280
|
+
fontWeight: title?.titleFontWeight
|
1281
|
+
}
|
1282
|
+
},
|
1283
|
+
tick: {
|
1284
|
+
visible: tick?.visible,
|
1285
|
+
tickSize: tick?.tickSize,
|
1286
|
+
inside: tick?.tickInside,
|
1287
|
+
style: {
|
1288
|
+
stroke: tick?.tickColor
|
1289
|
+
}
|
1290
|
+
},
|
1291
|
+
grid: {
|
1292
|
+
visible: grid?.visible,
|
1293
|
+
style: {
|
1294
|
+
lineWidth: grid?.gridWidth,
|
1295
|
+
stroke: grid?.gridColor
|
1296
|
+
}
|
1297
|
+
},
|
1298
|
+
domainLine: {
|
1299
|
+
visible: line?.visible,
|
1300
|
+
style: {
|
1301
|
+
lineWidth: line?.lineWidth,
|
1302
|
+
stroke: line?.lineColor
|
1303
|
+
}
|
1304
|
+
}
|
1305
|
+
};
|
810
1306
|
result.axes = [
|
811
1307
|
...result.axes,
|
812
|
-
|
813
|
-
visible: true,
|
814
|
-
type: 'band',
|
815
|
-
orient: 'left'
|
816
|
-
}
|
1308
|
+
bandAxis
|
817
1309
|
];
|
818
1310
|
return result;
|
819
1311
|
};
|
820
|
-
const yLinear = (spec)=>{
|
1312
|
+
const yLinear = (spec, context)=>{
|
821
1313
|
const result = {
|
822
1314
|
...spec
|
823
1315
|
};
|
1316
|
+
const { advancedVSeed, vseed } = context;
|
1317
|
+
const { chartType } = vseed;
|
1318
|
+
const config = advancedVSeed.config?.[chartType]?.yAxis;
|
824
1319
|
if (!result.axes) result.axes = [];
|
1320
|
+
if (!config) {
|
1321
|
+
result.axes = [
|
1322
|
+
...result.axes,
|
1323
|
+
{
|
1324
|
+
visible: true,
|
1325
|
+
type: 'linear',
|
1326
|
+
orient: 'left'
|
1327
|
+
}
|
1328
|
+
];
|
1329
|
+
return result;
|
1330
|
+
}
|
1331
|
+
const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min } = config;
|
1332
|
+
const linearAxis = {
|
1333
|
+
visible,
|
1334
|
+
type: 'linear',
|
1335
|
+
orient: 'left',
|
1336
|
+
nice,
|
1337
|
+
zero,
|
1338
|
+
inverse,
|
1339
|
+
max,
|
1340
|
+
min,
|
1341
|
+
label: {
|
1342
|
+
visible: label?.visible,
|
1343
|
+
style: {
|
1344
|
+
fill: label?.labelColor,
|
1345
|
+
angle: label?.labelAngle,
|
1346
|
+
fontSize: label?.labelFontSize,
|
1347
|
+
fontWeight: label?.labelFontWeight
|
1348
|
+
}
|
1349
|
+
},
|
1350
|
+
title: {
|
1351
|
+
visible: title?.visible,
|
1352
|
+
text: title?.titleText,
|
1353
|
+
style: {
|
1354
|
+
fill: title?.titleColor,
|
1355
|
+
fontSize: title?.titleFontSize,
|
1356
|
+
fontWeight: title?.titleFontWeight
|
1357
|
+
}
|
1358
|
+
},
|
1359
|
+
tick: {
|
1360
|
+
visible: tick?.visible,
|
1361
|
+
tickSize: tick?.tickSize,
|
1362
|
+
inside: tick?.tickInside,
|
1363
|
+
style: {
|
1364
|
+
stroke: tick?.tickColor
|
1365
|
+
}
|
1366
|
+
},
|
1367
|
+
grid: {
|
1368
|
+
visible: grid?.visible,
|
1369
|
+
style: {
|
1370
|
+
lineWidth: grid?.gridWidth,
|
1371
|
+
stroke: grid?.gridColor
|
1372
|
+
}
|
1373
|
+
},
|
1374
|
+
domainLine: {
|
1375
|
+
visible: line?.visible,
|
1376
|
+
style: {
|
1377
|
+
lineWidth: line?.lineWidth,
|
1378
|
+
stroke: line?.lineColor
|
1379
|
+
}
|
1380
|
+
}
|
1381
|
+
};
|
825
1382
|
result.axes = [
|
826
1383
|
...result.axes,
|
827
|
-
|
828
|
-
visible: true,
|
829
|
-
type: 'linear',
|
830
|
-
orient: 'left',
|
831
|
-
nice: true,
|
832
|
-
zero: true
|
833
|
-
}
|
1384
|
+
linearAxis
|
834
1385
|
];
|
835
1386
|
return result;
|
836
1387
|
};
|
@@ -920,11 +1471,11 @@ const pivotLegend = (spec, context)=>{
|
|
920
1471
|
const { legend, color } = baseConfig;
|
921
1472
|
const { enable } = legend;
|
922
1473
|
const { colorScheme } = color;
|
923
|
-
|
1474
|
+
const legends = {
|
924
1475
|
visible: enable,
|
925
1476
|
alignSelf: 'end',
|
926
1477
|
type: 'discrete',
|
927
|
-
position: '
|
1478
|
+
position: 'middle',
|
928
1479
|
data: colorItems.map((d, index)=>({
|
929
1480
|
label: d,
|
930
1481
|
shape: {
|
@@ -932,9 +1483,29 @@ const pivotLegend = (spec, context)=>{
|
|
932
1483
|
fill: colorScheme[index]
|
933
1484
|
}
|
934
1485
|
})),
|
1486
|
+
item: {
|
1487
|
+
background: {
|
1488
|
+
visible: true,
|
1489
|
+
state: {
|
1490
|
+
selectedHover: {
|
1491
|
+
fill: '#000000',
|
1492
|
+
fillOpacity: 0.05
|
1493
|
+
}
|
1494
|
+
}
|
1495
|
+
},
|
1496
|
+
label: {
|
1497
|
+
style: {
|
1498
|
+
fontSize: 12,
|
1499
|
+
fill: '#6F6F6F'
|
1500
|
+
}
|
1501
|
+
}
|
1502
|
+
},
|
935
1503
|
orient: 'bottom'
|
936
1504
|
};
|
937
|
-
return
|
1505
|
+
return {
|
1506
|
+
...result,
|
1507
|
+
legends
|
1508
|
+
};
|
938
1509
|
};
|
939
1510
|
const color_color = (spec, context)=>{
|
940
1511
|
const result = {
|
@@ -956,9 +1527,9 @@ const color_color = (spec, context)=>{
|
|
956
1527
|
return result;
|
957
1528
|
};
|
958
1529
|
const pivotAdapter_pivotAdapter = (pipeline, pivotPipeline)=>(spec, context)=>{
|
959
|
-
const {
|
960
|
-
const
|
961
|
-
if (
|
1530
|
+
const { vseed } = context;
|
1531
|
+
const usePivotChart = isPivotChart(vseed);
|
1532
|
+
if (usePivotChart) return execPipeline(pivotPipeline, context, spec);
|
962
1533
|
return execPipeline(pipeline, context, spec);
|
963
1534
|
};
|
964
1535
|
const pivotIndicators = (chartPipeline)=>(spec, context)=>{
|
@@ -1030,7 +1601,155 @@ const pivotIndicators_pivotIndicatorsAsCol = (spec)=>{
|
|
1030
1601
|
indicatorsAsCol: true
|
1031
1602
|
};
|
1032
1603
|
};
|
1033
|
-
const
|
1604
|
+
const pivotGridStyle = (spec)=>{
|
1605
|
+
const result = {
|
1606
|
+
...spec
|
1607
|
+
};
|
1608
|
+
const transparent = 'rgba(0,0,0,0)';
|
1609
|
+
return {
|
1610
|
+
...result,
|
1611
|
+
theme: {
|
1612
|
+
underlayBackgroundColor: transparent,
|
1613
|
+
bodyStyle: {
|
1614
|
+
borderColor: 'rgba(0,4,20,0.2)',
|
1615
|
+
borderLineWidth: [
|
1616
|
+
0,
|
1617
|
+
0,
|
1618
|
+
2,
|
1619
|
+
0
|
1620
|
+
],
|
1621
|
+
bgColor: transparent,
|
1622
|
+
padding: [
|
1623
|
+
0,
|
1624
|
+
0,
|
1625
|
+
1,
|
1626
|
+
0
|
1627
|
+
]
|
1628
|
+
},
|
1629
|
+
headerStyle: {
|
1630
|
+
borderColor: 'rgba(0,4,20,0.2)',
|
1631
|
+
fontSize: 12,
|
1632
|
+
color: '#333333',
|
1633
|
+
textAlign: 'center',
|
1634
|
+
borderLineWidth: 0,
|
1635
|
+
bgColor: transparent,
|
1636
|
+
hover: {
|
1637
|
+
cellBgColor: 'rgba(178,186,207, 0.2)'
|
1638
|
+
}
|
1639
|
+
},
|
1640
|
+
rowHeaderStyle: {
|
1641
|
+
borderColor: 'rgba(0,4,20,0.2)',
|
1642
|
+
fontSize: 12,
|
1643
|
+
color: '#333333',
|
1644
|
+
borderLineWidth: 0,
|
1645
|
+
bgColor: transparent,
|
1646
|
+
hover: {
|
1647
|
+
cellBgColor: 'rgba(178,186,207, 0.2)'
|
1648
|
+
}
|
1649
|
+
},
|
1650
|
+
cornerHeaderStyle: {
|
1651
|
+
borderColor: 'rgba(0,4,20,0.2)',
|
1652
|
+
textAlign: 'center',
|
1653
|
+
fontSize: 12,
|
1654
|
+
color: '#333333',
|
1655
|
+
fontWeight: 'bold',
|
1656
|
+
borderLineWidth: [
|
1657
|
+
0,
|
1658
|
+
0,
|
1659
|
+
0,
|
1660
|
+
0
|
1661
|
+
],
|
1662
|
+
bgColor: transparent,
|
1663
|
+
hover: {
|
1664
|
+
cellBgColor: ''
|
1665
|
+
}
|
1666
|
+
},
|
1667
|
+
cornerRightTopCellStyle: {
|
1668
|
+
borderColor: 'rgba(0,4,20,0.2)',
|
1669
|
+
borderLineWidth: 0,
|
1670
|
+
bgColor: transparent,
|
1671
|
+
hover: {
|
1672
|
+
cellBgColor: ''
|
1673
|
+
}
|
1674
|
+
},
|
1675
|
+
cornerLeftBottomCellStyle: {
|
1676
|
+
borderColor: 'rgba(0,4,20,0.2)',
|
1677
|
+
borderLineWidth: 0,
|
1678
|
+
bgColor: transparent,
|
1679
|
+
hover: {
|
1680
|
+
cellBgColor: ''
|
1681
|
+
}
|
1682
|
+
},
|
1683
|
+
cornerRightBottomCellStyle: {
|
1684
|
+
borderColor: 'rgba(0,4,20,0.2)',
|
1685
|
+
borderLineWidth: 0,
|
1686
|
+
bgColor: transparent,
|
1687
|
+
hover: {
|
1688
|
+
cellBgColor: ''
|
1689
|
+
}
|
1690
|
+
},
|
1691
|
+
rightFrozenStyle: {
|
1692
|
+
borderColor: 'rgba(0,4,20,0.2)',
|
1693
|
+
borderLineWidth: 0,
|
1694
|
+
bgColor: transparent,
|
1695
|
+
hover: {
|
1696
|
+
cellBgColor: 'rgba(178,186,207, 0.2)'
|
1697
|
+
}
|
1698
|
+
},
|
1699
|
+
bottomFrozenStyle: {
|
1700
|
+
borderColor: 'rgba(0,4,20,0.2)',
|
1701
|
+
borderLineWidth: 0,
|
1702
|
+
bgColor: transparent,
|
1703
|
+
hover: {
|
1704
|
+
cellBgColor: 'rgba(178,186,207, 0.2)'
|
1705
|
+
}
|
1706
|
+
},
|
1707
|
+
selectionStyle: {
|
1708
|
+
cellBgColor: '',
|
1709
|
+
cellBorderColor: ''
|
1710
|
+
},
|
1711
|
+
frameStyle: {
|
1712
|
+
borderLineWidth: 0,
|
1713
|
+
bgColor: transparent
|
1714
|
+
}
|
1715
|
+
}
|
1716
|
+
};
|
1717
|
+
};
|
1718
|
+
const pivotColumnDimensions = (spec, context)=>{
|
1719
|
+
const result = {
|
1720
|
+
...spec
|
1721
|
+
};
|
1722
|
+
const { advancedVSeed } = context;
|
1723
|
+
const { dimensions } = advancedVSeed;
|
1724
|
+
if (!dimensions) return result;
|
1725
|
+
const columnDimensions = dimensions.filter((dim)=>'columnDimension' === dim.location);
|
1726
|
+
const columns = columnDimensions.map((dim)=>({
|
1727
|
+
dimensionKey: dim.id,
|
1728
|
+
title: dim.alias || dim.id
|
1729
|
+
}));
|
1730
|
+
return {
|
1731
|
+
...result,
|
1732
|
+
columns: columns
|
1733
|
+
};
|
1734
|
+
};
|
1735
|
+
const pivotRowDimensions = (spec, context)=>{
|
1736
|
+
const result = {
|
1737
|
+
...spec
|
1738
|
+
};
|
1739
|
+
const { advancedVSeed } = context;
|
1740
|
+
const { dimensions } = advancedVSeed;
|
1741
|
+
if (!dimensions) return result;
|
1742
|
+
const rowDimensions = dimensions.filter((dim)=>'rowDimension' === dim.location);
|
1743
|
+
const rows = rowDimensions.map((dim)=>({
|
1744
|
+
dimensionKey: dim.id,
|
1745
|
+
title: dim.alias || dim.id
|
1746
|
+
}));
|
1747
|
+
return {
|
1748
|
+
...result,
|
1749
|
+
rows: rows
|
1750
|
+
};
|
1751
|
+
};
|
1752
|
+
const line_line = [
|
1034
1753
|
initLine,
|
1035
1754
|
color_color,
|
1036
1755
|
background_backgroundColor,
|
@@ -1043,6 +1762,7 @@ const line = [
|
|
1043
1762
|
];
|
1044
1763
|
const pivotLine = [
|
1045
1764
|
initPivot,
|
1765
|
+
pivotGridStyle,
|
1046
1766
|
pivotIndicators_pivotIndicatorsAsRow,
|
1047
1767
|
datasetPivot,
|
1048
1768
|
pivotIndicators([
|
@@ -1055,10 +1775,12 @@ const pivotLine = [
|
|
1055
1775
|
label_label,
|
1056
1776
|
tooltip_tooltip
|
1057
1777
|
]),
|
1778
|
+
pivotRowDimensions,
|
1779
|
+
pivotColumnDimensions,
|
1058
1780
|
pivotLegend
|
1059
1781
|
];
|
1060
1782
|
const lineSpecPipeline = [
|
1061
|
-
pivotAdapter_pivotAdapter(
|
1783
|
+
pivotAdapter_pivotAdapter(line_line, pivotLine)
|
1062
1784
|
];
|
1063
1785
|
const column = [
|
1064
1786
|
initColumn,
|
@@ -1073,6 +1795,7 @@ const column = [
|
|
1073
1795
|
];
|
1074
1796
|
const pivotColumn = [
|
1075
1797
|
initPivot,
|
1798
|
+
pivotGridStyle,
|
1076
1799
|
pivotIndicators_pivotIndicatorsAsRow,
|
1077
1800
|
datasetPivot,
|
1078
1801
|
pivotIndicators([
|
@@ -1085,6 +1808,8 @@ const pivotColumn = [
|
|
1085
1808
|
label_label,
|
1086
1809
|
tooltip_tooltip
|
1087
1810
|
]),
|
1811
|
+
pivotRowDimensions,
|
1812
|
+
pivotColumnDimensions,
|
1088
1813
|
pivotLegend
|
1089
1814
|
];
|
1090
1815
|
const columnSpecPipeline = [
|
@@ -1103,6 +1828,7 @@ const columnParallel = [
|
|
1103
1828
|
];
|
1104
1829
|
const pivotColumnParallel = [
|
1105
1830
|
initPivot,
|
1831
|
+
pivotGridStyle,
|
1106
1832
|
pivotIndicators_pivotIndicatorsAsRow,
|
1107
1833
|
datasetPivot,
|
1108
1834
|
pivotIndicators([
|
@@ -1115,6 +1841,8 @@ const pivotColumnParallel = [
|
|
1115
1841
|
label_label,
|
1116
1842
|
tooltip_tooltip
|
1117
1843
|
]),
|
1844
|
+
pivotRowDimensions,
|
1845
|
+
pivotColumnDimensions,
|
1118
1846
|
pivotLegend
|
1119
1847
|
];
|
1120
1848
|
const columnParallelSpecPipeline = [
|
@@ -1134,6 +1862,7 @@ const columnPercent = [
|
|
1134
1862
|
];
|
1135
1863
|
const pivotColumnPercent = [
|
1136
1864
|
initPivot,
|
1865
|
+
pivotGridStyle,
|
1137
1866
|
pivotIndicators_pivotIndicatorsAsRow,
|
1138
1867
|
datasetPivot,
|
1139
1868
|
pivotIndicators([
|
@@ -1147,6 +1876,8 @@ const pivotColumnPercent = [
|
|
1147
1876
|
label_label,
|
1148
1877
|
tooltip_tooltip
|
1149
1878
|
]),
|
1879
|
+
pivotRowDimensions,
|
1880
|
+
pivotColumnDimensions,
|
1150
1881
|
pivotLegend
|
1151
1882
|
];
|
1152
1883
|
const columnPercentSpecPipeline = [
|
@@ -1165,6 +1896,7 @@ const bar = [
|
|
1165
1896
|
];
|
1166
1897
|
const pivotBar = [
|
1167
1898
|
initPivot,
|
1899
|
+
pivotGridStyle,
|
1168
1900
|
pivotIndicators_pivotIndicatorsAsCol,
|
1169
1901
|
datasetPivot,
|
1170
1902
|
pivotIndicators([
|
@@ -1177,6 +1909,8 @@ const pivotBar = [
|
|
1177
1909
|
label_label,
|
1178
1910
|
tooltip_tooltip
|
1179
1911
|
]),
|
1912
|
+
pivotRowDimensions,
|
1913
|
+
pivotColumnDimensions,
|
1180
1914
|
pivotLegend
|
1181
1915
|
];
|
1182
1916
|
const barSpecPipeline = [
|
@@ -1195,6 +1929,7 @@ const barParallel = [
|
|
1195
1929
|
];
|
1196
1930
|
const pivotBarParallel = [
|
1197
1931
|
initPivot,
|
1932
|
+
pivotGridStyle,
|
1198
1933
|
pivotIndicators_pivotIndicatorsAsCol,
|
1199
1934
|
datasetPivot,
|
1200
1935
|
pivotIndicators([
|
@@ -1207,6 +1942,8 @@ const pivotBarParallel = [
|
|
1207
1942
|
label_label,
|
1208
1943
|
tooltip_tooltip
|
1209
1944
|
]),
|
1945
|
+
pivotRowDimensions,
|
1946
|
+
pivotColumnDimensions,
|
1210
1947
|
pivotLegend
|
1211
1948
|
];
|
1212
1949
|
const barParallelSpecPipeline = [
|
@@ -1226,6 +1963,7 @@ const barPercent = [
|
|
1226
1963
|
];
|
1227
1964
|
const pivotBarPercent = [
|
1228
1965
|
initPivot,
|
1966
|
+
pivotGridStyle,
|
1229
1967
|
pivotIndicators_pivotIndicatorsAsCol,
|
1230
1968
|
datasetPivot,
|
1231
1969
|
pivotIndicators([
|
@@ -1239,6 +1977,8 @@ const pivotBarPercent = [
|
|
1239
1977
|
label_label,
|
1240
1978
|
tooltip_tooltip
|
1241
1979
|
]),
|
1980
|
+
pivotRowDimensions,
|
1981
|
+
pivotColumnDimensions,
|
1242
1982
|
pivotLegend
|
1243
1983
|
];
|
1244
1984
|
const barPercentSpecPipeline = [
|
@@ -1258,6 +1998,7 @@ const area_area = [
|
|
1258
1998
|
];
|
1259
1999
|
const pivotArea = [
|
1260
2000
|
initPivot,
|
2001
|
+
pivotGridStyle,
|
1261
2002
|
pivotIndicators_pivotIndicatorsAsRow,
|
1262
2003
|
datasetPivot,
|
1263
2004
|
pivotIndicators([
|
@@ -1271,6 +2012,8 @@ const pivotArea = [
|
|
1271
2012
|
label_label,
|
1272
2013
|
tooltip_tooltip
|
1273
2014
|
]),
|
2015
|
+
pivotRowDimensions,
|
2016
|
+
pivotColumnDimensions,
|
1274
2017
|
pivotLegend
|
1275
2018
|
];
|
1276
2019
|
const areaSpecPipeline = [
|
@@ -1290,6 +2033,7 @@ const areaPercent = [
|
|
1290
2033
|
];
|
1291
2034
|
const pivotAreaPercent = [
|
1292
2035
|
initPivot,
|
2036
|
+
pivotGridStyle,
|
1293
2037
|
pivotIndicators_pivotIndicatorsAsRow,
|
1294
2038
|
datasetPivot,
|
1295
2039
|
pivotIndicators([
|
@@ -1303,16 +2047,42 @@ const pivotAreaPercent = [
|
|
1303
2047
|
label_label,
|
1304
2048
|
tooltip_tooltip
|
1305
2049
|
]),
|
2050
|
+
pivotRowDimensions,
|
2051
|
+
pivotColumnDimensions,
|
1306
2052
|
pivotLegend
|
1307
2053
|
];
|
1308
2054
|
const areaPercentSpecPipeline = [
|
1309
2055
|
pivotAdapter_pivotAdapter(areaPercent, pivotAreaPercent)
|
1310
2056
|
];
|
1311
|
-
const
|
1312
|
-
|
1313
|
-
|
1314
|
-
|
1315
|
-
|
2057
|
+
const pie = [
|
2058
|
+
initPie,
|
2059
|
+
color_color,
|
2060
|
+
background_backgroundColor,
|
2061
|
+
dataset_dataset,
|
2062
|
+
label_label,
|
2063
|
+
tooltip_tooltip,
|
2064
|
+
legend_legend
|
2065
|
+
];
|
2066
|
+
const pivotPie = [
|
2067
|
+
initPivot,
|
2068
|
+
pivotGridStyle,
|
2069
|
+
pivotIndicators_pivotIndicatorsAsRow,
|
2070
|
+
datasetPivot,
|
2071
|
+
pivotIndicators([
|
2072
|
+
initPie,
|
2073
|
+
color_color,
|
2074
|
+
background_backgroundColor,
|
2075
|
+
datasetPivotPlaceholder,
|
2076
|
+
label_label,
|
2077
|
+
tooltip_tooltip
|
2078
|
+
]),
|
2079
|
+
pivotRowDimensions,
|
2080
|
+
pivotColumnDimensions,
|
2081
|
+
pivotLegend
|
2082
|
+
];
|
2083
|
+
const pieSpecPipeline = [
|
2084
|
+
pivotAdapter_pivotAdapter(pie, pivotPie)
|
2085
|
+
];
|
1316
2086
|
const buildAdvanced = (builder)=>{
|
1317
2087
|
const { chartType } = builder.vseed;
|
1318
2088
|
if (!chartType) throw new Error('chartType is nil in buildAdvanced');
|
@@ -1420,7 +2190,102 @@ const registerBarParallel = ()=>{
|
|
1420
2190
|
Builder._advancedPipelineMap.barParallel = barParallelAdvancedPipeline;
|
1421
2191
|
Builder._specPipelineMap.barParallel = barParallelSpecPipeline;
|
1422
2192
|
};
|
1423
|
-
const
|
2193
|
+
const registerPie = ()=>{
|
2194
|
+
Builder._advancedPipelineMap.pie = pieAdvancedPipeline;
|
2195
|
+
Builder._specPipelineMap.pie = pieSpecPipeline;
|
2196
|
+
};
|
2197
|
+
const lightTheme = ()=>{
|
2198
|
+
const linearAxis = {
|
2199
|
+
nice: true,
|
2200
|
+
zero: true,
|
2201
|
+
inverse: false,
|
2202
|
+
label: {
|
2203
|
+
visible: true,
|
2204
|
+
labelAngle: 0,
|
2205
|
+
labelColor: '#797B85',
|
2206
|
+
labelFontSize: 12,
|
2207
|
+
labelFontWeight: 400
|
2208
|
+
},
|
2209
|
+
title: {
|
2210
|
+
visible: false,
|
2211
|
+
titleText: '',
|
2212
|
+
titleColor: '#646A73',
|
2213
|
+
titleFontSize: 12,
|
2214
|
+
titleFontWeight: 400
|
2215
|
+
},
|
2216
|
+
grid: {
|
2217
|
+
visible: true,
|
2218
|
+
gridColor: 'rgba(54, 65, 89, 0.15)',
|
2219
|
+
gridWidth: 0.5
|
2220
|
+
},
|
2221
|
+
tick: {
|
2222
|
+
visible: false,
|
2223
|
+
tickInside: false,
|
2224
|
+
tickSize: 4,
|
2225
|
+
tickColor: 'rgba(54, 65, 89, 0.30)'
|
2226
|
+
},
|
2227
|
+
line: {
|
2228
|
+
visible: false,
|
2229
|
+
lineColor: 'rgba(54, 65, 89, 0.30)',
|
2230
|
+
lineWidth: 1
|
2231
|
+
}
|
2232
|
+
};
|
2233
|
+
const bandAxis = {
|
2234
|
+
labelAutoHide: true,
|
2235
|
+
labelAutoHideGap: 4,
|
2236
|
+
labelAutoLimit: true,
|
2237
|
+
labelAutoLimitLength: 100,
|
2238
|
+
labelAutoRotate: true,
|
2239
|
+
labelAutoRotateAngleRange: [
|
2240
|
+
0,
|
2241
|
+
-45,
|
2242
|
+
-90
|
2243
|
+
],
|
2244
|
+
label: {
|
2245
|
+
visible: true,
|
2246
|
+
labelAngle: 0,
|
2247
|
+
labelColor: '#797B85',
|
2248
|
+
labelFontSize: 12,
|
2249
|
+
labelFontWeight: 400
|
2250
|
+
},
|
2251
|
+
title: {
|
2252
|
+
visible: false,
|
2253
|
+
titleText: '',
|
2254
|
+
titleColor: '#646A73',
|
2255
|
+
titleFontSize: 12,
|
2256
|
+
titleFontWeight: 400
|
2257
|
+
},
|
2258
|
+
grid: {
|
2259
|
+
visible: false,
|
2260
|
+
gridColor: 'rgba(54, 65, 89, 0.15)',
|
2261
|
+
gridWidth: 0.5
|
2262
|
+
},
|
2263
|
+
tick: {
|
2264
|
+
visible: false,
|
2265
|
+
tickInside: false,
|
2266
|
+
tickSize: 4,
|
2267
|
+
tickColor: 'rgba(54, 65, 89, 0.30)'
|
2268
|
+
},
|
2269
|
+
line: {
|
2270
|
+
visible: true,
|
2271
|
+
lineColor: 'rgba(54, 65, 89, 0.30)',
|
2272
|
+
lineWidth: 1
|
2273
|
+
}
|
2274
|
+
};
|
2275
|
+
const barBandAxis = {
|
2276
|
+
...bandAxis,
|
2277
|
+
labelAutoHide: false,
|
2278
|
+
labelAutoHideGap: 1,
|
2279
|
+
labelAutoLimit: false,
|
2280
|
+
labelAutoLimitLength: void 0,
|
2281
|
+
labelAutoRotate: false,
|
2282
|
+
labelAutoRotateAngleRange: [
|
2283
|
+
0,
|
2284
|
+
-45,
|
2285
|
+
-90
|
2286
|
+
]
|
2287
|
+
};
|
2288
|
+
return {
|
1424
2289
|
baseConfig: {
|
1425
2290
|
vtable: {
|
1426
2291
|
backgroundColor: '#ffffff'
|
@@ -1451,9 +2316,125 @@ const lightTheme = ()=>({
|
|
1451
2316
|
enable: true
|
1452
2317
|
}
|
1453
2318
|
}
|
2319
|
+
},
|
2320
|
+
config: {
|
2321
|
+
line: {
|
2322
|
+
xAxis: bandAxis,
|
2323
|
+
yAxis: linearAxis
|
2324
|
+
},
|
2325
|
+
column: {
|
2326
|
+
xAxis: bandAxis,
|
2327
|
+
yAxis: linearAxis
|
2328
|
+
},
|
2329
|
+
columnParallel: {
|
2330
|
+
xAxis: bandAxis,
|
2331
|
+
yAxis: linearAxis
|
2332
|
+
},
|
2333
|
+
columnPercent: {
|
2334
|
+
xAxis: bandAxis,
|
2335
|
+
yAxis: linearAxis
|
2336
|
+
},
|
2337
|
+
bar: {
|
2338
|
+
xAxis: linearAxis,
|
2339
|
+
yAxis: barBandAxis
|
2340
|
+
},
|
2341
|
+
barParallel: {
|
2342
|
+
xAxis: linearAxis,
|
2343
|
+
yAxis: barBandAxis
|
2344
|
+
},
|
2345
|
+
barPercent: {
|
2346
|
+
xAxis: linearAxis,
|
2347
|
+
yAxis: barBandAxis
|
2348
|
+
},
|
2349
|
+
area: {
|
2350
|
+
xAxis: bandAxis,
|
2351
|
+
yAxis: linearAxis
|
2352
|
+
},
|
2353
|
+
areaPercent: {
|
2354
|
+
xAxis: bandAxis,
|
2355
|
+
yAxis: linearAxis
|
2356
|
+
}
|
1454
2357
|
}
|
1455
|
-
}
|
1456
|
-
|
2358
|
+
};
|
2359
|
+
};
|
2360
|
+
const darkTheme = ()=>{
|
2361
|
+
const linearAxis = {
|
2362
|
+
nice: true,
|
2363
|
+
zero: true,
|
2364
|
+
label: {
|
2365
|
+
visible: true,
|
2366
|
+
labelAngle: 0,
|
2367
|
+
labelColor: '#E2E3E6',
|
2368
|
+
labelFontSize: 12,
|
2369
|
+
labelFontWeight: 400
|
2370
|
+
},
|
2371
|
+
title: {
|
2372
|
+
visible: false,
|
2373
|
+
titleText: '',
|
2374
|
+
titleColor: '#FDFDFD',
|
2375
|
+
titleFontSize: 12,
|
2376
|
+
titleFontWeight: 400
|
2377
|
+
},
|
2378
|
+
grid: {
|
2379
|
+
visible: true,
|
2380
|
+
gridColor: '#404349',
|
2381
|
+
gridWidth: 0.5
|
2382
|
+
},
|
2383
|
+
tick: {
|
2384
|
+
visible: false,
|
2385
|
+
tickInside: false,
|
2386
|
+
tickSize: 4,
|
2387
|
+
tickColor: '#4B4F54'
|
2388
|
+
},
|
2389
|
+
line: {
|
2390
|
+
visible: false,
|
2391
|
+
lineColor: '#4B4F54',
|
2392
|
+
lineWidth: 1
|
2393
|
+
}
|
2394
|
+
};
|
2395
|
+
const bandAxis = {
|
2396
|
+
labelAutoHide: true,
|
2397
|
+
labelAutoHideGap: 4,
|
2398
|
+
labelAutoLimit: true,
|
2399
|
+
labelAutoLimitLength: 100,
|
2400
|
+
labelAutoRotate: true,
|
2401
|
+
labelAutoRotateAngleRange: [
|
2402
|
+
0,
|
2403
|
+
-45,
|
2404
|
+
-90
|
2405
|
+
],
|
2406
|
+
label: {
|
2407
|
+
visible: true,
|
2408
|
+
labelAngle: 0,
|
2409
|
+
labelColor: '#E2E3E6',
|
2410
|
+
labelFontSize: 12,
|
2411
|
+
labelFontWeight: 400
|
2412
|
+
},
|
2413
|
+
title: {
|
2414
|
+
visible: false,
|
2415
|
+
titleText: '',
|
2416
|
+
titleColor: '#FDFDFD',
|
2417
|
+
titleFontSize: 12,
|
2418
|
+
titleFontWeight: 400
|
2419
|
+
},
|
2420
|
+
grid: {
|
2421
|
+
visible: false,
|
2422
|
+
gridColor: '#404349',
|
2423
|
+
gridWidth: 0.5
|
2424
|
+
},
|
2425
|
+
tick: {
|
2426
|
+
visible: false,
|
2427
|
+
tickInside: false,
|
2428
|
+
tickSize: 4,
|
2429
|
+
tickColor: '#4B4F54'
|
2430
|
+
},
|
2431
|
+
line: {
|
2432
|
+
visible: true,
|
2433
|
+
lineColor: '#4B4F54',
|
2434
|
+
lineWidth: 1
|
2435
|
+
}
|
2436
|
+
};
|
2437
|
+
return {
|
1457
2438
|
baseConfig: {
|
1458
2439
|
vtable: {
|
1459
2440
|
backgroundColor: '#141414'
|
@@ -1484,8 +2465,47 @@ const darkTheme = ()=>({
|
|
1484
2465
|
enable: true
|
1485
2466
|
}
|
1486
2467
|
}
|
2468
|
+
},
|
2469
|
+
config: {
|
2470
|
+
line: {
|
2471
|
+
xAxis: bandAxis,
|
2472
|
+
yAxis: linearAxis
|
2473
|
+
},
|
2474
|
+
column: {
|
2475
|
+
xAxis: bandAxis,
|
2476
|
+
yAxis: linearAxis
|
2477
|
+
},
|
2478
|
+
columnParallel: {
|
2479
|
+
xAxis: bandAxis,
|
2480
|
+
yAxis: linearAxis
|
2481
|
+
},
|
2482
|
+
columnPercent: {
|
2483
|
+
xAxis: bandAxis,
|
2484
|
+
yAxis: linearAxis
|
2485
|
+
},
|
2486
|
+
bar: {
|
2487
|
+
xAxis: linearAxis,
|
2488
|
+
yAxis: bandAxis
|
2489
|
+
},
|
2490
|
+
barParallel: {
|
2491
|
+
xAxis: linearAxis,
|
2492
|
+
yAxis: bandAxis
|
2493
|
+
},
|
2494
|
+
barPercent: {
|
2495
|
+
xAxis: linearAxis,
|
2496
|
+
yAxis: bandAxis
|
2497
|
+
},
|
2498
|
+
area: {
|
2499
|
+
xAxis: bandAxis,
|
2500
|
+
yAxis: linearAxis
|
2501
|
+
},
|
2502
|
+
areaPercent: {
|
2503
|
+
xAxis: bandAxis,
|
2504
|
+
yAxis: linearAxis
|
2505
|
+
}
|
1487
2506
|
}
|
1488
|
-
}
|
2507
|
+
};
|
2508
|
+
};
|
1489
2509
|
const registerCustomTheme = (key, themeConfig)=>{
|
1490
2510
|
Builder._themeMap[key] = themeConfig;
|
1491
2511
|
};
|
@@ -1505,6 +2525,7 @@ const all_registerAll = ()=>{
|
|
1505
2525
|
registerBarPercent();
|
1506
2526
|
registerArea();
|
1507
2527
|
registerAreaPercent();
|
2528
|
+
registerPie();
|
1508
2529
|
registerLightTheme();
|
1509
2530
|
registerDarkTheme();
|
1510
2531
|
};
|
@@ -1624,12 +2645,193 @@ const zBaseConfig = external_zod_namespaceObject.z.object({
|
|
1624
2645
|
vchart: zVChartBaseConfig.optional(),
|
1625
2646
|
vtable: zVTableBaseConfig.optional()
|
1626
2647
|
});
|
2648
|
+
const zAxis = external_zod_namespaceObject.z.object({
|
2649
|
+
visible: external_zod_namespaceObject.z.boolean().default(true).optional(),
|
2650
|
+
min: external_zod_namespaceObject.z.number().optional(),
|
2651
|
+
max: external_zod_namespaceObject.z.number().optional(),
|
2652
|
+
nice: external_zod_namespaceObject.z.boolean().default(true).optional(),
|
2653
|
+
zero: external_zod_namespaceObject.z.boolean().default(true).optional(),
|
2654
|
+
inverse: external_zod_namespaceObject.z.boolean().default(false).optional(),
|
2655
|
+
labelAutoHide: external_zod_namespaceObject.z.boolean().default(true).optional(),
|
2656
|
+
labelAutoHideGap: external_zod_namespaceObject.z.number().default(4).optional(),
|
2657
|
+
labelAutoRotate: external_zod_namespaceObject.z.boolean().default(true).optional(),
|
2658
|
+
labelAutoRotateAngleRange: external_zod_namespaceObject.z.array(external_zod_namespaceObject.z.number()).default([
|
2659
|
+
0,
|
2660
|
+
-45,
|
2661
|
+
-90
|
2662
|
+
]).optional(),
|
2663
|
+
labelAutoLimit: external_zod_namespaceObject.z.boolean().default(true).optional(),
|
2664
|
+
labelAutoLimitLength: external_zod_namespaceObject.z.number().default(100).optional(),
|
2665
|
+
label: external_zod_namespaceObject.z.object({
|
2666
|
+
visible: external_zod_namespaceObject.z.boolean().default(true).optional(),
|
2667
|
+
labelColor: external_zod_namespaceObject.z.string().default('#797B85').optional(),
|
2668
|
+
labelFontSize: external_zod_namespaceObject.z.number().default(12).optional(),
|
2669
|
+
labelFontWeight: external_zod_namespaceObject.z.number().default(400).optional(),
|
2670
|
+
labelAngle: external_zod_namespaceObject.z.number().default(0).optional()
|
2671
|
+
}).optional(),
|
2672
|
+
line: external_zod_namespaceObject.z.object({
|
2673
|
+
visible: external_zod_namespaceObject.z.boolean().default(true).optional(),
|
2674
|
+
lineColor: external_zod_namespaceObject.z.string().default('rgba(54, 65, 89, 0.30)').optional(),
|
2675
|
+
lineWidth: external_zod_namespaceObject.z.number().default(1).optional()
|
2676
|
+
}).optional(),
|
2677
|
+
tick: external_zod_namespaceObject.z.object({
|
2678
|
+
visible: external_zod_namespaceObject.z.boolean().default(true).optional(),
|
2679
|
+
tickInside: external_zod_namespaceObject.z.boolean().default(false).optional(),
|
2680
|
+
tickColor: external_zod_namespaceObject.z.string().default('rgba(54, 65, 89, 0.30)').optional(),
|
2681
|
+
tickSize: external_zod_namespaceObject.z.number().default(4).optional()
|
2682
|
+
}).optional(),
|
2683
|
+
title: external_zod_namespaceObject.z.object({
|
2684
|
+
visible: external_zod_namespaceObject.z.boolean().default(false).optional(),
|
2685
|
+
titleText: external_zod_namespaceObject.z.string().default('').optional(),
|
2686
|
+
titleColor: external_zod_namespaceObject.z.string().default('#646A73').optional(),
|
2687
|
+
titleFontSize: external_zod_namespaceObject.z.number().default(12).optional(),
|
2688
|
+
titleFontWeight: external_zod_namespaceObject.z.number().default(400).optional()
|
2689
|
+
}).optional(),
|
2690
|
+
grid: external_zod_namespaceObject.z.object({
|
2691
|
+
visible: external_zod_namespaceObject.z.boolean().default(false).optional(),
|
2692
|
+
gridColor: external_zod_namespaceObject.z.string().default('rgba(54, 65, 89, 0.15)').optional(),
|
2693
|
+
gridWidth: external_zod_namespaceObject.z.number().default(0.5).optional()
|
2694
|
+
}).optional()
|
2695
|
+
});
|
2696
|
+
const zXBandAxis = external_zod_namespaceObject.z.object({
|
2697
|
+
visible: external_zod_namespaceObject.z.boolean().default(true).optional(),
|
2698
|
+
labelAutoHide: external_zod_namespaceObject.z.boolean().default(true).optional(),
|
2699
|
+
labelAutoHideGap: external_zod_namespaceObject.z.number().default(0).optional(),
|
2700
|
+
labelAutoRotate: external_zod_namespaceObject.z.boolean().default(true).optional(),
|
2701
|
+
labelAutoRotateAngleRange: external_zod_namespaceObject.z.array(external_zod_namespaceObject.z.number()).default([
|
2702
|
+
0,
|
2703
|
+
-45,
|
2704
|
+
-90
|
2705
|
+
]).optional(),
|
2706
|
+
labelAutoLimit: external_zod_namespaceObject.z.boolean().default(true).optional(),
|
2707
|
+
labelAutoLimitLength: external_zod_namespaceObject.z.number().default(100).optional(),
|
2708
|
+
label: external_zod_namespaceObject.z.object({
|
2709
|
+
visible: external_zod_namespaceObject.z.boolean().default(true).optional(),
|
2710
|
+
labelColor: external_zod_namespaceObject.z.string().default('#797B85').optional(),
|
2711
|
+
labelFontSize: external_zod_namespaceObject.z.number().default(12).optional(),
|
2712
|
+
labelFontWeight: external_zod_namespaceObject.z.number().default(400).optional(),
|
2713
|
+
labelAngle: external_zod_namespaceObject.z.number().default(0).optional()
|
2714
|
+
}).optional(),
|
2715
|
+
line: external_zod_namespaceObject.z.object({
|
2716
|
+
visible: external_zod_namespaceObject.z.boolean().default(true).optional(),
|
2717
|
+
lineColor: external_zod_namespaceObject.z.string().default('rgba(54, 65, 89, 0.30)').optional(),
|
2718
|
+
lineWidth: external_zod_namespaceObject.z.number().default(1).optional()
|
2719
|
+
}).optional(),
|
2720
|
+
tick: external_zod_namespaceObject.z.object({
|
2721
|
+
visible: external_zod_namespaceObject.z.boolean().default(true).optional(),
|
2722
|
+
tickInside: external_zod_namespaceObject.z.boolean().default(false).optional(),
|
2723
|
+
tickColor: external_zod_namespaceObject.z.string().default('rgba(54, 65, 89, 0.30)').optional(),
|
2724
|
+
tickSize: external_zod_namespaceObject.z.number().default(4).optional()
|
2725
|
+
}).optional(),
|
2726
|
+
title: external_zod_namespaceObject.z.object({
|
2727
|
+
visible: external_zod_namespaceObject.z.boolean().default(false).optional(),
|
2728
|
+
titleText: external_zod_namespaceObject.z.string().default('').optional(),
|
2729
|
+
titleColor: external_zod_namespaceObject.z.string().default('#646A73').optional(),
|
2730
|
+
titleFontSize: external_zod_namespaceObject.z.number().default(12).optional(),
|
2731
|
+
titleFontWeight: external_zod_namespaceObject.z.number().default(400).optional()
|
2732
|
+
}).optional(),
|
2733
|
+
grid: external_zod_namespaceObject.z.object({
|
2734
|
+
visible: external_zod_namespaceObject.z.boolean().default(false).optional(),
|
2735
|
+
gridColor: external_zod_namespaceObject.z.string().default('rgba(54, 65, 89, 0.15)').optional(),
|
2736
|
+
gridWidth: external_zod_namespaceObject.z.number().default(0.5).optional()
|
2737
|
+
}).optional()
|
2738
|
+
});
|
2739
|
+
const zYBandAxis = zXBandAxis;
|
2740
|
+
const zXLinearAxis = external_zod_namespaceObject.z.object({
|
2741
|
+
visible: external_zod_namespaceObject.z.boolean().default(true).optional(),
|
2742
|
+
min: external_zod_namespaceObject.z.number().optional(),
|
2743
|
+
max: external_zod_namespaceObject.z.number().optional(),
|
2744
|
+
nice: external_zod_namespaceObject.z.boolean().default(true).optional(),
|
2745
|
+
zero: external_zod_namespaceObject.z.boolean().default(true).optional(),
|
2746
|
+
inverse: external_zod_namespaceObject.z.boolean().default(false).optional(),
|
2747
|
+
label: external_zod_namespaceObject.z.object({
|
2748
|
+
visible: external_zod_namespaceObject.z.boolean().default(true).optional(),
|
2749
|
+
labelColor: external_zod_namespaceObject.z.string().default('#797B85').optional(),
|
2750
|
+
labelFontSize: external_zod_namespaceObject.z.number().default(12).optional(),
|
2751
|
+
labelFontWeight: external_zod_namespaceObject.z.number().default(400).optional(),
|
2752
|
+
labelAngle: external_zod_namespaceObject.z.number().default(0).optional()
|
2753
|
+
}).optional(),
|
2754
|
+
line: external_zod_namespaceObject.z.object({
|
2755
|
+
visible: external_zod_namespaceObject.z.boolean().default(true).optional(),
|
2756
|
+
lineColor: external_zod_namespaceObject.z.string().default('rgba(54, 65, 89, 0.30)').optional(),
|
2757
|
+
lineWidth: external_zod_namespaceObject.z.number().default(1).optional()
|
2758
|
+
}).optional(),
|
2759
|
+
tick: external_zod_namespaceObject.z.object({
|
2760
|
+
visible: external_zod_namespaceObject.z.boolean().default(true).optional(),
|
2761
|
+
tickInside: external_zod_namespaceObject.z.boolean().default(false).optional(),
|
2762
|
+
tickColor: external_zod_namespaceObject.z.string().default('rgba(54, 65, 89, 0.30)').optional(),
|
2763
|
+
tickSize: external_zod_namespaceObject.z.number().default(4).optional()
|
2764
|
+
}).optional(),
|
2765
|
+
title: external_zod_namespaceObject.z.object({
|
2766
|
+
visible: external_zod_namespaceObject.z.boolean().default(false).optional(),
|
2767
|
+
titleText: external_zod_namespaceObject.z.string().default('').optional(),
|
2768
|
+
titleColor: external_zod_namespaceObject.z.string().default('#646A73').optional(),
|
2769
|
+
titleFontSize: external_zod_namespaceObject.z.number().default(12).optional(),
|
2770
|
+
titleFontWeight: external_zod_namespaceObject.z.number().default(400).optional()
|
2771
|
+
}).optional(),
|
2772
|
+
grid: external_zod_namespaceObject.z.object({
|
2773
|
+
visible: external_zod_namespaceObject.z.boolean().default(false).optional(),
|
2774
|
+
gridColor: external_zod_namespaceObject.z.string().default('rgba(54, 65, 89, 0.15)').optional(),
|
2775
|
+
gridWidth: external_zod_namespaceObject.z.number().default(0.5).optional()
|
2776
|
+
}).optional()
|
2777
|
+
});
|
2778
|
+
const zYLinearAxis = zXLinearAxis;
|
2779
|
+
const zConfig = external_zod_namespaceObject.z.object({
|
2780
|
+
line: external_zod_namespaceObject.z.object({
|
2781
|
+
xAxis: zXBandAxis,
|
2782
|
+
yAxis: zYLinearAxis
|
2783
|
+
}).optional(),
|
2784
|
+
column: external_zod_namespaceObject.z.object({
|
2785
|
+
xAxis: zXBandAxis,
|
2786
|
+
yAxis: zYLinearAxis
|
2787
|
+
}).optional(),
|
2788
|
+
columnParallel: external_zod_namespaceObject.z.object({
|
2789
|
+
xAxis: zXBandAxis,
|
2790
|
+
yAxis: zYLinearAxis
|
2791
|
+
}).optional(),
|
2792
|
+
columnPercent: external_zod_namespaceObject.z.object({
|
2793
|
+
xAxis: zXBandAxis,
|
2794
|
+
yAxis: zYLinearAxis
|
2795
|
+
}).optional(),
|
2796
|
+
bar: external_zod_namespaceObject.z.object({
|
2797
|
+
xAxis: zXLinearAxis,
|
2798
|
+
yAxis: zYBandAxis
|
2799
|
+
}).optional(),
|
2800
|
+
barParallel: external_zod_namespaceObject.z.object({
|
2801
|
+
xAxis: zXLinearAxis,
|
2802
|
+
yAxis: zYBandAxis
|
2803
|
+
}).optional(),
|
2804
|
+
barPercent: external_zod_namespaceObject.z.object({
|
2805
|
+
xAxis: zXLinearAxis,
|
2806
|
+
yAxis: zYBandAxis
|
2807
|
+
}).optional(),
|
2808
|
+
area: external_zod_namespaceObject.z.object({
|
2809
|
+
xAxis: zXBandAxis,
|
2810
|
+
yAxis: zYLinearAxis
|
2811
|
+
}).optional(),
|
2812
|
+
areaPercent: external_zod_namespaceObject.z.object({
|
2813
|
+
xAxis: zXBandAxis,
|
2814
|
+
yAxis: zYLinearAxis
|
2815
|
+
}).optional(),
|
2816
|
+
pie: external_zod_namespaceObject.z.object({}).optional(),
|
2817
|
+
donut: external_zod_namespaceObject.z.object({}).optional(),
|
2818
|
+
rose: external_zod_namespaceObject.z.object({}).optional(),
|
2819
|
+
dualAxis: external_zod_namespaceObject.z.object({}).optional(),
|
2820
|
+
table: external_zod_namespaceObject.z.object({}).optional(),
|
2821
|
+
pivotTable: external_zod_namespaceObject.z.object({}).optional()
|
2822
|
+
});
|
1627
2823
|
const zCustomThemeConfig = external_zod_namespaceObject.z.object({
|
1628
|
-
baseConfig: zBaseConfig.optional()
|
2824
|
+
baseConfig: zBaseConfig.optional(),
|
2825
|
+
config: zConfig.optional()
|
1629
2826
|
});
|
1630
2827
|
const zCustomTheme = external_zod_namespaceObject.z.record(external_zod_namespaceObject.z.string(), zCustomThemeConfig).optional();
|
1631
2828
|
const zTheme = external_zod_namespaceObject.z.string();
|
1632
2829
|
exports.Builder = __webpack_exports__.Builder;
|
2830
|
+
exports.FoldMeasureId = __webpack_exports__.FoldMeasureId;
|
2831
|
+
exports.FoldMeasureName = __webpack_exports__.FoldMeasureName;
|
2832
|
+
exports.FoldMeasureValue = __webpack_exports__.FoldMeasureValue;
|
2833
|
+
exports.Separator = __webpack_exports__.Separator;
|
2834
|
+
exports.UnfoldDimensionGroup = __webpack_exports__.UnfoldDimensionGroup;
|
1633
2835
|
exports.areaAdvancedPipeline = __webpack_exports__.areaAdvancedPipeline;
|
1634
2836
|
exports.areaPercentAdvancedPipeline = __webpack_exports__.areaPercentAdvancedPipeline;
|
1635
2837
|
exports.areaPercentSpecPipeline = __webpack_exports__.areaPercentSpecPipeline;
|
@@ -1651,11 +2853,14 @@ exports.dataReshapeFor1D1M = __webpack_exports__.dataReshapeFor1D1M;
|
|
1651
2853
|
exports.dataReshapeFor2D1M = __webpack_exports__.dataReshapeFor2D1M;
|
1652
2854
|
exports.execPipeline = __webpack_exports__.execPipeline;
|
1653
2855
|
exports.foldMeasures = __webpack_exports__.foldMeasures;
|
2856
|
+
exports.isPivotChart = __webpack_exports__.isPivotChart;
|
1654
2857
|
exports.isVChart = __webpack_exports__.isVChart;
|
1655
2858
|
exports.isVTable = __webpack_exports__.isVTable;
|
1656
2859
|
exports.lightTheme = __webpack_exports__.lightTheme;
|
1657
2860
|
exports.lineAdvancedPipeline = __webpack_exports__.lineAdvancedPipeline;
|
1658
2861
|
exports.lineSpecPipeline = __webpack_exports__.lineSpecPipeline;
|
2862
|
+
exports.pieAdvancedPipeline = __webpack_exports__.pieAdvancedPipeline;
|
2863
|
+
exports.pieSpecPipeline = __webpack_exports__.pieSpecPipeline;
|
1659
2864
|
exports.registerAll = __webpack_exports__.registerAll;
|
1660
2865
|
exports.registerArea = __webpack_exports__.registerArea;
|
1661
2866
|
exports.registerAreaPercent = __webpack_exports__.registerAreaPercent;
|
@@ -1670,10 +2875,12 @@ exports.registerDarkTheme = __webpack_exports__.registerDarkTheme;
|
|
1670
2875
|
exports.registerLightTheme = __webpack_exports__.registerLightTheme;
|
1671
2876
|
exports.registerLine = __webpack_exports__.registerLine;
|
1672
2877
|
exports.unfoldDimensions = __webpack_exports__.unfoldDimensions;
|
2878
|
+
exports.zAxis = __webpack_exports__.zAxis;
|
1673
2879
|
exports.zBackgroundColor = __webpack_exports__.zBackgroundColor;
|
1674
2880
|
exports.zBaseConfig = __webpack_exports__.zBaseConfig;
|
1675
2881
|
exports.zChartType = __webpack_exports__.zChartType;
|
1676
2882
|
exports.zColor = __webpack_exports__.zColor;
|
2883
|
+
exports.zConfig = __webpack_exports__.zConfig;
|
1677
2884
|
exports.zCustomTheme = __webpack_exports__.zCustomTheme;
|
1678
2885
|
exports.zCustomThemeConfig = __webpack_exports__.zCustomThemeConfig;
|
1679
2886
|
exports.zDataset = __webpack_exports__.zDataset;
|
@@ -1691,8 +2898,17 @@ exports.zMeasures = __webpack_exports__.zMeasures;
|
|
1691
2898
|
exports.zTheme = __webpack_exports__.zTheme;
|
1692
2899
|
exports.zTooltip = __webpack_exports__.zTooltip;
|
1693
2900
|
exports.zUnfoldInfo = __webpack_exports__.zUnfoldInfo;
|
2901
|
+
exports.zXBandAxis = __webpack_exports__.zXBandAxis;
|
2902
|
+
exports.zXLinearAxis = __webpack_exports__.zXLinearAxis;
|
2903
|
+
exports.zYBandAxis = __webpack_exports__.zYBandAxis;
|
2904
|
+
exports.zYLinearAxis = __webpack_exports__.zYLinearAxis;
|
1694
2905
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
1695
2906
|
"Builder",
|
2907
|
+
"FoldMeasureId",
|
2908
|
+
"FoldMeasureName",
|
2909
|
+
"FoldMeasureValue",
|
2910
|
+
"Separator",
|
2911
|
+
"UnfoldDimensionGroup",
|
1696
2912
|
"areaAdvancedPipeline",
|
1697
2913
|
"areaPercentAdvancedPipeline",
|
1698
2914
|
"areaPercentSpecPipeline",
|
@@ -1714,11 +2930,14 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
1714
2930
|
"dataReshapeFor2D1M",
|
1715
2931
|
"execPipeline",
|
1716
2932
|
"foldMeasures",
|
2933
|
+
"isPivotChart",
|
1717
2934
|
"isVChart",
|
1718
2935
|
"isVTable",
|
1719
2936
|
"lightTheme",
|
1720
2937
|
"lineAdvancedPipeline",
|
1721
2938
|
"lineSpecPipeline",
|
2939
|
+
"pieAdvancedPipeline",
|
2940
|
+
"pieSpecPipeline",
|
1722
2941
|
"registerAll",
|
1723
2942
|
"registerArea",
|
1724
2943
|
"registerAreaPercent",
|
@@ -1733,10 +2952,12 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
1733
2952
|
"registerLightTheme",
|
1734
2953
|
"registerLine",
|
1735
2954
|
"unfoldDimensions",
|
2955
|
+
"zAxis",
|
1736
2956
|
"zBackgroundColor",
|
1737
2957
|
"zBaseConfig",
|
1738
2958
|
"zChartType",
|
1739
2959
|
"zColor",
|
2960
|
+
"zConfig",
|
1740
2961
|
"zCustomTheme",
|
1741
2962
|
"zCustomThemeConfig",
|
1742
2963
|
"zDataset",
|
@@ -1753,7 +2974,11 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
1753
2974
|
"zMeasures",
|
1754
2975
|
"zTheme",
|
1755
2976
|
"zTooltip",
|
1756
|
-
"zUnfoldInfo"
|
2977
|
+
"zUnfoldInfo",
|
2978
|
+
"zXBandAxis",
|
2979
|
+
"zXLinearAxis",
|
2980
|
+
"zYBandAxis",
|
2981
|
+
"zYLinearAxis"
|
1757
2982
|
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
1758
2983
|
Object.defineProperty(exports, '__esModule', {
|
1759
2984
|
value: true
|