@visactor/vseed 0.0.16 → 0.0.17
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 +821 -130
- package/dist/builder/builder/builder.d.ts.map +1 -1
- package/dist/builder/register/all.d.ts.map +1 -1
- package/dist/builder/register/chartType.d.ts +2 -0
- package/dist/builder/register/chartType.d.ts.map +1 -1
- package/dist/dataReshape/dataReshapeFor1D2M.d.ts +20 -0
- package/dist/dataReshape/dataReshapeFor1D2M.d.ts.map +1 -0
- package/dist/dataReshape/index.d.ts +1 -0
- package/dist/dataReshape/index.d.ts.map +1 -1
- package/dist/index.cjs +661 -39
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +636 -32
- package/dist/index.js.map +1 -1
- package/dist/pipeline/advanced/pipeline/funnel.d.ts +3 -0
- package/dist/pipeline/advanced/pipeline/funnel.d.ts.map +1 -0
- package/dist/pipeline/advanced/pipeline/index.d.ts +2 -0
- package/dist/pipeline/advanced/pipeline/index.d.ts.map +1 -1
- package/dist/pipeline/advanced/pipeline/scatter.d.ts +3 -0
- package/dist/pipeline/advanced/pipeline/scatter.d.ts.map +1 -0
- package/dist/pipeline/advanced/pipes/config/config.d.ts +2 -0
- package/dist/pipeline/advanced/pipes/config/config.d.ts.map +1 -1
- package/dist/pipeline/advanced/pipes/encoding/encodingFunnel.d.ts +3 -0
- package/dist/pipeline/advanced/pipes/encoding/encodingFunnel.d.ts.map +1 -0
- package/dist/pipeline/advanced/pipes/encoding/encodingYY.d.ts +3 -0
- package/dist/pipeline/advanced/pipes/encoding/encodingYY.d.ts.map +1 -0
- package/dist/pipeline/advanced/pipes/encoding/index.d.ts +1 -0
- package/dist/pipeline/advanced/pipes/encoding/index.d.ts.map +1 -1
- package/dist/pipeline/advanced/pipes/reshape/index.d.ts +2 -0
- package/dist/pipeline/advanced/pipes/reshape/index.d.ts.map +1 -1
- package/dist/pipeline/advanced/pipes/reshape/pivotReshapeTo1D2M.d.ts +9 -0
- package/dist/pipeline/advanced/pipes/reshape/pivotReshapeTo1D2M.d.ts.map +1 -0
- package/dist/pipeline/advanced/pipes/reshape/reshapeTo1D2M.d.ts +9 -0
- package/dist/pipeline/advanced/pipes/reshape/reshapeTo1D2M.d.ts.map +1 -0
- package/dist/pipeline/spec/pipeline/area.d.ts.map +1 -1
- package/dist/pipeline/spec/pipeline/funnel.d.ts +3 -0
- package/dist/pipeline/spec/pipeline/funnel.d.ts.map +1 -0
- package/dist/pipeline/spec/pipeline/index.d.ts +2 -0
- package/dist/pipeline/spec/pipeline/index.d.ts.map +1 -1
- package/dist/pipeline/spec/pipeline/line.d.ts.map +1 -1
- package/dist/pipeline/spec/pipeline/roseParallel.d.ts.map +1 -1
- package/dist/pipeline/spec/pipeline/scatter.d.ts +3 -0
- package/dist/pipeline/spec/pipeline/scatter.d.ts.map +1 -0
- package/dist/pipeline/spec/pipes/vchart/axes/xLinear.d.ts.map +1 -1
- package/dist/pipeline/spec/pipes/vchart/axes/yLinear.d.ts.map +1 -1
- package/dist/pipeline/spec/pipes/vchart/color/color.d.ts.map +1 -1
- package/dist/pipeline/spec/pipes/vchart/crosshair/horizontalCrosshairLine.d.ts +3 -0
- package/dist/pipeline/spec/pipes/vchart/crosshair/horizontalCrosshairLine.d.ts.map +1 -0
- package/dist/pipeline/spec/pipes/vchart/crosshair/index.d.ts +1 -0
- package/dist/pipeline/spec/pipes/vchart/crosshair/index.d.ts.map +1 -1
- package/dist/pipeline/spec/pipes/vchart/dataset/dataset.d.ts.map +1 -1
- package/dist/pipeline/spec/pipes/vchart/init/funnel.d.ts +3 -0
- package/dist/pipeline/spec/pipes/vchart/init/funnel.d.ts.map +1 -0
- package/dist/pipeline/spec/pipes/vchart/init/index.d.ts +1 -0
- package/dist/pipeline/spec/pipes/vchart/init/index.d.ts.map +1 -1
- package/dist/pipeline/spec/pipes/vchart/init/roseParallel.d.ts.map +1 -1
- package/dist/pipeline/spec/pipes/vchart/init/scatter.d.ts +3 -0
- package/dist/pipeline/spec/pipes/vchart/init/scatter.d.ts.map +1 -0
- package/dist/pipeline/spec/pipes/vchart/markStyle/barStyle.d.ts.map +1 -1
- package/dist/pipeline/spec/pipes/vchart/markStyle/index.d.ts +1 -0
- package/dist/pipeline/spec/pipes/vchart/markStyle/index.d.ts.map +1 -1
- package/dist/pipeline/spec/pipes/vchart/markStyle/pointState.d.ts +4 -0
- package/dist/pipeline/spec/pipes/vchart/markStyle/pointState.d.ts.map +1 -0
- package/dist/pipeline/spec/pipes/vchart/markStyle/pointStyle.d.ts.map +1 -1
- package/dist/pipeline/spec/pipes/vchart/tooltip/tooltip.d.ts.map +1 -1
- package/dist/pipeline/utils/measures/findMeasureById.d.ts +2 -1
- package/dist/pipeline/utils/measures/findMeasureById.d.ts.map +1 -1
- package/dist/pipeline/utils/measures/index.d.ts +1 -1
- package/dist/pipeline/utils/measures/index.d.ts.map +1 -1
- package/dist/theme/dark.d.ts.map +1 -1
- package/dist/theme/light.d.ts.map +1 -1
- package/dist/types/advancedVSeed.d.ts +179 -4
- package/dist/types/advancedVSeed.d.ts.map +1 -1
- package/dist/types/chartType/funnel/funnel.d.ts +224 -0
- package/dist/types/chartType/funnel/funnel.d.ts.map +1 -0
- package/dist/types/chartType/funnel/index.d.ts +2 -0
- package/dist/types/chartType/funnel/index.d.ts.map +1 -0
- package/dist/types/chartType/index.d.ts +2 -0
- package/dist/types/chartType/index.d.ts.map +1 -1
- package/dist/types/chartType/scatter/index.d.ts +2 -0
- package/dist/types/chartType/scatter/index.d.ts.map +1 -0
- package/dist/types/chartType/scatter/scatter.d.ts +843 -0
- package/dist/types/chartType/scatter/scatter.d.ts.map +1 -0
- package/dist/types/properties/baseConfig/color.d.ts +2 -2
- package/dist/types/properties/baseConfig/color.d.ts.map +1 -1
- package/dist/types/properties/chartType/chartType.d.ts +6 -2
- package/dist/types/properties/chartType/chartType.d.ts.map +1 -1
- package/dist/types/properties/config/config.d.ts +88 -2
- package/dist/types/properties/config/config.d.ts.map +1 -1
- package/dist/types/properties/encoding/encoding.d.ts +2 -0
- package/dist/types/properties/encoding/encoding.d.ts.map +1 -1
- package/dist/types/properties/theme/customTheme.d.ts +176 -4
- package/dist/types/properties/theme/customTheme.d.ts.map +1 -1
- package/dist/types/vseed.d.ts +1255 -4
- package/dist/types/vseed.d.ts.map +1 -1
- package/dist/umd/index.js +649 -39
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -150,7 +150,7 @@ const NUMBER_FORMAT_RULES = {
|
|
150
150
|
};
|
151
151
|
const createFormatter = (format)=>createNumFormatter(format);
|
152
152
|
const autoFormatter = (value, locale)=>autoNumFormatter(value, locale);
|
153
|
-
|
153
|
+
const findMeasureById = (measures, id)=>{
|
154
154
|
if (!measures) return;
|
155
155
|
const stack = [
|
156
156
|
...measures
|
@@ -161,7 +161,22 @@ function findMeasureById(measures, id) {
|
|
161
161
|
if (current.id === id && !('children' in current)) return current;
|
162
162
|
if ('children' in current && current.children) stack.push(...current.children);
|
163
163
|
}
|
164
|
-
}
|
164
|
+
};
|
165
|
+
const findFirstMeasure = (measures)=>{
|
166
|
+
if (!measures) return;
|
167
|
+
const stack = [
|
168
|
+
...measures
|
169
|
+
].reverse();
|
170
|
+
while(stack.length > 0){
|
171
|
+
const current = stack.pop();
|
172
|
+
if (!current) continue;
|
173
|
+
if (!('children' in current)) return current;
|
174
|
+
if ('children' in current && current.children) {
|
175
|
+
const children = (current.children || []).reverse();
|
176
|
+
stack.push(...children);
|
177
|
+
}
|
178
|
+
}
|
179
|
+
};
|
165
180
|
const autoMeasures = (advancedVSeed, context)=>{
|
166
181
|
const result = {
|
167
182
|
...advancedVSeed
|
@@ -458,6 +473,60 @@ const dataReshapeFor1D1M = (dataset, dimensions, measures, options)=>{
|
|
458
473
|
};
|
459
474
|
}
|
460
475
|
};
|
476
|
+
const dataReshapeFor1D2M_emptyReshapeResult = {
|
477
|
+
dataset: [],
|
478
|
+
foldInfo: {
|
479
|
+
foldMap: {},
|
480
|
+
measureId: '',
|
481
|
+
measureName: '',
|
482
|
+
measureValue: ''
|
483
|
+
},
|
484
|
+
unfoldInfo: {
|
485
|
+
groupName: '',
|
486
|
+
groupId: '',
|
487
|
+
colorItems: [],
|
488
|
+
colorIdMap: {}
|
489
|
+
}
|
490
|
+
};
|
491
|
+
const dataReshapeFor1D2M = (dataset, dimensions, measures, options)=>{
|
492
|
+
const { foldMeasureId = FoldMeasureId, foldMeasureName = FoldMeasureName, foldMeasureValue = FoldMeasureValue, unfoldDimensionGroup = UnfoldDimensionGroup, unfoldDimensionGroupId = UnfoldDimensionGroupId } = options || {};
|
493
|
+
if (0 === dimensions.length && 0 === measures.length) return dataReshapeFor1D2M_emptyReshapeResult;
|
494
|
+
const { dataset: foldedDataset, foldInfo } = foldMeasures(dataset, measures.length > 1 ? measures.slice(1) : measures, foldMeasureId, foldMeasureName, foldMeasureValue);
|
495
|
+
if (0 === dimensions.length) {
|
496
|
+
const { dataset: finalDataset, unfoldInfo } = unfoldDimensions(foldedDataset, [
|
497
|
+
{
|
498
|
+
id: foldMeasureValue,
|
499
|
+
alias: i18n`指标值`,
|
500
|
+
location: 'dimension'
|
501
|
+
}
|
502
|
+
], [
|
503
|
+
{
|
504
|
+
id: foldMeasureValue,
|
505
|
+
alias: i18n`指标值`
|
506
|
+
}
|
507
|
+
], 0, unfoldDimensionGroup, unfoldDimensionGroupId, foldMeasureId);
|
508
|
+
return {
|
509
|
+
dataset: finalDataset,
|
510
|
+
foldInfo,
|
511
|
+
unfoldInfo
|
512
|
+
};
|
513
|
+
}
|
514
|
+
{
|
515
|
+
const { dataset: finalDataset, unfoldInfo } = unfoldDimensions(foldedDataset, [
|
516
|
+
...dimensions
|
517
|
+
], [
|
518
|
+
{
|
519
|
+
id: foldMeasureValue,
|
520
|
+
alias: i18n`指标值`
|
521
|
+
}
|
522
|
+
], 0, unfoldDimensionGroup, unfoldDimensionGroupId, foldMeasureId);
|
523
|
+
return {
|
524
|
+
dataset: finalDataset,
|
525
|
+
foldInfo,
|
526
|
+
unfoldInfo
|
527
|
+
};
|
528
|
+
}
|
529
|
+
};
|
461
530
|
const reshapeTo2D1M = (advancedVSeed, context)=>{
|
462
531
|
const result = {
|
463
532
|
...advancedVSeed
|
@@ -504,6 +573,28 @@ const reshapeTo1D1M = (advancedVSeed, context)=>{
|
|
504
573
|
]
|
505
574
|
};
|
506
575
|
};
|
576
|
+
const reshapeTo1D2M = (advancedVSeed, context)=>{
|
577
|
+
const result = {
|
578
|
+
...advancedVSeed
|
579
|
+
};
|
580
|
+
const { vseed } = context;
|
581
|
+
const { dataset } = vseed;
|
582
|
+
const { dimensions, measures } = advancedVSeed;
|
583
|
+
if (!measures || !dimensions || !dataset) return result;
|
584
|
+
if (0 === measures.length) throw new Error('measures can not be empty');
|
585
|
+
const { dataset: newDatasets, foldInfo, unfoldInfo } = dataReshapeFor1D2M(dataset, dimensions, measures);
|
586
|
+
return {
|
587
|
+
...result,
|
588
|
+
dataset: newDatasets,
|
589
|
+
datasetReshapeInfo: [
|
590
|
+
{
|
591
|
+
id: '1D2M',
|
592
|
+
foldInfo,
|
593
|
+
unfoldInfo
|
594
|
+
}
|
595
|
+
]
|
596
|
+
};
|
597
|
+
};
|
507
598
|
const pivotReshapeTo1D1M = (advancedVSeed, context)=>{
|
508
599
|
const result = {
|
509
600
|
...advancedVSeed
|
@@ -543,6 +634,45 @@ const pivotReshapeTo1D1M = (advancedVSeed, context)=>{
|
|
543
634
|
datasetReshapeInfo: datasetReshapeInfo
|
544
635
|
};
|
545
636
|
};
|
637
|
+
const pivotReshapeTo1D2M = (advancedVSeed, context)=>{
|
638
|
+
const result = {
|
639
|
+
...advancedVSeed
|
640
|
+
};
|
641
|
+
const { vseed } = context;
|
642
|
+
const { dataset } = vseed;
|
643
|
+
const { dimensions, measures } = advancedVSeed;
|
644
|
+
if (!measures || !dimensions) return result;
|
645
|
+
const measureGroups = [];
|
646
|
+
if (measures) measures.forEach((measure)=>{
|
647
|
+
if (measure.children && measure.children.length > 0) measureGroups.push(measure);
|
648
|
+
});
|
649
|
+
const newDatasets = [];
|
650
|
+
const datasetReshapeInfo = [];
|
651
|
+
measureGroups.forEach((measureGroup)=>{
|
652
|
+
const measures = measureGroup.children;
|
653
|
+
if (!measures) return;
|
654
|
+
const commonDimensions = dimensions.filter((dim)=>'dimension' === dim.location);
|
655
|
+
const groupId = measureGroup.id;
|
656
|
+
const { dataset: newSubDataset, foldInfo, unfoldInfo } = dataReshapeFor1D2M(dataset, commonDimensions, measures, {
|
657
|
+
foldMeasureId: FoldMeasureId,
|
658
|
+
foldMeasureName: FoldMeasureName,
|
659
|
+
foldMeasureValue: FoldMeasureValue + groupId,
|
660
|
+
unfoldDimensionGroup: UnfoldDimensionGroup
|
661
|
+
});
|
662
|
+
const reshapeInfo = {
|
663
|
+
id: groupId,
|
664
|
+
foldInfo,
|
665
|
+
unfoldInfo
|
666
|
+
};
|
667
|
+
newDatasets.push(newSubDataset);
|
668
|
+
datasetReshapeInfo.push(reshapeInfo);
|
669
|
+
});
|
670
|
+
return {
|
671
|
+
...result,
|
672
|
+
dataset: newDatasets,
|
673
|
+
datasetReshapeInfo: datasetReshapeInfo
|
674
|
+
};
|
675
|
+
};
|
546
676
|
const pivotReshapeTo2D1M = (advancedVSeed, context)=>{
|
547
677
|
const result = {
|
548
678
|
...advancedVSeed
|
@@ -726,6 +856,37 @@ const encodingPie = (advancedVSeed)=>{
|
|
726
856
|
encoding
|
727
857
|
};
|
728
858
|
};
|
859
|
+
const encodingFunnel = (advancedVSeed)=>{
|
860
|
+
const result = {
|
861
|
+
...advancedVSeed
|
862
|
+
};
|
863
|
+
const { datasetReshapeInfo, dimensions } = advancedVSeed;
|
864
|
+
if (!datasetReshapeInfo || !dimensions) return result;
|
865
|
+
const encoding = datasetReshapeInfo.reduce((prev, cur)=>{
|
866
|
+
const { foldInfo, unfoldInfo } = cur;
|
867
|
+
const size = [
|
868
|
+
foldInfo.measureValue
|
869
|
+
];
|
870
|
+
const group = [
|
871
|
+
unfoldInfo.groupId
|
872
|
+
];
|
873
|
+
const color = [
|
874
|
+
unfoldInfo.groupId
|
875
|
+
];
|
876
|
+
return [
|
877
|
+
...prev,
|
878
|
+
{
|
879
|
+
size,
|
880
|
+
group,
|
881
|
+
color
|
882
|
+
}
|
883
|
+
];
|
884
|
+
}, []);
|
885
|
+
return {
|
886
|
+
...result,
|
887
|
+
encoding
|
888
|
+
};
|
889
|
+
};
|
729
890
|
const vchartBaseConfig = (advancedVSeed, context)=>{
|
730
891
|
const { vseed } = context;
|
731
892
|
const result = {
|
@@ -801,6 +962,7 @@ const pieConfig = (advancedVSeed, context)=>{
|
|
801
962
|
};
|
802
963
|
const areaConfig = lineConfig;
|
803
964
|
const areaPercentConfig = lineConfig;
|
965
|
+
const scatterConfig = lineConfig;
|
804
966
|
const barConfig = columnConfig;
|
805
967
|
const barParallelConfig = columnConfig;
|
806
968
|
const barPercentConfig = columnConfig;
|
@@ -809,6 +971,7 @@ const columnPercentConfig = columnConfig;
|
|
809
971
|
const donutConfig = pieConfig;
|
810
972
|
const roseConfig = pieConfig;
|
811
973
|
const roseParallelConfig = pieConfig;
|
974
|
+
const funnelConfig = pieConfig;
|
812
975
|
const vchartTheme = (advancedVSeed, context)=>{
|
813
976
|
const { customTheme, vseed } = context;
|
814
977
|
const { theme = 'light', chartType } = vseed;
|
@@ -1093,12 +1256,96 @@ const roseParallelAdvancedPipeline = [
|
|
1093
1256
|
markStyle_markStyle,
|
1094
1257
|
annotation_annotation
|
1095
1258
|
];
|
1259
|
+
const funnelAdvancedPipeline = [
|
1260
|
+
initAdvancedVSeed,
|
1261
|
+
locale_locale,
|
1262
|
+
autoMeasures,
|
1263
|
+
autoDimensions,
|
1264
|
+
pivotAdapter([
|
1265
|
+
reshapeTo1D1M
|
1266
|
+
], [
|
1267
|
+
pivotReshapeTo1D1M
|
1268
|
+
]),
|
1269
|
+
encodingFunnel,
|
1270
|
+
funnelConfig,
|
1271
|
+
vchartBaseConfig,
|
1272
|
+
vchartTheme,
|
1273
|
+
annotation_annotation
|
1274
|
+
];
|
1275
|
+
const encodingYY = (advancedVSeed)=>{
|
1276
|
+
const result = {
|
1277
|
+
...advancedVSeed
|
1278
|
+
};
|
1279
|
+
const { datasetReshapeInfo, measures } = advancedVSeed;
|
1280
|
+
if (!datasetReshapeInfo || !measures) return result;
|
1281
|
+
const firstMeasure = findFirstMeasure(measures);
|
1282
|
+
const encoding = datasetReshapeInfo.reduce((prev, cur)=>{
|
1283
|
+
const { foldInfo, unfoldInfo } = cur;
|
1284
|
+
const x = [
|
1285
|
+
firstMeasure?.id
|
1286
|
+
];
|
1287
|
+
const y = [
|
1288
|
+
foldInfo.measureValue
|
1289
|
+
];
|
1290
|
+
const group = [
|
1291
|
+
unfoldInfo.groupId
|
1292
|
+
];
|
1293
|
+
const color = [
|
1294
|
+
unfoldInfo.groupId
|
1295
|
+
];
|
1296
|
+
return [
|
1297
|
+
...prev,
|
1298
|
+
{
|
1299
|
+
x,
|
1300
|
+
y,
|
1301
|
+
group,
|
1302
|
+
color
|
1303
|
+
}
|
1304
|
+
];
|
1305
|
+
}, []);
|
1306
|
+
return {
|
1307
|
+
...result,
|
1308
|
+
encoding
|
1309
|
+
};
|
1310
|
+
};
|
1311
|
+
const scatterAdvancedPipeline = [
|
1312
|
+
initAdvancedVSeed,
|
1313
|
+
locale_locale,
|
1314
|
+
autoMeasures,
|
1315
|
+
autoDimensions,
|
1316
|
+
pivotAdapter([
|
1317
|
+
reshapeTo1D2M
|
1318
|
+
], [
|
1319
|
+
pivotReshapeTo1D2M
|
1320
|
+
]),
|
1321
|
+
encodingYY,
|
1322
|
+
vchartBaseConfig,
|
1323
|
+
scatterConfig,
|
1324
|
+
vchartTheme,
|
1325
|
+
markStyle_markStyle,
|
1326
|
+
annotation_annotation
|
1327
|
+
];
|
1096
1328
|
const dataset_dataset = (spec, context)=>{
|
1097
1329
|
const { advancedVSeed } = context;
|
1330
|
+
const { encoding } = advancedVSeed;
|
1331
|
+
const angle = encoding[0]?.angle?.[0];
|
1332
|
+
const x = encoding[0]?.x?.[0];
|
1333
|
+
const group = encoding[0]?.group?.[0];
|
1334
|
+
const fields = {};
|
1335
|
+
if (angle) fields[angle] = {
|
1336
|
+
sortIndex: 0
|
1337
|
+
};
|
1338
|
+
if (x) fields[x] = {
|
1339
|
+
sortIndex: 0
|
1340
|
+
};
|
1341
|
+
if (group) fields[group] = {
|
1342
|
+
sortIndex: 1
|
1343
|
+
};
|
1098
1344
|
return {
|
1099
1345
|
...spec,
|
1100
1346
|
data: {
|
1101
|
-
values: advancedVSeed.dataset
|
1347
|
+
values: advancedVSeed.dataset,
|
1348
|
+
fields: fields
|
1102
1349
|
}
|
1103
1350
|
};
|
1104
1351
|
};
|
@@ -1350,7 +1597,7 @@ const initRose = (spec, context)=>{
|
|
1350
1597
|
state: {
|
1351
1598
|
hover: {
|
1352
1599
|
lineWidth: 1,
|
1353
|
-
fillOpacity: 0.
|
1600
|
+
fillOpacity: 0.6
|
1354
1601
|
}
|
1355
1602
|
}
|
1356
1603
|
};
|
@@ -1386,6 +1633,12 @@ const initRoseParallel = (spec, context)=>{
|
|
1386
1633
|
style: {
|
1387
1634
|
stroke: '#ffffff',
|
1388
1635
|
lineWidth: 1
|
1636
|
+
},
|
1637
|
+
state: {
|
1638
|
+
hover: {
|
1639
|
+
lineWidth: 1,
|
1640
|
+
fillOpacity: 0.6
|
1641
|
+
}
|
1389
1642
|
}
|
1390
1643
|
};
|
1391
1644
|
result.region = [
|
@@ -1412,6 +1665,42 @@ const initPivot = (spec)=>{
|
|
1412
1665
|
indicatorsAsCol: false
|
1413
1666
|
};
|
1414
1667
|
};
|
1668
|
+
const initFunnel = (spec, context)=>{
|
1669
|
+
const result = {
|
1670
|
+
...spec
|
1671
|
+
};
|
1672
|
+
const { advancedVSeed } = context;
|
1673
|
+
const { encoding } = advancedVSeed;
|
1674
|
+
if (!encoding[0].size || !encoding[0].group || !encoding[0].color) return result;
|
1675
|
+
result.type = 'funnel';
|
1676
|
+
result.valueField = encoding[0].size[0];
|
1677
|
+
result.categoryField = encoding[0].group[0];
|
1678
|
+
result.padding = 0;
|
1679
|
+
result.isTransform = true;
|
1680
|
+
result.shape = 'rect';
|
1681
|
+
result.maxSize = '75%';
|
1682
|
+
result.minSize = '10%';
|
1683
|
+
result.region = [
|
1684
|
+
{
|
1685
|
+
clip: true
|
1686
|
+
}
|
1687
|
+
];
|
1688
|
+
result.funnel = {
|
1689
|
+
style: {
|
1690
|
+
cornerRadius: 4
|
1691
|
+
},
|
1692
|
+
state: {
|
1693
|
+
hover: {
|
1694
|
+
fillOpacity: 0.6
|
1695
|
+
}
|
1696
|
+
}
|
1697
|
+
};
|
1698
|
+
result.transformLabel = {
|
1699
|
+
visible: true
|
1700
|
+
};
|
1701
|
+
result.animation = true;
|
1702
|
+
return result;
|
1703
|
+
};
|
1415
1704
|
const xBand = (spec, context)=>{
|
1416
1705
|
const result = {
|
1417
1706
|
...spec
|
@@ -1580,7 +1869,7 @@ const xLinear = (spec, context)=>{
|
|
1580
1869
|
}
|
1581
1870
|
},
|
1582
1871
|
innerOffset: {
|
1583
|
-
|
1872
|
+
right: LINEAR_AXIS_INNER_OFFSET_TOP
|
1584
1873
|
}
|
1585
1874
|
};
|
1586
1875
|
result.axes = [
|
@@ -1891,6 +2180,9 @@ const tooltip_tooltip = (spec, context)=>{
|
|
1891
2180
|
result.tooltip = {
|
1892
2181
|
visible: enable,
|
1893
2182
|
mark: {
|
2183
|
+
title: {
|
2184
|
+
value: (datum)=>datum && datum[groupName] || ''
|
2185
|
+
},
|
1894
2186
|
content: [
|
1895
2187
|
{
|
1896
2188
|
visible: true,
|
@@ -2134,11 +2426,11 @@ const pivotDiscreteLegend = (spec, context)=>{
|
|
2134
2426
|
label: d,
|
2135
2427
|
shape: {
|
2136
2428
|
outerBorder: border ? {
|
2137
|
-
stroke: colorScheme[index],
|
2429
|
+
stroke: colorScheme?.[index],
|
2138
2430
|
distance: 3,
|
2139
2431
|
lineWidth: 1
|
2140
2432
|
} : void 0,
|
2141
|
-
fill: colorScheme[index]
|
2433
|
+
fill: colorScheme?.[index]
|
2142
2434
|
}
|
2143
2435
|
})),
|
2144
2436
|
item: {
|
@@ -2190,8 +2482,8 @@ const color_color = (spec, context)=>{
|
|
2190
2482
|
const { color } = baseConfig;
|
2191
2483
|
const { colorScheme, colorMapping } = color;
|
2192
2484
|
const mappingList = [];
|
2193
|
-
if (colorMapping) Object.entries(colorMapping).forEach(([key, value])=>{
|
2194
|
-
const idMap = Object.entries(unfoldInfo.colorIdMap).filter(([_, v])=>key
|
2485
|
+
if (colorMapping) Object.entries(colorMapping).sort((a, b)=>a[0].split(Separator).length - b[0].split(Separator).length).forEach(([key, value])=>{
|
2486
|
+
const idMap = Object.entries(unfoldInfo.colorIdMap).filter(([_, v])=>v.includes(key));
|
2195
2487
|
for (const [colorId] of idMap)mappingList.push([
|
2196
2488
|
colorId,
|
2197
2489
|
value
|
@@ -2522,19 +2814,17 @@ const isDimensionSelector = (selector)=>'object' == typeof selector && null !==
|
|
2522
2814
|
].includes(selector.op));
|
2523
2815
|
const barStyle_barStyle = (spec, context)=>{
|
2524
2816
|
const { advancedVSeed } = context;
|
2525
|
-
const { markStyle
|
2817
|
+
const { markStyle } = advancedVSeed;
|
2526
2818
|
const { barStyle } = markStyle;
|
2527
2819
|
const result = {
|
2528
2820
|
...spec,
|
2529
2821
|
bar: {
|
2822
|
+
style: {
|
2823
|
+
stroke: '#fff',
|
2824
|
+
lineWidth: 1
|
2825
|
+
},
|
2530
2826
|
state: {
|
2531
2827
|
hover: {
|
2532
|
-
stroke: (datum, context)=>{
|
2533
|
-
const field = encoding[0]?.group?.[0];
|
2534
|
-
const color = context.seriesColor(datum[field]);
|
2535
|
-
return color;
|
2536
|
-
},
|
2537
|
-
lineWidth: 4,
|
2538
2828
|
fillOpacity: 0.6
|
2539
2829
|
}
|
2540
2830
|
}
|
@@ -2590,14 +2880,7 @@ const pointStyle_pointStyle = (spec, context)=>{
|
|
2590
2880
|
const { pointStyle } = markStyle;
|
2591
2881
|
const result = {
|
2592
2882
|
...spec,
|
2593
|
-
point: {
|
2594
|
-
state: {
|
2595
|
-
dimension_hover: {
|
2596
|
-
scaleX: 1.4,
|
2597
|
-
scaleY: 1.4
|
2598
|
-
}
|
2599
|
-
}
|
2600
|
-
}
|
2883
|
+
point: {}
|
2601
2884
|
};
|
2602
2885
|
if (!pointStyle) return result;
|
2603
2886
|
const pointStyles = Array.isArray(pointStyle) ? pointStyle : [
|
@@ -2643,6 +2926,47 @@ const pointStyle_pointStyle = (spec, context)=>{
|
|
2643
2926
|
}
|
2644
2927
|
};
|
2645
2928
|
};
|
2929
|
+
const pointStateDimensionHover = (spec)=>{
|
2930
|
+
const point = spec.point || {};
|
2931
|
+
const result = {
|
2932
|
+
...spec,
|
2933
|
+
point: {
|
2934
|
+
...point,
|
2935
|
+
state: {
|
2936
|
+
dimension_hover: {
|
2937
|
+
scaleX: 1.4,
|
2938
|
+
scaleY: 1.4
|
2939
|
+
}
|
2940
|
+
}
|
2941
|
+
}
|
2942
|
+
};
|
2943
|
+
return result;
|
2944
|
+
};
|
2945
|
+
const pointStateHover = (spec, context)=>{
|
2946
|
+
const point = spec.point || {};
|
2947
|
+
const { advancedVSeed } = context;
|
2948
|
+
const { encoding } = advancedVSeed;
|
2949
|
+
const result = {
|
2950
|
+
...spec,
|
2951
|
+
point: {
|
2952
|
+
...point,
|
2953
|
+
state: {
|
2954
|
+
hover: {
|
2955
|
+
scaleX: 1.4,
|
2956
|
+
scaleY: 1.4,
|
2957
|
+
stroke: (datum, context)=>{
|
2958
|
+
const field = encoding[0]?.group?.[0];
|
2959
|
+
const color = context.seriesColor(datum[field]);
|
2960
|
+
return color;
|
2961
|
+
},
|
2962
|
+
fillOpacity: 0.6,
|
2963
|
+
lineWidth: 1
|
2964
|
+
}
|
2965
|
+
}
|
2966
|
+
}
|
2967
|
+
};
|
2968
|
+
return result;
|
2969
|
+
};
|
2646
2970
|
const lineStyle_lineStyle = (spec, context)=>{
|
2647
2971
|
const { advancedVSeed } = context;
|
2648
2972
|
const { markStyle, encoding, dataset } = advancedVSeed;
|
@@ -3356,6 +3680,46 @@ const horizontalCrosshairRect = (spec, context)=>{
|
|
3356
3680
|
};
|
3357
3681
|
return result;
|
3358
3682
|
};
|
3683
|
+
const horizontalCrosshairLine = (spec, context)=>{
|
3684
|
+
const result = {
|
3685
|
+
...spec
|
3686
|
+
};
|
3687
|
+
const { advancedVSeed, vseed } = context;
|
3688
|
+
const { chartType } = vseed;
|
3689
|
+
const config = advancedVSeed.config?.[chartType]?.crosshairLine;
|
3690
|
+
if (!config) return result;
|
3691
|
+
if (!result.crosshair) result.crosshair = {};
|
3692
|
+
const { visible = true, lineColor, labelColor, labelVisible, labelBackgroundColor } = config;
|
3693
|
+
const crosshair = result.crosshair;
|
3694
|
+
crosshair.yField = {
|
3695
|
+
visible,
|
3696
|
+
line: {
|
3697
|
+
type: 'line',
|
3698
|
+
style: {
|
3699
|
+
lineWidth: 1,
|
3700
|
+
opacity: 1,
|
3701
|
+
stroke: lineColor,
|
3702
|
+
lineDash: [
|
3703
|
+
4,
|
3704
|
+
2
|
3705
|
+
]
|
3706
|
+
}
|
3707
|
+
},
|
3708
|
+
label: {
|
3709
|
+
visible: labelVisible,
|
3710
|
+
labelBackground: {
|
3711
|
+
visible: labelVisible,
|
3712
|
+
style: {
|
3713
|
+
fill: labelBackgroundColor
|
3714
|
+
}
|
3715
|
+
},
|
3716
|
+
style: {
|
3717
|
+
fill: labelColor
|
3718
|
+
}
|
3719
|
+
}
|
3720
|
+
};
|
3721
|
+
return result;
|
3722
|
+
};
|
3359
3723
|
const line_line = [
|
3360
3724
|
initLine,
|
3361
3725
|
color_color,
|
@@ -3368,6 +3732,7 @@ const line_line = [
|
|
3368
3732
|
verticalCrosshairLine,
|
3369
3733
|
discreteLegend,
|
3370
3734
|
pointStyle_pointStyle,
|
3735
|
+
pointStateDimensionHover,
|
3371
3736
|
lineStyle_lineStyle,
|
3372
3737
|
annotationPoint_annotationPoint,
|
3373
3738
|
annotationVerticalLine_annotationVerticalLine,
|
@@ -3390,6 +3755,7 @@ const pivotLine = [
|
|
3390
3755
|
tooltip_tooltip,
|
3391
3756
|
verticalCrosshairLine,
|
3392
3757
|
pointStyle_pointStyle,
|
3758
|
+
pointStateDimensionHover,
|
3393
3759
|
lineStyle_lineStyle,
|
3394
3760
|
annotationPoint_annotationPoint,
|
3395
3761
|
annotationVerticalLine_annotationVerticalLine,
|
@@ -3706,6 +4072,7 @@ const area_area = [
|
|
3706
4072
|
verticalCrosshairLine,
|
3707
4073
|
discreteLegend,
|
3708
4074
|
pointStyle_pointStyle,
|
4075
|
+
pointStateDimensionHover,
|
3709
4076
|
lineStyle_lineStyle,
|
3710
4077
|
areaStyle_areaStyle,
|
3711
4078
|
annotationPoint_annotationPoint,
|
@@ -3730,6 +4097,7 @@ const pivotArea = [
|
|
3730
4097
|
tooltip_tooltip,
|
3731
4098
|
verticalCrosshairLine,
|
3732
4099
|
pointStyle_pointStyle,
|
4100
|
+
pointStateDimensionHover,
|
3733
4101
|
lineStyle_lineStyle,
|
3734
4102
|
areaStyle_areaStyle,
|
3735
4103
|
annotationPoint_annotationPoint,
|
@@ -3922,7 +4290,6 @@ const roseParallel = [
|
|
3922
4290
|
tooltip_tooltip,
|
3923
4291
|
discreteLegend,
|
3924
4292
|
verticalCrosshairRect,
|
3925
|
-
barStyle_barStyle,
|
3926
4293
|
annotationPoint_annotationPoint,
|
3927
4294
|
annotationVerticalLine_annotationVerticalLine,
|
3928
4295
|
annotationHorizontalLine_annotationHorizontalLine,
|
@@ -3944,7 +4311,6 @@ const pivotRoseParallel = [
|
|
3944
4311
|
label_label,
|
3945
4312
|
tooltip_tooltip,
|
3946
4313
|
verticalCrosshairRect,
|
3947
|
-
barStyle_barStyle,
|
3948
4314
|
annotationPoint_annotationPoint,
|
3949
4315
|
annotationVerticalLine_annotationVerticalLine,
|
3950
4316
|
annotationHorizontalLine_annotationHorizontalLine,
|
@@ -3957,6 +4323,113 @@ const pivotRoseParallel = [
|
|
3957
4323
|
const roseParallelSpecPipeline = [
|
3958
4324
|
pivotAdapter_pivotAdapter(roseParallel, pivotRoseParallel)
|
3959
4325
|
];
|
4326
|
+
const funnel = [
|
4327
|
+
initFunnel,
|
4328
|
+
color_color,
|
4329
|
+
background_backgroundColor,
|
4330
|
+
dataset_dataset,
|
4331
|
+
label_label,
|
4332
|
+
tooltip_tooltip,
|
4333
|
+
discreteLegend,
|
4334
|
+
annotationPoint_annotationPoint,
|
4335
|
+
annotationVerticalLine_annotationVerticalLine,
|
4336
|
+
annotationHorizontalLine_annotationHorizontalLine,
|
4337
|
+
annotationArea_annotationArea
|
4338
|
+
];
|
4339
|
+
const pivotFunnel = [
|
4340
|
+
initPivot,
|
4341
|
+
pivotGridStyle,
|
4342
|
+
pivotIndicators_pivotIndicatorsAsRow,
|
4343
|
+
datasetPivot,
|
4344
|
+
pivotIndicators([
|
4345
|
+
initFunnel,
|
4346
|
+
color_color,
|
4347
|
+
background_backgroundColor,
|
4348
|
+
datasetPivotPlaceholder,
|
4349
|
+
label_label,
|
4350
|
+
tooltip_tooltip,
|
4351
|
+
annotationPoint_annotationPoint,
|
4352
|
+
annotationVerticalLine_annotationVerticalLine,
|
4353
|
+
annotationHorizontalLine_annotationHorizontalLine,
|
4354
|
+
annotationArea_annotationArea
|
4355
|
+
]),
|
4356
|
+
pivotRowDimensions,
|
4357
|
+
pivotColumnDimensions,
|
4358
|
+
pivotDiscreteLegend
|
4359
|
+
];
|
4360
|
+
const funnelSpecPipeline = [
|
4361
|
+
pivotAdapter_pivotAdapter(funnel, pivotFunnel)
|
4362
|
+
];
|
4363
|
+
const initScatter = (spec, context)=>{
|
4364
|
+
const result = {
|
4365
|
+
...spec
|
4366
|
+
};
|
4367
|
+
const { advancedVSeed } = context;
|
4368
|
+
const { encoding } = advancedVSeed;
|
4369
|
+
if (!encoding[0].y || !encoding[0].x || !encoding[0].group) return result;
|
4370
|
+
result.type = 'scatter';
|
4371
|
+
result.direction = 'vertical';
|
4372
|
+
result.xField = encoding[0].x[0];
|
4373
|
+
result.yField = encoding[0].y[0];
|
4374
|
+
result.seriesField = encoding[0].group[0];
|
4375
|
+
result.padding = 0;
|
4376
|
+
result.region = [
|
4377
|
+
{
|
4378
|
+
clip: true
|
4379
|
+
}
|
4380
|
+
];
|
4381
|
+
result.animation = true;
|
4382
|
+
return result;
|
4383
|
+
};
|
4384
|
+
const scatter = [
|
4385
|
+
initScatter,
|
4386
|
+
color_color,
|
4387
|
+
background_backgroundColor,
|
4388
|
+
dataset_dataset,
|
4389
|
+
xLinear,
|
4390
|
+
yLinear,
|
4391
|
+
label_label,
|
4392
|
+
tooltip_tooltip,
|
4393
|
+
verticalCrosshairLine,
|
4394
|
+
horizontalCrosshairLine,
|
4395
|
+
discreteLegend,
|
4396
|
+
pointStyle_pointStyle,
|
4397
|
+
pointStateHover,
|
4398
|
+
annotationPoint_annotationPoint,
|
4399
|
+
annotationVerticalLine_annotationVerticalLine,
|
4400
|
+
annotationHorizontalLine_annotationHorizontalLine,
|
4401
|
+
annotationArea_annotationArea
|
4402
|
+
];
|
4403
|
+
const pivotScatter = [
|
4404
|
+
initPivot,
|
4405
|
+
pivotGridStyle,
|
4406
|
+
pivotIndicators_pivotIndicatorsAsRow,
|
4407
|
+
datasetPivot,
|
4408
|
+
pivotIndicators([
|
4409
|
+
initScatter,
|
4410
|
+
color_color,
|
4411
|
+
background_backgroundColor,
|
4412
|
+
datasetPivotPlaceholder,
|
4413
|
+
xLinear,
|
4414
|
+
yLinear,
|
4415
|
+
label_label,
|
4416
|
+
tooltip_tooltip,
|
4417
|
+
verticalCrosshairLine,
|
4418
|
+
horizontalCrosshairLine,
|
4419
|
+
pointStyle_pointStyle,
|
4420
|
+
pointStateHover,
|
4421
|
+
annotationPoint_annotationPoint,
|
4422
|
+
annotationVerticalLine_annotationVerticalLine,
|
4423
|
+
annotationHorizontalLine_annotationHorizontalLine,
|
4424
|
+
annotationArea_annotationArea
|
4425
|
+
]),
|
4426
|
+
pivotRowDimensions,
|
4427
|
+
pivotColumnDimensions,
|
4428
|
+
pivotDiscreteLegend
|
4429
|
+
];
|
4430
|
+
const scatterSpecPipeline = [
|
4431
|
+
pivotAdapter_pivotAdapter(scatter, pivotScatter)
|
4432
|
+
];
|
3960
4433
|
const buildAdvanced = (builder)=>{
|
3961
4434
|
const { chartType } = builder.vseed;
|
3962
4435
|
if (!chartType) throw new Error('chartType is nil in buildAdvanced');
|
@@ -4087,6 +4560,14 @@ const registerRoseParallel = ()=>{
|
|
4087
4560
|
Builder._advancedPipelineMap.roseParallel = roseParallelAdvancedPipeline;
|
4088
4561
|
Builder._specPipelineMap.roseParallel = roseParallelSpecPipeline;
|
4089
4562
|
};
|
4563
|
+
const registerFunnel = ()=>{
|
4564
|
+
Builder._advancedPipelineMap.funnel = funnelAdvancedPipeline;
|
4565
|
+
Builder._specPipelineMap.funnel = funnelSpecPipeline;
|
4566
|
+
};
|
4567
|
+
const registerScatter = ()=>{
|
4568
|
+
Builder._advancedPipelineMap.scatter = scatterAdvancedPipeline;
|
4569
|
+
Builder._specPipelineMap.scatter = scatterSpecPipeline;
|
4570
|
+
};
|
4090
4571
|
const darkTheme = ()=>{
|
4091
4572
|
const linearAxis = {
|
4092
4573
|
nice: true,
|
@@ -4311,6 +4792,23 @@ const darkTheme = ()=>{
|
|
4311
4792
|
xAxis: bandAxis,
|
4312
4793
|
yAxis: linearAxis,
|
4313
4794
|
crosshairLine: crosshairLine
|
4795
|
+
},
|
4796
|
+
scatter: {
|
4797
|
+
xAxis: {
|
4798
|
+
...linearAxis,
|
4799
|
+
line: {
|
4800
|
+
...linearAxis.line,
|
4801
|
+
visible: true
|
4802
|
+
}
|
4803
|
+
},
|
4804
|
+
yAxis: {
|
4805
|
+
...linearAxis,
|
4806
|
+
line: {
|
4807
|
+
...linearAxis.line,
|
4808
|
+
visible: true
|
4809
|
+
}
|
4810
|
+
},
|
4811
|
+
crosshairLine
|
4314
4812
|
}
|
4315
4813
|
}
|
4316
4814
|
};
|
@@ -4540,6 +5038,23 @@ const lightTheme = ()=>{
|
|
4540
5038
|
xAxis: bandAxis,
|
4541
5039
|
yAxis: linearAxis,
|
4542
5040
|
crosshairLine
|
5041
|
+
},
|
5042
|
+
scatter: {
|
5043
|
+
xAxis: {
|
5044
|
+
...linearAxis,
|
5045
|
+
line: {
|
5046
|
+
...linearAxis.line,
|
5047
|
+
visible: true
|
5048
|
+
}
|
5049
|
+
},
|
5050
|
+
yAxis: {
|
5051
|
+
...linearAxis,
|
5052
|
+
line: {
|
5053
|
+
...linearAxis.line,
|
5054
|
+
visible: true
|
5055
|
+
}
|
5056
|
+
},
|
5057
|
+
crosshairLine
|
4543
5058
|
}
|
4544
5059
|
}
|
4545
5060
|
};
|
@@ -4571,6 +5086,8 @@ const registerAll = ()=>{
|
|
4571
5086
|
registerDonut();
|
4572
5087
|
registerRose();
|
4573
5088
|
registerRoseParallel();
|
5089
|
+
registerFunnel();
|
5090
|
+
registerScatter();
|
4574
5091
|
registerLightTheme();
|
4575
5092
|
registerDarkTheme();
|
4576
5093
|
};
|
@@ -4590,7 +5107,9 @@ const zChartType = z["enum"]([
|
|
4590
5107
|
'roseParallel',
|
4591
5108
|
'pie',
|
4592
5109
|
'donut',
|
4593
|
-
'dualAxis'
|
5110
|
+
'dualAxis',
|
5111
|
+
'scatter',
|
5112
|
+
'funnel'
|
4594
5113
|
]);
|
4595
5114
|
const zDatum = z.record(z.string().or(z.number()), z.any());
|
4596
5115
|
const zDataset = z.array(zDatum);
|
@@ -4663,7 +5182,8 @@ const zEncoding = z.array(z.object({
|
|
4663
5182
|
group: z.array(z.string()).optional(),
|
4664
5183
|
angle: z.array(z.string()).optional(),
|
4665
5184
|
radius: z.array(z.string()).optional(),
|
4666
|
-
tooltip: z.array(z.string()).optional()
|
5185
|
+
tooltip: z.array(z.string()).optional(),
|
5186
|
+
size: z.array(z.string()).optional()
|
4667
5187
|
}));
|
4668
5188
|
const zBackgroundColor = z.string().default('transparent').optional();
|
4669
5189
|
const zLabel = z.object({
|
@@ -4896,6 +5416,8 @@ const zStackCornerRadius = z.number().or(z.array(z.number())).default([
|
|
4896
5416
|
0
|
4897
5417
|
]);
|
4898
5418
|
const zConfig = z.object({
|
5419
|
+
table: z.object({}).optional(),
|
5420
|
+
pivotTable: z.object({}).optional(),
|
4899
5421
|
line: z.object({
|
4900
5422
|
xAxis: zXBandAxis.optional(),
|
4901
5423
|
yAxis: zYLinearAxis.optional(),
|
@@ -4952,8 +5474,12 @@ const zConfig = z.object({
|
|
4952
5474
|
pie: z.object({}).optional(),
|
4953
5475
|
donut: z.object({}).optional(),
|
4954
5476
|
dualAxis: z.object({}).optional(),
|
4955
|
-
|
4956
|
-
|
5477
|
+
scatter: z.object({
|
5478
|
+
xAxis: zXLinearAxis.optional(),
|
5479
|
+
yAxis: zYLinearAxis.optional(),
|
5480
|
+
crosshairLine: zCrosshairLine.optional()
|
5481
|
+
}).optional(),
|
5482
|
+
funnel: z.object({}).optional()
|
4957
5483
|
});
|
4958
5484
|
const zSelector = z.union([
|
4959
5485
|
z.string(),
|
@@ -5402,6 +5928,19 @@ const zLine = z.object({
|
|
5402
5928
|
annotationArea: zAnnotationArea.optional(),
|
5403
5929
|
locale: zLocale.optional()
|
5404
5930
|
});
|
5931
|
+
const zRose = z.object({
|
5932
|
+
chartType: z.literal('rose'),
|
5933
|
+
dataset: zDataset.optional(),
|
5934
|
+
dimensions: zDimensions.optional(),
|
5935
|
+
measures: zMeasures.optional(),
|
5936
|
+
backgroundColor: zBackgroundColor.optional(),
|
5937
|
+
color: zColor.optional(),
|
5938
|
+
label: zLabel.optional(),
|
5939
|
+
legend: zLegend.optional(),
|
5940
|
+
tooltip: zTooltip.optional(),
|
5941
|
+
theme: zTheme.optional(),
|
5942
|
+
locale: zLocale.optional()
|
5943
|
+
});
|
5405
5944
|
const zBarPercent = z.object({
|
5406
5945
|
chartType: z.literal('barPercent'),
|
5407
5946
|
dataset: zDataset.optional(),
|
@@ -5437,6 +5976,19 @@ const zPie = z.object({
|
|
5437
5976
|
theme: zTheme.optional(),
|
5438
5977
|
locale: zLocale.optional()
|
5439
5978
|
});
|
5979
|
+
const zDonut = z.object({
|
5980
|
+
chartType: z.literal('donut'),
|
5981
|
+
dataset: zDataset.optional(),
|
5982
|
+
dimensions: zDimensions.optional(),
|
5983
|
+
measures: zMeasures.optional(),
|
5984
|
+
backgroundColor: zBackgroundColor.optional(),
|
5985
|
+
color: zColor.optional(),
|
5986
|
+
label: zLabel.optional(),
|
5987
|
+
legend: zLegend.optional(),
|
5988
|
+
tooltip: zTooltip.optional(),
|
5989
|
+
theme: zTheme.optional(),
|
5990
|
+
locale: zLocale.optional()
|
5991
|
+
});
|
5440
5992
|
const zArea = z.object({
|
5441
5993
|
chartType: z.literal('area'),
|
5442
5994
|
dataset: zDataset.optional(),
|
@@ -5483,6 +6035,53 @@ const zAreaPercent = z.object({
|
|
5483
6035
|
annotationArea: zAnnotationArea.optional(),
|
5484
6036
|
locale: zLocale.optional()
|
5485
6037
|
});
|
6038
|
+
const zRoseParallel = z.object({
|
6039
|
+
chartType: z.literal('roseParallel'),
|
6040
|
+
dataset: zDataset.optional(),
|
6041
|
+
dimensions: zDimensions.optional(),
|
6042
|
+
measures: zMeasures.optional(),
|
6043
|
+
backgroundColor: zBackgroundColor.optional(),
|
6044
|
+
color: zColor.optional(),
|
6045
|
+
label: zLabel.optional(),
|
6046
|
+
legend: zLegend.optional(),
|
6047
|
+
tooltip: zTooltip.optional(),
|
6048
|
+
theme: zTheme.optional(),
|
6049
|
+
locale: zLocale.optional()
|
6050
|
+
});
|
6051
|
+
const zScatter = z.object({
|
6052
|
+
chartType: z.literal('scatter'),
|
6053
|
+
dataset: zDataset.optional(),
|
6054
|
+
dimensions: zDimensions.optional(),
|
6055
|
+
measures: zMeasures.optional(),
|
6056
|
+
backgroundColor: zBackgroundColor.optional(),
|
6057
|
+
color: zColor.optional(),
|
6058
|
+
label: zLabel.optional(),
|
6059
|
+
legend: zLegend.optional(),
|
6060
|
+
tooltip: zTooltip.optional(),
|
6061
|
+
xAxis: zXLinearAxis.optional(),
|
6062
|
+
yAxis: zYLinearAxis.optional(),
|
6063
|
+
crosshairLine: zCrosshairLine.optional(),
|
6064
|
+
theme: zTheme.optional(),
|
6065
|
+
pointStyle: zPointStyle.optional(),
|
6066
|
+
annotationPoint: zAnnotationPoint.optional(),
|
6067
|
+
annotationVerticalLine: zAnnotationVerticalLine.optional(),
|
6068
|
+
annotationHorizontalLine: zAnnotationHorizontalLine.optional(),
|
6069
|
+
annotationArea: zAnnotationArea.optional(),
|
6070
|
+
locale: zLocale.optional()
|
6071
|
+
});
|
6072
|
+
const zFunnel = z.object({
|
6073
|
+
chartType: z.literal('funnel'),
|
6074
|
+
dataset: zDataset.optional(),
|
6075
|
+
dimensions: zDimensions.optional(),
|
6076
|
+
measures: zMeasures.optional(),
|
6077
|
+
backgroundColor: zBackgroundColor.optional(),
|
6078
|
+
color: zColor.optional(),
|
6079
|
+
label: zLabel.optional(),
|
6080
|
+
legend: zLegend.optional(),
|
6081
|
+
tooltip: zTooltip.optional(),
|
6082
|
+
theme: zTheme.optional(),
|
6083
|
+
locale: zLocale.optional()
|
6084
|
+
});
|
5486
6085
|
const zVSeed = z.discriminatedUnion('chartType', [
|
5487
6086
|
zLine,
|
5488
6087
|
zColumn,
|
@@ -5493,8 +6092,13 @@ const zVSeed = z.discriminatedUnion('chartType', [
|
|
5493
6092
|
zBarPercent,
|
5494
6093
|
zArea,
|
5495
6094
|
zAreaPercent,
|
5496
|
-
zPie
|
6095
|
+
zPie,
|
6096
|
+
zRose,
|
6097
|
+
zRoseParallel,
|
6098
|
+
zScatter,
|
6099
|
+
zDonut,
|
6100
|
+
zFunnel
|
5497
6101
|
]);
|
5498
|
-
export { Builder, FoldMeasureId, FoldMeasureName, FoldMeasureValue, ORIGINAL_DATA, Separator, UnfoldDimensionGroup, UnfoldDimensionGroupId, areaAdvancedPipeline, areaPercentAdvancedPipeline, areaPercentSpecPipeline, areaSpecPipeline, autoFormatter, autoNumFormatter, barAdvancedPipeline, barParallelAdvancedPipeline, barParallelSpecPipeline, barPercentAdvancedPipeline, barPercentSpecPipeline, barSpecPipeline, columnAdvancedPipeline, columnParallelAdvancedPipeline, columnParallelSpecPipeline, columnPercentAdvancedPipeline, columnPercentSpecPipeline, columnSpecPipeline, createFormatter, createNumFormatter, darkTheme, dataReshapeFor1D1M, dataReshapeFor2D1M, donutAdvancedPipeline, donutSpecPipeline, execPipeline, findMeasureById, foldMeasures, i18n, intl, isPivotChart, isVChart, isVTable, lightTheme, lineAdvancedPipeline, lineSpecPipeline, pieAdvancedPipeline, pieSpecPipeline, registerAll, registerArea, registerAreaPercent, registerBar, registerBarParallel, registerBarPercent, registerColumn, registerColumnParallel, registerColumnPercent, registerCustomTheme, registerDarkTheme, registerLightTheme, registerLine, roseAdvancedPipeline, roseParallelAdvancedPipeline, roseParallelSpecPipeline, roseSpecPipeline, unfoldDimensions, zAnnotation, zAnnotationArea, zAnnotationHorizontalLine, zAnnotationPoint, zAnnotationVerticalLine, zAreaStyle, zAxis, zBackgroundColor, zBarStyle, zBaseConfig, zChartType, zColor, zConfig, zCrosshairLine, zCrosshairRect, zCustomTheme, zCustomThemeConfig, zDataset, zDatasetReshapeInfo, zDatum, zDimension, zDimensions, zEncoding, zFoldInfo, zLabel, zLegend, zLineStyle, zMarkStyle, zMeasure, zMeasureGroup, zMeasures, zNumFormat, zPointStyle, zStackCornerRadius, zTheme, zTooltip, zUnfoldInfo, zVSeed, zXBandAxis, zXLinearAxis, zYBandAxis, zYLinearAxis };
|
6102
|
+
export { Builder, FoldMeasureId, FoldMeasureName, FoldMeasureValue, ORIGINAL_DATA, Separator, UnfoldDimensionGroup, UnfoldDimensionGroupId, areaAdvancedPipeline, areaPercentAdvancedPipeline, areaPercentSpecPipeline, areaSpecPipeline, autoFormatter, autoNumFormatter, barAdvancedPipeline, barParallelAdvancedPipeline, barParallelSpecPipeline, barPercentAdvancedPipeline, barPercentSpecPipeline, barSpecPipeline, columnAdvancedPipeline, columnParallelAdvancedPipeline, columnParallelSpecPipeline, columnPercentAdvancedPipeline, columnPercentSpecPipeline, columnSpecPipeline, createFormatter, createNumFormatter, darkTheme, dataReshapeFor1D1M, dataReshapeFor1D2M, dataReshapeFor2D1M, donutAdvancedPipeline, donutSpecPipeline, execPipeline, findFirstMeasure, findMeasureById, foldMeasures, funnelAdvancedPipeline, funnelSpecPipeline, i18n, intl, isPivotChart, isVChart, isVTable, lightTheme, lineAdvancedPipeline, lineSpecPipeline, pieAdvancedPipeline, pieSpecPipeline, registerAll, registerArea, registerAreaPercent, registerBar, registerBarParallel, registerBarPercent, registerColumn, registerColumnParallel, registerColumnPercent, registerCustomTheme, registerDarkTheme, registerLightTheme, registerLine, roseAdvancedPipeline, roseParallelAdvancedPipeline, roseParallelSpecPipeline, roseSpecPipeline, scatterAdvancedPipeline, scatterSpecPipeline, unfoldDimensions, zAnnotation, zAnnotationArea, zAnnotationHorizontalLine, zAnnotationPoint, zAnnotationVerticalLine, zAreaStyle, zAxis, zBackgroundColor, zBarStyle, zBaseConfig, zChartType, zColor, zConfig, zCrosshairLine, zCrosshairRect, zCustomTheme, zCustomThemeConfig, zDataset, zDatasetReshapeInfo, zDatum, zDimension, zDimensions, zEncoding, zFoldInfo, zLabel, zLegend, zLineStyle, zMarkStyle, zMeasure, zMeasureGroup, zMeasures, zNumFormat, zPointStyle, zStackCornerRadius, zTheme, zTooltip, zUnfoldInfo, zVSeed, zXBandAxis, zXLinearAxis, zYBandAxis, zYLinearAxis };
|
5499
6103
|
|
5500
6104
|
//# sourceMappingURL=index.js.map
|