@visactor/vseed 0.0.22 → 0.0.24
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 +2168 -926
- package/dist/builder/register/chartType.d.ts +3 -0
- package/dist/builder/register/custom.d.ts +3 -0
- package/dist/builder/register/index.d.ts +1 -0
- package/dist/dataReshape/dataReshapeFor1D.d.ts +19 -0
- package/dist/dataReshape/dataReshapeFor2D1M0Name.d.ts +19 -0
- package/dist/dataReshape/index.d.ts +2 -0
- package/dist/dataReshape/unfoldZeroDimensions.d.ts +10 -0
- package/dist/index.cjs +1104 -149
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1032 -134
- package/dist/index.js.map +1 -1
- package/dist/pipeline/advanced/chart/pipeline/areaRange.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipeline/heatmap.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipeline/index.d.ts +3 -0
- package/dist/pipeline/advanced/chart/pipeline/radar.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipes/config/config.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipes/encoding/encodingAR.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipes/encoding/encodingXYY.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipes/encoding/index.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipes/init/autoMeasuresBy2M1Group.d.ts +8 -0
- package/dist/pipeline/advanced/chart/pipes/init/index.d.ts +1 -0
- package/dist/pipeline/advanced/chart/pipes/reshape/index.d.ts +5 -1
- package/dist/pipeline/advanced/chart/pipes/reshape/pivotReshapeTo1D.d.ts +8 -0
- package/dist/pipeline/advanced/chart/pipes/reshape/pivotReshapeTo2D1M0Name.d.ts +8 -0
- package/dist/pipeline/advanced/chart/pipes/reshape/reshapeTo1D.d.ts +8 -0
- package/dist/pipeline/advanced/chart/pipes/reshape/reshapeTo2D1M0Name.d.ts +8 -0
- package/dist/pipeline/spec/chart/pipeline/areaRange.d.ts +1 -0
- package/dist/pipeline/spec/chart/pipeline/heatmap.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipeline/index.d.ts +4 -1
- package/dist/pipeline/spec/chart/pipeline/radar.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipes/axes/index.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipes/axes/radarAngle.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipes/axes/radarRadius.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipes/index.d.ts +1 -0
- package/dist/pipeline/spec/chart/pipes/init/areaRange.d.ts +4 -0
- package/dist/pipeline/spec/chart/pipes/init/index.d.ts +4 -2
- package/dist/pipeline/spec/chart/pipes/{axes/a.d.ts → init/radar.d.ts} +1 -1
- package/dist/pipeline/spec/chart/pipes/series/index.d.ts +1 -0
- package/dist/pipeline/spec/chart/pipes/series/series.d.ts +2 -0
- package/dist/types/advancedVSeed.d.ts +763 -186
- package/dist/types/chartType/areaRange/areaRange.d.ts +1337 -0
- package/dist/types/chartType/areaRange/index.d.ts +1 -0
- package/dist/types/chartType/heatmap/heatmap.d.ts +207 -0
- package/dist/types/chartType/heatmap/index.d.ts +1 -0
- package/dist/types/chartType/index.d.ts +5 -2
- package/dist/types/chartType/radar/index.d.ts +1 -0
- package/dist/types/chartType/radar/radar.d.ts +207 -0
- package/dist/types/properties/chartType/chartType.d.ts +12 -6
- package/dist/types/properties/config/config.d.ts +843 -255
- package/dist/types/properties/theme/customTheme.d.ts +788 -214
- package/dist/types/vseed.d.ts +2051 -628
- package/dist/umd/index.js +1066 -149
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -299,6 +299,51 @@ const autoDimensions = (advancedVSeed, context)=>{
|
|
299
299
|
}));
|
300
300
|
return result;
|
301
301
|
};
|
302
|
+
const autoMeasuresBy2M1Group = (advancedVSeed, context)=>{
|
303
|
+
const result = {
|
304
|
+
...advancedVSeed
|
305
|
+
};
|
306
|
+
const { vseed } = context;
|
307
|
+
const { measures, dataset } = vseed;
|
308
|
+
if (!dataset) throw new Error('dataset is required');
|
309
|
+
if (0 === dataset.length) return result;
|
310
|
+
if (measures) {
|
311
|
+
result.measures = auto2M1Group(measures);
|
312
|
+
return result;
|
313
|
+
}
|
314
|
+
const top100dataset = dataset.slice(0, 100);
|
315
|
+
const sample = top100dataset.reduce((prev, cur)=>({
|
316
|
+
...prev,
|
317
|
+
...cur
|
318
|
+
}), {});
|
319
|
+
const newMeasures = Object.keys(sample).filter((key)=>top100dataset.some((item)=>'number' == typeof item[key]) && ![
|
320
|
+
'',
|
321
|
+
null,
|
322
|
+
void 0
|
323
|
+
].includes(key)).map((measure)=>({
|
324
|
+
id: measure,
|
325
|
+
alias: measure
|
326
|
+
}));
|
327
|
+
result.measures = auto2M1Group(newMeasures);
|
328
|
+
return result;
|
329
|
+
};
|
330
|
+
const auto2M1Group = (measures)=>{
|
331
|
+
const allMeasures = findAllMeasures(measures);
|
332
|
+
if (allMeasures.length <= 2) return allMeasures;
|
333
|
+
const groups = measures.filter((measure)=>'children' in measure);
|
334
|
+
const singleMeasures = measures.filter((measure)=>!('children' in measure));
|
335
|
+
for(let i = 0; i < singleMeasures.length; i += 2){
|
336
|
+
const group = autoMeasuresBy2M1Group_createEmptyMeasureGroup();
|
337
|
+
group.children = allMeasures.slice(i, i + 2);
|
338
|
+
groups.push(group);
|
339
|
+
}
|
340
|
+
return groups;
|
341
|
+
};
|
342
|
+
const autoMeasuresBy2M1Group_createEmptyMeasureGroup = ()=>({
|
343
|
+
id: '',
|
344
|
+
alias: '',
|
345
|
+
children: []
|
346
|
+
});
|
302
347
|
const FoldMeasureName = '__MeaName__';
|
303
348
|
const FoldMeasureValue = '__MeaValue__';
|
304
349
|
const FoldMeasureId = '__MeaId__';
|
@@ -329,10 +374,10 @@ const unfoldDimensions = (dataset, dimensions, measures, unfoldStartIndex = 0, u
|
|
329
374
|
for(let i = 0; i < dataset.length; i++){
|
330
375
|
const datum = dataset[i];
|
331
376
|
const colorName = generateDimGroupName(dimensionsToBeUnfolded, datum, dimensionsSeparator);
|
332
|
-
const colorId = [
|
377
|
+
const colorId = datum[foldMeasureId] ? [
|
333
378
|
colorName,
|
334
|
-
datum[foldMeasureId]
|
335
|
-
].join(dimensionsSeparator);
|
379
|
+
datum[foldMeasureId]
|
380
|
+
].join(dimensionsSeparator) : colorName;
|
336
381
|
datum[unfoldGroupName] = colorName;
|
337
382
|
datum[unfoldGroupId] = colorId;
|
338
383
|
colorItems.push(colorId);
|
@@ -558,6 +603,148 @@ const dataReshapeFor1D2M = (dataset, dimensions, measures, options)=>{
|
|
558
603
|
};
|
559
604
|
}
|
560
605
|
};
|
606
|
+
const dataReshapeFor1D_emptyReshapeResult = {
|
607
|
+
dataset: [],
|
608
|
+
foldInfo: {
|
609
|
+
foldMap: {},
|
610
|
+
measureId: '',
|
611
|
+
measureName: '',
|
612
|
+
measureValue: ''
|
613
|
+
},
|
614
|
+
unfoldInfo: {
|
615
|
+
groupName: '',
|
616
|
+
groupId: '',
|
617
|
+
colorItems: [],
|
618
|
+
colorIdMap: {}
|
619
|
+
}
|
620
|
+
};
|
621
|
+
const dataReshapeFor1D = (dataset, dimensions, measures, options)=>{
|
622
|
+
const { foldMeasureId = FoldMeasureId, foldMeasureName = FoldMeasureName, foldMeasureValue = FoldMeasureValue, unfoldDimensionGroup = UnfoldDimensionGroup, unfoldDimensionGroupId = UnfoldDimensionGroupId } = options || {};
|
623
|
+
if (0 === dimensions.length && 0 === measures.length) return dataReshapeFor1D_emptyReshapeResult;
|
624
|
+
if (0 === dimensions.length) {
|
625
|
+
const { dataset: finalDataset, unfoldInfo } = unfoldDimensions(dataset, [], [], 0, unfoldDimensionGroup, unfoldDimensionGroupId, foldMeasureId);
|
626
|
+
return {
|
627
|
+
dataset: finalDataset,
|
628
|
+
foldInfo: {
|
629
|
+
foldMap: {},
|
630
|
+
measureId: foldMeasureId,
|
631
|
+
measureName: foldMeasureName,
|
632
|
+
measureValue: foldMeasureValue
|
633
|
+
},
|
634
|
+
unfoldInfo
|
635
|
+
};
|
636
|
+
}
|
637
|
+
{
|
638
|
+
const { dataset: finalDataset, unfoldInfo } = unfoldDimensions(dataset, [
|
639
|
+
...dimensions
|
640
|
+
], [
|
641
|
+
{
|
642
|
+
id: foldMeasureValue,
|
643
|
+
alias: i18n`指标值`
|
644
|
+
}
|
645
|
+
], 0, unfoldDimensionGroup, unfoldDimensionGroupId, foldMeasureId);
|
646
|
+
return {
|
647
|
+
dataset: finalDataset,
|
648
|
+
foldInfo: {
|
649
|
+
foldMap: {},
|
650
|
+
measureId: foldMeasureId,
|
651
|
+
measureName: foldMeasureName,
|
652
|
+
measureValue: foldMeasureValue
|
653
|
+
},
|
654
|
+
unfoldInfo
|
655
|
+
};
|
656
|
+
}
|
657
|
+
};
|
658
|
+
const unfoldZeroDimensions = (dataset, measures, measureName, unfoldGroupName = UnfoldDimensionGroup, unfoldGroupId = UnfoldDimensionGroupId)=>{
|
659
|
+
const unfoldInfo = {
|
660
|
+
groupName: unfoldGroupName,
|
661
|
+
groupId: unfoldGroupId,
|
662
|
+
colorItems: [],
|
663
|
+
colorIdMap: {}
|
664
|
+
};
|
665
|
+
if (0 === measures.length) return {
|
666
|
+
dataset,
|
667
|
+
unfoldInfo: {
|
668
|
+
groupName: unfoldGroupName,
|
669
|
+
groupId: unfoldGroupId,
|
670
|
+
colorItems: [],
|
671
|
+
colorIdMap: {}
|
672
|
+
}
|
673
|
+
};
|
674
|
+
const colorItems = [];
|
675
|
+
const colorMap = {};
|
676
|
+
for(let i = 0; i < dataset.length; i++){
|
677
|
+
const datum = dataset[i];
|
678
|
+
const colorName = measureName;
|
679
|
+
const colorId = measureName;
|
680
|
+
datum[unfoldGroupName] = colorName;
|
681
|
+
datum[unfoldGroupId] = colorId;
|
682
|
+
colorItems.push(colorId);
|
683
|
+
colorMap[colorId] = colorName;
|
684
|
+
}
|
685
|
+
unfoldInfo.colorItems = unique(colorItems);
|
686
|
+
unfoldInfo.colorIdMap = colorMap;
|
687
|
+
return {
|
688
|
+
dataset,
|
689
|
+
unfoldInfo
|
690
|
+
};
|
691
|
+
};
|
692
|
+
const dataReshapeFor2D1M0Name_emptyReshapeResult = {
|
693
|
+
dataset: [],
|
694
|
+
foldInfo: {
|
695
|
+
foldMap: {},
|
696
|
+
measureId: '',
|
697
|
+
measureName: '',
|
698
|
+
measureValue: ''
|
699
|
+
},
|
700
|
+
unfoldInfo: {
|
701
|
+
groupName: '',
|
702
|
+
groupId: '',
|
703
|
+
colorItems: [],
|
704
|
+
colorIdMap: {}
|
705
|
+
}
|
706
|
+
};
|
707
|
+
const dataReshapeFor2D1M0Name = (dataset, dimensions, measures, options)=>{
|
708
|
+
const { foldMeasureId = FoldMeasureId, foldMeasureName = FoldMeasureName, foldMeasureValue = FoldMeasureValue, unfoldDimensionGroup = UnfoldDimensionGroup, unfoldDimensionGroupId = UnfoldDimensionGroupId } = options || {};
|
709
|
+
if (0 === dimensions.length && 0 === measures.length) return dataReshapeFor2D1M0Name_emptyReshapeResult;
|
710
|
+
const { dataset: foldedDataset, foldInfo } = foldMeasures(dataset, measures, foldMeasureId, foldMeasureName, foldMeasureValue);
|
711
|
+
if (0 === dimensions.length) {
|
712
|
+
const { dataset: finalDataset, unfoldInfo } = unfoldZeroDimensions(foldedDataset, [
|
713
|
+
{
|
714
|
+
id: foldMeasureValue,
|
715
|
+
alias: i18n`指标值`
|
716
|
+
}
|
717
|
+
], i18n`指标名称`, unfoldDimensionGroup, unfoldDimensionGroupId);
|
718
|
+
return {
|
719
|
+
dataset: finalDataset,
|
720
|
+
foldInfo,
|
721
|
+
unfoldInfo
|
722
|
+
};
|
723
|
+
}
|
724
|
+
{
|
725
|
+
const onlyOneMeasure = 1 === measures.length;
|
726
|
+
const onlyOneDimension = 1 === dimensions.length;
|
727
|
+
const dims = [
|
728
|
+
...dimensions
|
729
|
+
];
|
730
|
+
if (!onlyOneMeasure || onlyOneDimension) dims.push({
|
731
|
+
id: foldMeasureName,
|
732
|
+
alias: i18n`指标名称`,
|
733
|
+
location: 'dimension'
|
734
|
+
});
|
735
|
+
const { dataset: finalDataset, unfoldInfo } = unfoldDimensions(foldedDataset, dims, [
|
736
|
+
{
|
737
|
+
id: foldMeasureValue,
|
738
|
+
alias: i18n`指标值`
|
739
|
+
}
|
740
|
+
], 1, unfoldDimensionGroup, unfoldDimensionGroupId, foldMeasureId);
|
741
|
+
return {
|
742
|
+
dataset: finalDataset,
|
743
|
+
foldInfo,
|
744
|
+
unfoldInfo
|
745
|
+
};
|
746
|
+
}
|
747
|
+
};
|
561
748
|
const reshapeTo2D1M = (advancedVSeed, context)=>{
|
562
749
|
const result = {
|
563
750
|
...advancedVSeed
|
@@ -582,6 +769,30 @@ const reshapeTo2D1M = (advancedVSeed, context)=>{
|
|
582
769
|
measures
|
583
770
|
};
|
584
771
|
};
|
772
|
+
const reshapeTo2D1M0Name = (advancedVSeed, context)=>{
|
773
|
+
const result = {
|
774
|
+
...advancedVSeed
|
775
|
+
};
|
776
|
+
const { vseed } = context;
|
777
|
+
const { dataset } = vseed;
|
778
|
+
const { dimensions, measures } = advancedVSeed;
|
779
|
+
if (!measures || !dimensions || !dataset) return result;
|
780
|
+
if (0 === measures.length) throw new Error('measures can not be empty');
|
781
|
+
const { dataset: newDatasets, foldInfo, unfoldInfo } = dataReshapeFor2D1M0Name(dataset, dimensions, measures);
|
782
|
+
return {
|
783
|
+
...result,
|
784
|
+
dataset: newDatasets,
|
785
|
+
datasetReshapeInfo: [
|
786
|
+
{
|
787
|
+
id: '2D1M',
|
788
|
+
foldInfo,
|
789
|
+
unfoldInfo
|
790
|
+
}
|
791
|
+
],
|
792
|
+
dimensions,
|
793
|
+
measures
|
794
|
+
};
|
795
|
+
};
|
585
796
|
const reshapeTo1D1M = (advancedVSeed, context)=>{
|
586
797
|
const result = {
|
587
798
|
...advancedVSeed
|
@@ -626,6 +837,108 @@ const reshapeTo1D2M = (advancedVSeed, context)=>{
|
|
626
837
|
]
|
627
838
|
};
|
628
839
|
};
|
840
|
+
const reshapeTo1D = (advancedVSeed, context)=>{
|
841
|
+
const result = {
|
842
|
+
...advancedVSeed
|
843
|
+
};
|
844
|
+
const { vseed } = context;
|
845
|
+
const { dataset } = vseed;
|
846
|
+
const { dimensions, measures } = advancedVSeed;
|
847
|
+
if (!measures || !dimensions || !dataset) return result;
|
848
|
+
if (0 === measures.length) throw new Error('measures can not be empty');
|
849
|
+
const { dataset: newDatasets, foldInfo, unfoldInfo } = dataReshapeFor1D(dataset, dimensions, measures);
|
850
|
+
return {
|
851
|
+
...result,
|
852
|
+
dataset: newDatasets,
|
853
|
+
datasetReshapeInfo: [
|
854
|
+
{
|
855
|
+
id: '1D2M',
|
856
|
+
foldInfo,
|
857
|
+
unfoldInfo
|
858
|
+
}
|
859
|
+
]
|
860
|
+
};
|
861
|
+
};
|
862
|
+
const pivotReshapeTo2D1M = (advancedVSeed, context)=>{
|
863
|
+
const result = {
|
864
|
+
...advancedVSeed
|
865
|
+
};
|
866
|
+
const { vseed } = context;
|
867
|
+
const { dataset } = vseed;
|
868
|
+
const { measures } = advancedVSeed;
|
869
|
+
const dimensions = advancedVSeed.dimensions;
|
870
|
+
if (!measures || !dimensions) return result;
|
871
|
+
const measureGroups = [];
|
872
|
+
if (measures) measures.forEach((measure)=>{
|
873
|
+
if (measure.children && measure.children.length > 0) measureGroups.push(measure);
|
874
|
+
});
|
875
|
+
const commonDimensions = dimensions.filter((dim)=>'dimension' === dim.location);
|
876
|
+
const newDatasets = [];
|
877
|
+
const datasetReshapeInfo = [];
|
878
|
+
measureGroups.forEach((measureGroup)=>{
|
879
|
+
const measures = measureGroup.children;
|
880
|
+
if (!measures) return;
|
881
|
+
const groupId = measureGroup.id;
|
882
|
+
const { dataset: newSubDataset, foldInfo, unfoldInfo } = dataReshapeFor2D1M(dataset, commonDimensions, measures, {
|
883
|
+
foldMeasureId: FoldMeasureId,
|
884
|
+
foldMeasureName: FoldMeasureName,
|
885
|
+
foldMeasureValue: FoldMeasureValue + groupId,
|
886
|
+
unfoldDimensionGroup: UnfoldDimensionGroup
|
887
|
+
});
|
888
|
+
const reshapeInfo = {
|
889
|
+
id: groupId,
|
890
|
+
foldInfo,
|
891
|
+
unfoldInfo
|
892
|
+
};
|
893
|
+
newDatasets.push(newSubDataset);
|
894
|
+
datasetReshapeInfo.push(reshapeInfo);
|
895
|
+
});
|
896
|
+
return {
|
897
|
+
...result,
|
898
|
+
dataset: newDatasets,
|
899
|
+
datasetReshapeInfo: datasetReshapeInfo
|
900
|
+
};
|
901
|
+
};
|
902
|
+
const pivotReshapeTo2D1M0Name = (advancedVSeed, context)=>{
|
903
|
+
const result = {
|
904
|
+
...advancedVSeed
|
905
|
+
};
|
906
|
+
const { vseed } = context;
|
907
|
+
const { dataset } = vseed;
|
908
|
+
const { measures } = advancedVSeed;
|
909
|
+
const dimensions = advancedVSeed.dimensions;
|
910
|
+
if (!measures || !dimensions) return result;
|
911
|
+
const measureGroups = [];
|
912
|
+
if (measures) measures.forEach((measure)=>{
|
913
|
+
if (measure.children && measure.children.length > 0) measureGroups.push(measure);
|
914
|
+
});
|
915
|
+
const commonDimensions = dimensions.filter((dim)=>'dimension' === dim.location);
|
916
|
+
const newDatasets = [];
|
917
|
+
const datasetReshapeInfo = [];
|
918
|
+
measureGroups.forEach((measureGroup)=>{
|
919
|
+
const measures = measureGroup.children;
|
920
|
+
if (!measures) return;
|
921
|
+
const groupId = measureGroup.id;
|
922
|
+
const { dataset: newSubDataset, foldInfo, unfoldInfo } = dataReshapeFor2D1M0Name(dataset, commonDimensions, measures, {
|
923
|
+
foldMeasureId: FoldMeasureId,
|
924
|
+
foldMeasureName: FoldMeasureName,
|
925
|
+
foldMeasureValue: FoldMeasureValue + groupId,
|
926
|
+
unfoldDimensionGroup: UnfoldDimensionGroup
|
927
|
+
});
|
928
|
+
const reshapeInfo = {
|
929
|
+
id: groupId,
|
930
|
+
foldInfo,
|
931
|
+
unfoldInfo
|
932
|
+
};
|
933
|
+
newDatasets.push(newSubDataset);
|
934
|
+
datasetReshapeInfo.push(reshapeInfo);
|
935
|
+
});
|
936
|
+
return {
|
937
|
+
...result,
|
938
|
+
dataset: newDatasets,
|
939
|
+
datasetReshapeInfo: datasetReshapeInfo
|
940
|
+
};
|
941
|
+
};
|
629
942
|
const pivotReshapeTo1D1M = (advancedVSeed, context)=>{
|
630
943
|
const result = {
|
631
944
|
...advancedVSeed
|
@@ -706,7 +1019,7 @@ const pivotReshapeTo1D2M = (advancedVSeed, context)=>{
|
|
706
1019
|
datasetReshapeInfo: datasetReshapeInfo
|
707
1020
|
};
|
708
1021
|
};
|
709
|
-
const
|
1022
|
+
const pivotReshapeTo1D = (advancedVSeed, context)=>{
|
710
1023
|
const result = {
|
711
1024
|
...advancedVSeed
|
712
1025
|
};
|
@@ -719,14 +1032,14 @@ const pivotReshapeTo2D1M = (advancedVSeed, context)=>{
|
|
719
1032
|
if (measures) measures.forEach((measure)=>{
|
720
1033
|
if (measure.children && measure.children.length > 0) measureGroups.push(measure);
|
721
1034
|
});
|
722
|
-
const commonDimensions = dimensions.filter((dim)=>'dimension' === dim.location);
|
723
1035
|
const newDatasets = [];
|
724
1036
|
const datasetReshapeInfo = [];
|
725
1037
|
measureGroups.forEach((measureGroup)=>{
|
726
1038
|
const measures = measureGroup.children;
|
727
1039
|
if (!measures) return;
|
1040
|
+
const commonDimensions = dimensions.filter((dim)=>'dimension' === dim.location);
|
728
1041
|
const groupId = measureGroup.id;
|
729
|
-
const { dataset: newSubDataset, foldInfo, unfoldInfo } =
|
1042
|
+
const { dataset: newSubDataset, foldInfo, unfoldInfo } = dataReshapeFor1D(dataset, commonDimensions, measures, {
|
730
1043
|
foldMeasureId: FoldMeasureId,
|
731
1044
|
foldMeasureName: FoldMeasureName,
|
732
1045
|
foldMeasureValue: FoldMeasureValue + groupId,
|
@@ -856,6 +1169,74 @@ const encodingYY = (advancedVSeed)=>{
|
|
856
1169
|
encoding
|
857
1170
|
};
|
858
1171
|
};
|
1172
|
+
const encodingXYY = (advancedVSeed)=>{
|
1173
|
+
const result = {
|
1174
|
+
...advancedVSeed
|
1175
|
+
};
|
1176
|
+
const { datasetReshapeInfo, dimensions, measures } = advancedVSeed;
|
1177
|
+
if (!datasetReshapeInfo || !dimensions || !measures) return result;
|
1178
|
+
const encoding = datasetReshapeInfo.reduce((prev, cur, index)=>{
|
1179
|
+
const measure = measures[index];
|
1180
|
+
if ('children' in measure) {
|
1181
|
+
const m1 = measure.children?.[0];
|
1182
|
+
const m2 = measure.children?.[1] || m1;
|
1183
|
+
const { foldInfo, unfoldInfo } = cur;
|
1184
|
+
const x = [
|
1185
|
+
unfoldInfo.groupId
|
1186
|
+
];
|
1187
|
+
const y = [
|
1188
|
+
m1?.id,
|
1189
|
+
m2?.id
|
1190
|
+
];
|
1191
|
+
const group = [
|
1192
|
+
unfoldInfo.groupId
|
1193
|
+
];
|
1194
|
+
const color = [
|
1195
|
+
foldInfo.measureName
|
1196
|
+
];
|
1197
|
+
return [
|
1198
|
+
...prev,
|
1199
|
+
{
|
1200
|
+
x,
|
1201
|
+
y,
|
1202
|
+
group,
|
1203
|
+
color
|
1204
|
+
}
|
1205
|
+
];
|
1206
|
+
}
|
1207
|
+
{
|
1208
|
+
const m1 = measures[index];
|
1209
|
+
const m2 = measures[index + 1] || m1;
|
1210
|
+
const { foldInfo, unfoldInfo } = cur;
|
1211
|
+
const x = [
|
1212
|
+
unfoldInfo.groupId
|
1213
|
+
];
|
1214
|
+
const y = [
|
1215
|
+
m1.id,
|
1216
|
+
m2.id
|
1217
|
+
];
|
1218
|
+
const group = [
|
1219
|
+
unfoldInfo.groupId
|
1220
|
+
];
|
1221
|
+
const color = [
|
1222
|
+
foldInfo.measureName
|
1223
|
+
];
|
1224
|
+
return [
|
1225
|
+
...prev,
|
1226
|
+
{
|
1227
|
+
x,
|
1228
|
+
y,
|
1229
|
+
group,
|
1230
|
+
color
|
1231
|
+
}
|
1232
|
+
];
|
1233
|
+
}
|
1234
|
+
}, []);
|
1235
|
+
return {
|
1236
|
+
...result,
|
1237
|
+
encoding
|
1238
|
+
};
|
1239
|
+
};
|
859
1240
|
const encodingRose = (advancedVSeed)=>{
|
860
1241
|
const result = {
|
861
1242
|
...advancedVSeed
|
@@ -929,6 +1310,43 @@ const encodingPie = (advancedVSeed)=>{
|
|
929
1310
|
encoding
|
930
1311
|
};
|
931
1312
|
};
|
1313
|
+
const encodingAR = (advancedVSeed)=>{
|
1314
|
+
const result = {
|
1315
|
+
...advancedVSeed
|
1316
|
+
};
|
1317
|
+
const { datasetReshapeInfo, dimensions, measures } = advancedVSeed;
|
1318
|
+
if (!datasetReshapeInfo || !dimensions || !measures) return result;
|
1319
|
+
const angleDimension = dimensions.find((item)=>'rowDimension' !== item.location && 'columnDimension' !== item.location);
|
1320
|
+
const isZeroDimension = 0 === dimensions.length;
|
1321
|
+
const encoding = datasetReshapeInfo.reduce((prev, cur)=>{
|
1322
|
+
const { foldInfo, unfoldInfo } = cur;
|
1323
|
+
const angle = [
|
1324
|
+
isZeroDimension ? foldInfo.measureName : angleDimension?.id
|
1325
|
+
];
|
1326
|
+
const radius = [
|
1327
|
+
foldInfo.measureValue
|
1328
|
+
];
|
1329
|
+
const group = [
|
1330
|
+
unfoldInfo.groupId
|
1331
|
+
];
|
1332
|
+
const color = [
|
1333
|
+
unfoldInfo.groupId
|
1334
|
+
];
|
1335
|
+
return [
|
1336
|
+
...prev,
|
1337
|
+
{
|
1338
|
+
angle,
|
1339
|
+
radius,
|
1340
|
+
group,
|
1341
|
+
color
|
1342
|
+
}
|
1343
|
+
];
|
1344
|
+
}, []);
|
1345
|
+
return {
|
1346
|
+
...result,
|
1347
|
+
encoding
|
1348
|
+
};
|
1349
|
+
};
|
932
1350
|
const encodingFunnel = (advancedVSeed)=>{
|
933
1351
|
const result = {
|
934
1352
|
...advancedVSeed
|
@@ -1042,6 +1460,8 @@ const donutConfig = pieConfig;
|
|
1042
1460
|
const roseConfig = pieConfig;
|
1043
1461
|
const roseParallelConfig = pieConfig;
|
1044
1462
|
const funnelConfig = pieConfig;
|
1463
|
+
const heatmapConfig = pieConfig;
|
1464
|
+
const radarConfig = pieConfig;
|
1045
1465
|
const theme_theme = (advancedVSeed, context)=>{
|
1046
1466
|
const { customTheme, vseed } = context;
|
1047
1467
|
const { theme = 'light', chartType } = vseed;
|
@@ -1177,9 +1597,9 @@ const lineAdvancedPipeline = [
|
|
1177
1597
|
autoMeasures,
|
1178
1598
|
autoDimensions,
|
1179
1599
|
pivotAdapter([
|
1180
|
-
|
1600
|
+
reshapeTo2D1M0Name
|
1181
1601
|
], [
|
1182
|
-
|
1602
|
+
pivotReshapeTo2D1M0Name
|
1183
1603
|
]),
|
1184
1604
|
encodingXY,
|
1185
1605
|
sortXBandAxis,
|
@@ -1296,9 +1716,9 @@ const areaAdvancedPipeline = [
|
|
1296
1716
|
autoMeasures,
|
1297
1717
|
autoDimensions,
|
1298
1718
|
pivotAdapter([
|
1299
|
-
|
1719
|
+
reshapeTo2D1M0Name
|
1300
1720
|
], [
|
1301
|
-
|
1721
|
+
pivotReshapeTo2D1M0Name
|
1302
1722
|
]),
|
1303
1723
|
encodingXY,
|
1304
1724
|
sortXBandAxis,
|
@@ -1313,9 +1733,9 @@ const areaPercentAdvancedPipeline = [
|
|
1313
1733
|
autoMeasures,
|
1314
1734
|
autoDimensions,
|
1315
1735
|
pivotAdapter([
|
1316
|
-
|
1736
|
+
reshapeTo2D1M0Name
|
1317
1737
|
], [
|
1318
|
-
|
1738
|
+
pivotReshapeTo2D1M0Name
|
1319
1739
|
]),
|
1320
1740
|
encodingXY,
|
1321
1741
|
sortXBandAxis,
|
@@ -1325,6 +1745,22 @@ const areaPercentAdvancedPipeline = [
|
|
1325
1745
|
markStyle_markStyle,
|
1326
1746
|
annotation_annotation
|
1327
1747
|
];
|
1748
|
+
const areaRangeAdvancedPipeline = [
|
1749
|
+
initAdvancedVSeed,
|
1750
|
+
autoMeasuresBy2M1Group,
|
1751
|
+
autoDimensions,
|
1752
|
+
pivotAdapter([
|
1753
|
+
reshapeTo1D
|
1754
|
+
], [
|
1755
|
+
pivotReshapeTo1D
|
1756
|
+
]),
|
1757
|
+
encodingXYY,
|
1758
|
+
sortXBandAxis,
|
1759
|
+
areaConfig,
|
1760
|
+
theme_theme,
|
1761
|
+
markStyle_markStyle,
|
1762
|
+
annotation_annotation
|
1763
|
+
];
|
1328
1764
|
const pieAdvancedPipeline = [
|
1329
1765
|
initAdvancedVSeed,
|
1330
1766
|
autoMeasures,
|
@@ -1377,37 +1813,69 @@ const roseParallelAdvancedPipeline = [
|
|
1377
1813
|
], [
|
1378
1814
|
pivotReshapeTo2D1M
|
1379
1815
|
]),
|
1380
|
-
encodingRose,
|
1381
|
-
roseParallelConfig,
|
1816
|
+
encodingRose,
|
1817
|
+
roseParallelConfig,
|
1818
|
+
theme_theme,
|
1819
|
+
markStyle_markStyle,
|
1820
|
+
annotation_annotation
|
1821
|
+
];
|
1822
|
+
const funnelAdvancedPipeline = [
|
1823
|
+
initAdvancedVSeed,
|
1824
|
+
autoMeasures,
|
1825
|
+
autoDimensions,
|
1826
|
+
pivotAdapter([
|
1827
|
+
reshapeTo1D1M
|
1828
|
+
], [
|
1829
|
+
pivotReshapeTo1D1M
|
1830
|
+
]),
|
1831
|
+
encodingFunnel,
|
1832
|
+
funnelConfig,
|
1833
|
+
theme_theme,
|
1834
|
+
annotation_annotation
|
1835
|
+
];
|
1836
|
+
const scatterAdvancedPipeline = [
|
1837
|
+
initAdvancedVSeed,
|
1838
|
+
autoMeasures,
|
1839
|
+
autoDimensions,
|
1840
|
+
pivotAdapter([
|
1841
|
+
reshapeTo1D2M
|
1842
|
+
], [
|
1843
|
+
pivotReshapeTo1D2M
|
1844
|
+
]),
|
1845
|
+
encodingYY,
|
1846
|
+
scatterConfig,
|
1382
1847
|
theme_theme,
|
1383
1848
|
markStyle_markStyle,
|
1384
1849
|
annotation_annotation
|
1385
1850
|
];
|
1386
|
-
const
|
1851
|
+
const heatmapAdvancedPipeline = [
|
1387
1852
|
initAdvancedVSeed,
|
1388
1853
|
autoMeasures,
|
1389
1854
|
autoDimensions,
|
1390
1855
|
pivotAdapter([
|
1391
|
-
|
1856
|
+
reshapeTo2D1M
|
1392
1857
|
], [
|
1393
|
-
|
1858
|
+
pivotReshapeTo2D1M
|
1394
1859
|
]),
|
1395
|
-
|
1396
|
-
|
1860
|
+
encodingXY,
|
1861
|
+
sortXBandAxis,
|
1862
|
+
heatmapConfig,
|
1397
1863
|
theme_theme,
|
1864
|
+
markStyle_markStyle,
|
1398
1865
|
annotation_annotation
|
1399
1866
|
];
|
1400
|
-
const
|
1867
|
+
const radarAdvancedPipeline = [
|
1401
1868
|
initAdvancedVSeed,
|
1402
1869
|
autoMeasures,
|
1403
1870
|
autoDimensions,
|
1404
1871
|
pivotAdapter([
|
1405
|
-
|
1872
|
+
reshapeTo2D1M0Name
|
1406
1873
|
], [
|
1407
|
-
|
1874
|
+
pivotReshapeTo2D1M0Name
|
1408
1875
|
]),
|
1409
|
-
|
1410
|
-
|
1876
|
+
encodingAR,
|
1877
|
+
sort_sortLegend,
|
1878
|
+
radarConfig,
|
1411
1879
|
theme_theme,
|
1412
1880
|
markStyle_markStyle,
|
1413
1881
|
annotation_annotation
|
@@ -1565,7 +2033,7 @@ const tableAdvancedPipeline = [
|
|
1565
2033
|
theme_theme
|
1566
2034
|
];
|
1567
2035
|
const dataset_dataset = (spec, context)=>{
|
1568
|
-
const { advancedVSeed } = context;
|
2036
|
+
const { advancedVSeed, vseed } = context;
|
1569
2037
|
const { encoding, analysis, datasetReshapeInfo } = advancedVSeed;
|
1570
2038
|
const { orderMapping = {} } = analysis ?? {};
|
1571
2039
|
const angle = encoding[0]?.angle?.[0];
|
@@ -1614,7 +2082,7 @@ const dataset_dataset = (spec, context)=>{
|
|
1614
2082
|
...spec,
|
1615
2083
|
data: {
|
1616
2084
|
id,
|
1617
|
-
values: advancedVSeed.dataset,
|
2085
|
+
values: isPivotChart(vseed) ? void 0 : advancedVSeed.dataset,
|
1618
2086
|
fields: fields
|
1619
2087
|
}
|
1620
2088
|
};
|
@@ -1723,6 +2191,88 @@ const initArea = (spec, context)=>{
|
|
1723
2191
|
result.animation = true;
|
1724
2192
|
return result;
|
1725
2193
|
};
|
2194
|
+
const initAreaRange = (spec, context)=>{
|
2195
|
+
const result = {
|
2196
|
+
...spec
|
2197
|
+
};
|
2198
|
+
const { advancedVSeed } = context;
|
2199
|
+
const { encoding } = advancedVSeed;
|
2200
|
+
if (!encoding[0].y || !encoding[0].x || !encoding[0].group) return result;
|
2201
|
+
const { color } = advancedVSeed.config.areaRange;
|
2202
|
+
result.type = 'rangeArea';
|
2203
|
+
result.direction = 'vertical';
|
2204
|
+
result.stack = false;
|
2205
|
+
result.xField = encoding[0].x[0];
|
2206
|
+
result.yField = [
|
2207
|
+
encoding[0].y[0],
|
2208
|
+
encoding[0].y[1]
|
2209
|
+
];
|
2210
|
+
result.animation = true;
|
2211
|
+
result.area = {
|
2212
|
+
style: {
|
2213
|
+
fill: color.colorScheme?.[0]
|
2214
|
+
}
|
2215
|
+
};
|
2216
|
+
return result;
|
2217
|
+
};
|
2218
|
+
const initAreaRangeLine1 = (spec, context)=>{
|
2219
|
+
const result = {
|
2220
|
+
...spec
|
2221
|
+
};
|
2222
|
+
const { advancedVSeed } = context;
|
2223
|
+
const { encoding } = advancedVSeed;
|
2224
|
+
if (!encoding[0].y || !encoding[0].x || !encoding[0].group) return result;
|
2225
|
+
const { color } = advancedVSeed.config.areaRange;
|
2226
|
+
result.type = 'line';
|
2227
|
+
result.direction = 'vertical';
|
2228
|
+
result.stack = false;
|
2229
|
+
result.xField = encoding[0].x[0];
|
2230
|
+
result.yField = [
|
2231
|
+
encoding[0].y[0]
|
2232
|
+
];
|
2233
|
+
result.animation = true;
|
2234
|
+
result.line = {
|
2235
|
+
style: {
|
2236
|
+
stroke: color.colorScheme?.[0]
|
2237
|
+
}
|
2238
|
+
};
|
2239
|
+
result.point = {
|
2240
|
+
style: {
|
2241
|
+
visible: false,
|
2242
|
+
fill: color.colorScheme?.[0]
|
2243
|
+
}
|
2244
|
+
};
|
2245
|
+
return result;
|
2246
|
+
};
|
2247
|
+
const initAreaRangeLine2 = (spec, context)=>{
|
2248
|
+
const result = {
|
2249
|
+
...spec
|
2250
|
+
};
|
2251
|
+
const { advancedVSeed } = context;
|
2252
|
+
const { encoding } = advancedVSeed;
|
2253
|
+
if (!encoding[0].y || !encoding[0].x || !encoding[0].group) return result;
|
2254
|
+
const { color } = advancedVSeed.config.areaRange;
|
2255
|
+
result.type = 'line';
|
2256
|
+
result.direction = 'vertical';
|
2257
|
+
result.stack = false;
|
2258
|
+
result.xField = encoding[0].x[0];
|
2259
|
+
result.yField = [
|
2260
|
+
encoding[0].y[1]
|
2261
|
+
];
|
2262
|
+
result.animation = true;
|
2263
|
+
result.line = {
|
2264
|
+
style: {
|
2265
|
+
stroke: color.colorScheme?.[0]
|
2266
|
+
}
|
2267
|
+
};
|
2268
|
+
result.point = {
|
2269
|
+
style: {
|
2270
|
+
visible: false,
|
2271
|
+
fill: color.colorScheme?.[0]
|
2272
|
+
}
|
2273
|
+
};
|
2274
|
+
return result;
|
2275
|
+
};
|
1726
2276
|
const initLine = (spec, context)=>{
|
1727
2277
|
const result = {
|
1728
2278
|
...spec
|
@@ -1914,21 +2464,46 @@ const initRoseParallel = (spec, context)=>{
|
|
1914
2464
|
result.animation = true;
|
1915
2465
|
return result;
|
1916
2466
|
};
|
1917
|
-
const
|
2467
|
+
const initScatter = (spec, context)=>{
|
1918
2468
|
const result = {
|
1919
2469
|
...spec
|
1920
2470
|
};
|
1921
|
-
|
1922
|
-
|
1923
|
-
|
1924
|
-
|
1925
|
-
|
1926
|
-
|
1927
|
-
|
1928
|
-
|
1929
|
-
|
1930
|
-
|
2471
|
+
const { advancedVSeed } = context;
|
2472
|
+
const { encoding } = advancedVSeed;
|
2473
|
+
if (!encoding[0].y || !encoding[0].x || !encoding[0].group) return result;
|
2474
|
+
result.type = 'scatter';
|
2475
|
+
result.direction = 'vertical';
|
2476
|
+
result.xField = encoding[0].x[0];
|
2477
|
+
result.yField = encoding[0].y[0];
|
2478
|
+
result.seriesField = encoding[0].group[0];
|
2479
|
+
result.padding = 0;
|
2480
|
+
result.region = [
|
2481
|
+
{
|
2482
|
+
clip: true
|
2483
|
+
}
|
2484
|
+
];
|
2485
|
+
result.animation = true;
|
2486
|
+
return result;
|
2487
|
+
};
|
2488
|
+
const initRadar = (spec, context)=>{
|
2489
|
+
const result = {
|
2490
|
+
...spec
|
1931
2491
|
};
|
2492
|
+
const { advancedVSeed } = context;
|
2493
|
+
const { encoding } = advancedVSeed;
|
2494
|
+
if (!encoding[0].angle || !encoding[0].radius || !encoding[0].group) return result;
|
2495
|
+
result.type = 'radar';
|
2496
|
+
result.angleField = encoding[0].angle[0];
|
2497
|
+
result.radiusField = encoding[0].radius[0];
|
2498
|
+
result.seriesField = encoding[0].group[0];
|
2499
|
+
result.padding = 0;
|
2500
|
+
result.region = [
|
2501
|
+
{
|
2502
|
+
clip: true
|
2503
|
+
}
|
2504
|
+
];
|
2505
|
+
result.animation = true;
|
2506
|
+
return result;
|
1932
2507
|
};
|
1933
2508
|
const initFunnel = (spec, context)=>{
|
1934
2509
|
const result = {
|
@@ -1966,26 +2541,21 @@ const initFunnel = (spec, context)=>{
|
|
1966
2541
|
result.animation = true;
|
1967
2542
|
return result;
|
1968
2543
|
};
|
1969
|
-
const
|
2544
|
+
const initPivot = (spec)=>{
|
1970
2545
|
const result = {
|
1971
2546
|
...spec
|
1972
2547
|
};
|
1973
|
-
|
1974
|
-
|
1975
|
-
|
1976
|
-
|
1977
|
-
|
1978
|
-
|
1979
|
-
|
1980
|
-
|
1981
|
-
|
1982
|
-
|
1983
|
-
|
1984
|
-
clip: true
|
1985
|
-
}
|
1986
|
-
];
|
1987
|
-
result.animation = true;
|
1988
|
-
return result;
|
2548
|
+
return {
|
2549
|
+
...result,
|
2550
|
+
animation: true,
|
2551
|
+
rows: [],
|
2552
|
+
columns: [],
|
2553
|
+
indicators: [],
|
2554
|
+
records: [],
|
2555
|
+
widthMode: 'adaptive',
|
2556
|
+
heightMode: 'adaptive',
|
2557
|
+
indicatorsAsCol: false
|
2558
|
+
};
|
1989
2559
|
};
|
1990
2560
|
const xBand = (spec, context)=>{
|
1991
2561
|
const result = {
|
@@ -2348,7 +2918,7 @@ const radiusAxis = (spec, context)=>{
|
|
2348
2918
|
};
|
2349
2919
|
const { advancedVSeed } = context;
|
2350
2920
|
const { dimensions, measures } = advancedVSeed;
|
2351
|
-
if (!dimensions || !measures) return
|
2921
|
+
if (!dimensions || !measures) return result;
|
2352
2922
|
const is0D = 0 === dimensions.length;
|
2353
2923
|
const is1M1D = 1 === dimensions.length && 1 === measures.length;
|
2354
2924
|
const showAxis = !(is0D || is1M1D);
|
@@ -2379,7 +2949,7 @@ const angleAxis = (spec, context)=>{
|
|
2379
2949
|
};
|
2380
2950
|
const { advancedVSeed } = context;
|
2381
2951
|
const { dimensions, measures } = advancedVSeed;
|
2382
|
-
if (!dimensions || !measures) return
|
2952
|
+
if (!dimensions || !measures) return result;
|
2383
2953
|
const is0D = 0 === dimensions.length;
|
2384
2954
|
const is1M1D = 1 === dimensions.length && 1 === measures.length;
|
2385
2955
|
const showAxis = !(is0D || is1M1D);
|
@@ -2415,6 +2985,59 @@ const angleAxis = (spec, context)=>{
|
|
2415
2985
|
});
|
2416
2986
|
return result;
|
2417
2987
|
};
|
2988
|
+
const radarAngleAxis = (spec, context)=>{
|
2989
|
+
const result = {
|
2990
|
+
...spec
|
2991
|
+
};
|
2992
|
+
const { advancedVSeed } = context;
|
2993
|
+
const { dimensions, measures } = advancedVSeed;
|
2994
|
+
if (!dimensions || !measures) return result;
|
2995
|
+
if (!result.axes) result.axes = [];
|
2996
|
+
result.axes.push({
|
2997
|
+
orient: 'angle',
|
2998
|
+
visible: true,
|
2999
|
+
zero: true,
|
3000
|
+
nice: true,
|
3001
|
+
grid: {
|
3002
|
+
visible: true
|
3003
|
+
},
|
3004
|
+
domainLine: {
|
3005
|
+
visible: true
|
3006
|
+
},
|
3007
|
+
tick: {
|
3008
|
+
visible: true
|
3009
|
+
}
|
3010
|
+
});
|
3011
|
+
return result;
|
3012
|
+
};
|
3013
|
+
const radarRadiusAxis = (spec, context)=>{
|
3014
|
+
const result = {
|
3015
|
+
...spec
|
3016
|
+
};
|
3017
|
+
const { advancedVSeed } = context;
|
3018
|
+
const { dimensions, measures } = advancedVSeed;
|
3019
|
+
if (!dimensions || !measures) return result;
|
3020
|
+
if (!result.axes) result.axes = [];
|
3021
|
+
result.axes.push({
|
3022
|
+
orient: 'radius',
|
3023
|
+
visible: true,
|
3024
|
+
zero: true,
|
3025
|
+
nice: true,
|
3026
|
+
grid: {
|
3027
|
+
visible: true
|
3028
|
+
},
|
3029
|
+
tick: {
|
3030
|
+
visible: true
|
3031
|
+
},
|
3032
|
+
label: {
|
3033
|
+
visible: true
|
3034
|
+
},
|
3035
|
+
domainLine: {
|
3036
|
+
visible: true
|
3037
|
+
}
|
3038
|
+
});
|
3039
|
+
return result;
|
3040
|
+
};
|
2418
3041
|
const percent = (spec, context)=>{
|
2419
3042
|
const result = {
|
2420
3043
|
...spec
|
@@ -2458,7 +3081,9 @@ const tooltip_tooltip = (spec, context)=>{
|
|
2458
3081
|
const { advancedVSeed } = context;
|
2459
3082
|
const { measures, datasetReshapeInfo, chartType } = advancedVSeed;
|
2460
3083
|
const baseConfig = advancedVSeed.config[chartType];
|
2461
|
-
const { tooltip
|
3084
|
+
const { tooltip = {
|
3085
|
+
enable: true
|
3086
|
+
} } = baseConfig;
|
2462
3087
|
const { enable } = tooltip;
|
2463
3088
|
const { measureId, measureValue } = datasetReshapeInfo[0].foldInfo;
|
2464
3089
|
const { groupName } = datasetReshapeInfo[0].unfoldInfo;
|
@@ -3996,6 +4621,21 @@ const horizontalCrosshairLine = (spec, context)=>{
|
|
3996
4621
|
};
|
3997
4622
|
return result;
|
3998
4623
|
};
|
4624
|
+
const series = (...args)=>{
|
4625
|
+
const result = {
|
4626
|
+
type: 'common',
|
4627
|
+
padding: 0,
|
4628
|
+
region: [
|
4629
|
+
{
|
4630
|
+
clip: true
|
4631
|
+
}
|
4632
|
+
]
|
4633
|
+
};
|
4634
|
+
return (_, context)=>{
|
4635
|
+
result.series = args.map((pipeline)=>execPipeline(pipeline, context, {}));
|
4636
|
+
return result;
|
4637
|
+
};
|
4638
|
+
};
|
3999
4639
|
const line_line = [
|
4000
4640
|
initLine,
|
4001
4641
|
color_color,
|
@@ -4336,11 +4976,65 @@ const pivotBarPercent = [
|
|
4336
4976
|
const barPercentSpecPipeline = [
|
4337
4977
|
pivotAdapter_pivotAdapter(barPercent, pivotBarPercent)
|
4338
4978
|
];
|
4339
|
-
const area_area = [
|
4979
|
+
const area_area = [
|
4980
|
+
initArea,
|
4981
|
+
stackInverse,
|
4982
|
+
color_color,
|
4983
|
+
background_backgroundColor,
|
4984
|
+
dataset_dataset,
|
4985
|
+
xBand,
|
4986
|
+
yLinear,
|
4987
|
+
label_label,
|
4988
|
+
tooltip_tooltip,
|
4989
|
+
verticalCrosshairLine,
|
4990
|
+
discreteLegend,
|
4991
|
+
pointStyle_pointStyle,
|
4992
|
+
pointStateDimensionHover,
|
4993
|
+
lineStyle_lineStyle,
|
4994
|
+
areaStyle_areaStyle,
|
4995
|
+
annotationPoint_annotationPoint,
|
4996
|
+
annotationVerticalLine_annotationVerticalLine,
|
4997
|
+
annotationHorizontalLine_annotationHorizontalLine,
|
4998
|
+
annotationArea_annotationArea
|
4999
|
+
];
|
5000
|
+
const pivotArea = [
|
5001
|
+
initPivot,
|
5002
|
+
pivotGridStyle,
|
5003
|
+
pivotIndicators_pivotIndicatorsAsRow,
|
5004
|
+
datasetPivot,
|
5005
|
+
pivotIndicators([
|
5006
|
+
initArea,
|
5007
|
+
color_color,
|
5008
|
+
background_backgroundColor,
|
5009
|
+
stackInverse,
|
5010
|
+
dataset_dataset,
|
5011
|
+
xBand,
|
5012
|
+
yLinear,
|
5013
|
+
label_label,
|
5014
|
+
tooltip_tooltip,
|
5015
|
+
verticalCrosshairLine,
|
5016
|
+
pointStyle_pointStyle,
|
5017
|
+
pointStateDimensionHover,
|
5018
|
+
lineStyle_lineStyle,
|
5019
|
+
areaStyle_areaStyle,
|
5020
|
+
annotationPoint_annotationPoint,
|
5021
|
+
annotationVerticalLine_annotationVerticalLine,
|
5022
|
+
annotationHorizontalLine_annotationHorizontalLine,
|
5023
|
+
annotationArea_annotationArea
|
5024
|
+
]),
|
5025
|
+
pivotRowDimensions,
|
5026
|
+
pivotColumnDimensions,
|
5027
|
+
pivotDiscreteLegend
|
5028
|
+
];
|
5029
|
+
const areaSpecPipeline = [
|
5030
|
+
pivotAdapter_pivotAdapter(area_area, pivotArea)
|
5031
|
+
];
|
5032
|
+
const areaPercent = [
|
4340
5033
|
initArea,
|
4341
5034
|
stackInverse,
|
4342
5035
|
color_color,
|
4343
5036
|
background_backgroundColor,
|
5037
|
+
percent,
|
4344
5038
|
dataset_dataset,
|
4345
5039
|
xBand,
|
4346
5040
|
yLinear,
|
@@ -4349,7 +5043,6 @@ const area_area = [
|
|
4349
5043
|
verticalCrosshairLine,
|
4350
5044
|
discreteLegend,
|
4351
5045
|
pointStyle_pointStyle,
|
4352
|
-
pointStateDimensionHover,
|
4353
5046
|
lineStyle_lineStyle,
|
4354
5047
|
areaStyle_areaStyle,
|
4355
5048
|
annotationPoint_annotationPoint,
|
@@ -4357,16 +5050,17 @@ const area_area = [
|
|
4357
5050
|
annotationHorizontalLine_annotationHorizontalLine,
|
4358
5051
|
annotationArea_annotationArea
|
4359
5052
|
];
|
4360
|
-
const
|
5053
|
+
const pivotAreaPercent = [
|
4361
5054
|
initPivot,
|
4362
5055
|
pivotGridStyle,
|
4363
5056
|
pivotIndicators_pivotIndicatorsAsRow,
|
4364
5057
|
datasetPivot,
|
4365
5058
|
pivotIndicators([
|
4366
5059
|
initArea,
|
5060
|
+
stackInverse,
|
4367
5061
|
color_color,
|
4368
5062
|
background_backgroundColor,
|
4369
|
-
|
5063
|
+
percent,
|
4370
5064
|
dataset_dataset,
|
4371
5065
|
xBand,
|
4372
5066
|
yLinear,
|
@@ -4374,7 +5068,6 @@ const pivotArea = [
|
|
4374
5068
|
tooltip_tooltip,
|
4375
5069
|
verticalCrosshairLine,
|
4376
5070
|
pointStyle_pointStyle,
|
4377
|
-
pointStateDimensionHover,
|
4378
5071
|
lineStyle_lineStyle,
|
4379
5072
|
areaStyle_areaStyle,
|
4380
5073
|
annotationPoint_annotationPoint,
|
@@ -4386,50 +5079,109 @@ const pivotArea = [
|
|
4386
5079
|
pivotColumnDimensions,
|
4387
5080
|
pivotDiscreteLegend
|
4388
5081
|
];
|
4389
|
-
const
|
4390
|
-
pivotAdapter_pivotAdapter(
|
5082
|
+
const areaPercentSpecPipeline = [
|
5083
|
+
pivotAdapter_pivotAdapter(areaPercent, pivotAreaPercent)
|
4391
5084
|
];
|
4392
|
-
const
|
4393
|
-
|
4394
|
-
|
5085
|
+
const areaRange = [
|
5086
|
+
series([
|
5087
|
+
initAreaRange,
|
5088
|
+
areaStyle_areaStyle
|
5089
|
+
], [
|
5090
|
+
initAreaRangeLine1,
|
5091
|
+
lineStyle_lineStyle,
|
5092
|
+
pointStyle_pointStyle,
|
5093
|
+
pointStateDimensionHover
|
5094
|
+
], [
|
5095
|
+
initAreaRangeLine2,
|
5096
|
+
lineStyle_lineStyle,
|
5097
|
+
pointStyle_pointStyle,
|
5098
|
+
pointStateDimensionHover
|
5099
|
+
]),
|
5100
|
+
dataset_dataset,
|
5101
|
+
background_backgroundColor,
|
5102
|
+
xBand,
|
5103
|
+
yLinear,
|
5104
|
+
label_label,
|
5105
|
+
verticalCrosshairLine,
|
5106
|
+
annotationPoint_annotationPoint,
|
5107
|
+
annotationVerticalLine_annotationVerticalLine,
|
5108
|
+
annotationHorizontalLine_annotationHorizontalLine,
|
5109
|
+
annotationArea_annotationArea
|
5110
|
+
];
|
5111
|
+
const pivotAreaRange = [
|
5112
|
+
initPivot,
|
5113
|
+
pivotGridStyle,
|
5114
|
+
pivotIndicators_pivotIndicatorsAsRow,
|
5115
|
+
datasetPivot,
|
5116
|
+
pivotIndicators([
|
5117
|
+
series([
|
5118
|
+
initAreaRange,
|
5119
|
+
areaStyle_areaStyle
|
5120
|
+
], [
|
5121
|
+
initAreaRangeLine1,
|
5122
|
+
lineStyle_lineStyle,
|
5123
|
+
pointStyle_pointStyle,
|
5124
|
+
pointStateDimensionHover
|
5125
|
+
], [
|
5126
|
+
initAreaRangeLine2,
|
5127
|
+
lineStyle_lineStyle,
|
5128
|
+
pointStyle_pointStyle,
|
5129
|
+
pointStateDimensionHover
|
5130
|
+
]),
|
5131
|
+
background_backgroundColor,
|
5132
|
+
dataset_dataset,
|
5133
|
+
xBand,
|
5134
|
+
yLinear,
|
5135
|
+
label_label,
|
5136
|
+
verticalCrosshairLine,
|
5137
|
+
annotationPoint_annotationPoint,
|
5138
|
+
annotationVerticalLine_annotationVerticalLine,
|
5139
|
+
annotationHorizontalLine_annotationHorizontalLine,
|
5140
|
+
annotationArea_annotationArea
|
5141
|
+
]),
|
5142
|
+
pivotRowDimensions,
|
5143
|
+
pivotColumnDimensions
|
5144
|
+
];
|
5145
|
+
const areaRangeSpecPipeline = [
|
5146
|
+
pivotAdapter_pivotAdapter(areaRange, pivotAreaRange)
|
5147
|
+
];
|
5148
|
+
const scatter = [
|
5149
|
+
initScatter,
|
4395
5150
|
color_color,
|
4396
5151
|
background_backgroundColor,
|
4397
|
-
percent,
|
4398
5152
|
dataset_dataset,
|
4399
|
-
|
5153
|
+
xLinear,
|
4400
5154
|
yLinear,
|
4401
5155
|
label_label,
|
4402
5156
|
tooltip_tooltip,
|
4403
5157
|
verticalCrosshairLine,
|
5158
|
+
horizontalCrosshairLine,
|
4404
5159
|
discreteLegend,
|
4405
5160
|
pointStyle_pointStyle,
|
4406
|
-
|
4407
|
-
areaStyle_areaStyle,
|
5161
|
+
pointStateHover,
|
4408
5162
|
annotationPoint_annotationPoint,
|
4409
5163
|
annotationVerticalLine_annotationVerticalLine,
|
4410
5164
|
annotationHorizontalLine_annotationHorizontalLine,
|
4411
5165
|
annotationArea_annotationArea
|
4412
5166
|
];
|
4413
|
-
const
|
5167
|
+
const pivotScatter = [
|
4414
5168
|
initPivot,
|
4415
5169
|
pivotGridStyle,
|
4416
5170
|
pivotIndicators_pivotIndicatorsAsRow,
|
4417
5171
|
datasetPivot,
|
4418
5172
|
pivotIndicators([
|
4419
|
-
|
4420
|
-
stackInverse,
|
5173
|
+
initScatter,
|
4421
5174
|
color_color,
|
4422
5175
|
background_backgroundColor,
|
4423
|
-
percent,
|
4424
5176
|
dataset_dataset,
|
4425
|
-
|
5177
|
+
xLinear,
|
4426
5178
|
yLinear,
|
4427
5179
|
label_label,
|
4428
5180
|
tooltip_tooltip,
|
4429
5181
|
verticalCrosshairLine,
|
5182
|
+
horizontalCrosshairLine,
|
4430
5183
|
pointStyle_pointStyle,
|
4431
|
-
|
4432
|
-
areaStyle_areaStyle,
|
5184
|
+
pointStateHover,
|
4433
5185
|
annotationPoint_annotationPoint,
|
4434
5186
|
annotationVerticalLine_annotationVerticalLine,
|
4435
5187
|
annotationHorizontalLine_annotationHorizontalLine,
|
@@ -4439,8 +5191,8 @@ const pivotAreaPercent = [
|
|
4439
5191
|
pivotColumnDimensions,
|
4440
5192
|
pivotDiscreteLegend
|
4441
5193
|
];
|
4442
|
-
const
|
4443
|
-
pivotAdapter_pivotAdapter(
|
5194
|
+
const scatterSpecPipeline = [
|
5195
|
+
pivotAdapter_pivotAdapter(scatter, pivotScatter)
|
4444
5196
|
];
|
4445
5197
|
const pie = [
|
4446
5198
|
initPie,
|
@@ -4600,6 +5352,49 @@ const pivotRoseParallel = [
|
|
4600
5352
|
const roseParallelSpecPipeline = [
|
4601
5353
|
pivotAdapter_pivotAdapter(roseParallel, pivotRoseParallel)
|
4602
5354
|
];
|
5355
|
+
const radar = [
|
5356
|
+
initRadar,
|
5357
|
+
color_color,
|
5358
|
+
background_backgroundColor,
|
5359
|
+
dataset_dataset,
|
5360
|
+
radarAngleAxis,
|
5361
|
+
radarRadiusAxis,
|
5362
|
+
label_label,
|
5363
|
+
tooltip_tooltip,
|
5364
|
+
verticalCrosshairLine,
|
5365
|
+
discreteLegend,
|
5366
|
+
pointStyle_pointStyle,
|
5367
|
+
pointStateDimensionHover,
|
5368
|
+
lineStyle_lineStyle,
|
5369
|
+
areaStyle_areaStyle
|
5370
|
+
];
|
5371
|
+
const pivotRadar = [
|
5372
|
+
initPivot,
|
5373
|
+
pivotGridStyle,
|
5374
|
+
pivotIndicators_pivotIndicatorsAsRow,
|
5375
|
+
datasetPivot,
|
5376
|
+
pivotIndicators([
|
5377
|
+
initRadar,
|
5378
|
+
color_color,
|
5379
|
+
background_backgroundColor,
|
5380
|
+
dataset_dataset,
|
5381
|
+
radarAngleAxis,
|
5382
|
+
radarRadiusAxis,
|
5383
|
+
label_label,
|
5384
|
+
tooltip_tooltip,
|
5385
|
+
verticalCrosshairLine,
|
5386
|
+
pointStyle_pointStyle,
|
5387
|
+
pointStateDimensionHover,
|
5388
|
+
lineStyle_lineStyle,
|
5389
|
+
areaStyle_areaStyle
|
5390
|
+
]),
|
5391
|
+
pivotRowDimensions,
|
5392
|
+
pivotColumnDimensions,
|
5393
|
+
pivotDiscreteLegend
|
5394
|
+
];
|
5395
|
+
const radarSpecPipeline = [
|
5396
|
+
pivotAdapter_pivotAdapter(radar, pivotRadar)
|
5397
|
+
];
|
4603
5398
|
const funnel = [
|
4604
5399
|
initFunnel,
|
4605
5400
|
color_color,
|
@@ -4637,43 +5432,43 @@ const pivotFunnel = [
|
|
4637
5432
|
const funnelSpecPipeline = [
|
4638
5433
|
pivotAdapter_pivotAdapter(funnel, pivotFunnel)
|
4639
5434
|
];
|
4640
|
-
const
|
4641
|
-
|
5435
|
+
const heatmap = [
|
5436
|
+
initLine,
|
4642
5437
|
color_color,
|
4643
5438
|
background_backgroundColor,
|
4644
5439
|
dataset_dataset,
|
4645
|
-
|
5440
|
+
xBand,
|
4646
5441
|
yLinear,
|
4647
5442
|
label_label,
|
4648
5443
|
tooltip_tooltip,
|
4649
5444
|
verticalCrosshairLine,
|
4650
|
-
horizontalCrosshairLine,
|
4651
5445
|
discreteLegend,
|
4652
5446
|
pointStyle_pointStyle,
|
4653
|
-
|
5447
|
+
pointStateDimensionHover,
|
5448
|
+
lineStyle_lineStyle,
|
4654
5449
|
annotationPoint_annotationPoint,
|
4655
5450
|
annotationVerticalLine_annotationVerticalLine,
|
4656
5451
|
annotationHorizontalLine_annotationHorizontalLine,
|
4657
5452
|
annotationArea_annotationArea
|
4658
5453
|
];
|
4659
|
-
const
|
5454
|
+
const pivotHeatmap = [
|
4660
5455
|
initPivot,
|
4661
5456
|
pivotGridStyle,
|
4662
5457
|
pivotIndicators_pivotIndicatorsAsRow,
|
4663
5458
|
datasetPivot,
|
4664
5459
|
pivotIndicators([
|
4665
|
-
|
5460
|
+
initLine,
|
4666
5461
|
color_color,
|
4667
5462
|
background_backgroundColor,
|
4668
5463
|
dataset_dataset,
|
4669
|
-
|
5464
|
+
xBand,
|
4670
5465
|
yLinear,
|
4671
5466
|
label_label,
|
4672
5467
|
tooltip_tooltip,
|
4673
5468
|
verticalCrosshairLine,
|
4674
|
-
horizontalCrosshairLine,
|
4675
5469
|
pointStyle_pointStyle,
|
4676
|
-
|
5470
|
+
pointStateDimensionHover,
|
5471
|
+
lineStyle_lineStyle,
|
4677
5472
|
annotationPoint_annotationPoint,
|
4678
5473
|
annotationVerticalLine_annotationVerticalLine,
|
4679
5474
|
annotationHorizontalLine_annotationHorizontalLine,
|
@@ -4683,8 +5478,8 @@ const pivotScatter = [
|
|
4683
5478
|
pivotColumnDimensions,
|
4684
5479
|
pivotDiscreteLegend
|
4685
5480
|
];
|
4686
|
-
const
|
4687
|
-
pivotAdapter_pivotAdapter(
|
5481
|
+
const heatmapSpecPipeline = [
|
5482
|
+
pivotAdapter_pivotAdapter(heatmap, pivotHeatmap)
|
4688
5483
|
];
|
4689
5484
|
const initTable = (spec, context)=>{
|
4690
5485
|
const { advancedVSeed } = context;
|
@@ -5180,8 +5975,18 @@ class Builder {
|
|
5180
5975
|
build = ()=>build(this);
|
5181
5976
|
buildSpec = (advanced)=>buildSpec(this, advanced);
|
5182
5977
|
buildAdvanced = ()=>buildAdvanced(this);
|
5183
|
-
getAdvancedPipeline = (chartType)=>
|
5184
|
-
|
5978
|
+
getAdvancedPipeline = (chartType)=>{
|
5979
|
+
const customPipe = Builder._customAdvancedPipe[chartType];
|
5980
|
+
const pipeline = Builder._advancedPipelineMap[chartType];
|
5981
|
+
if (customPipe) pipeline.push(customPipe);
|
5982
|
+
return pipeline;
|
5983
|
+
};
|
5984
|
+
getSpecPipeline = (chartType)=>{
|
5985
|
+
const customPipe = Builder._customSpecPipe[chartType];
|
5986
|
+
const pipeline = Builder._specPipelineMap[chartType];
|
5987
|
+
if (customPipe) pipeline.push(customPipe);
|
5988
|
+
return pipeline;
|
5989
|
+
};
|
5185
5990
|
getTheme = (themeKey)=>Builder._themeMap[themeKey];
|
5186
5991
|
getThemeMap = ()=>Builder._themeMap;
|
5187
5992
|
getColorItems = ()=>getColorItems(this);
|
@@ -5206,6 +6011,8 @@ class Builder {
|
|
5206
6011
|
}
|
5207
6012
|
static _advancedPipelineMap = {};
|
5208
6013
|
static _specPipelineMap = {};
|
6014
|
+
static _customAdvancedPipe = {};
|
6015
|
+
static _customSpecPipe = {};
|
5209
6016
|
static _themeMap = {};
|
5210
6017
|
static from = (vseed)=>new Builder(vseed);
|
5211
6018
|
}
|
@@ -5229,6 +6036,10 @@ const registerAreaPercent = ()=>{
|
|
5229
6036
|
Builder._advancedPipelineMap.areaPercent = areaPercentAdvancedPipeline;
|
5230
6037
|
Builder._specPipelineMap.areaPercent = areaPercentSpecPipeline;
|
5231
6038
|
};
|
6039
|
+
const registerAreaRange = ()=>{
|
6040
|
+
Builder._advancedPipelineMap.areaRange = areaRangeAdvancedPipeline;
|
6041
|
+
Builder._specPipelineMap.areaRange = areaRangeSpecPipeline;
|
6042
|
+
};
|
5232
6043
|
const registerBarPercent = ()=>{
|
5233
6044
|
Builder._advancedPipelineMap.barPercent = barPercentAdvancedPipeline;
|
5234
6045
|
Builder._specPipelineMap.barPercent = barPercentSpecPipeline;
|
@@ -5277,6 +6088,14 @@ const registerPivotTable = ()=>{
|
|
5277
6088
|
Builder._advancedPipelineMap.pivotTable = pivotTableAdvancedPipeline;
|
5278
6089
|
Builder._specPipelineMap.pivotTable = pivotTableSpecPipeline;
|
5279
6090
|
};
|
6091
|
+
const registerHeatmap = ()=>{
|
6092
|
+
Builder._advancedPipelineMap.heatmap = heatmapAdvancedPipeline;
|
6093
|
+
Builder._specPipelineMap.heatmap = heatmapSpecPipeline;
|
6094
|
+
};
|
6095
|
+
const registerRadar = ()=>{
|
6096
|
+
Builder._advancedPipelineMap.radar = radarAdvancedPipeline;
|
6097
|
+
Builder._specPipelineMap.radar = radarSpecPipeline;
|
6098
|
+
};
|
5280
6099
|
const darkTheme = ()=>{
|
5281
6100
|
const linearAxis = {
|
5282
6101
|
nice: true,
|
@@ -5520,6 +6339,12 @@ const darkTheme = ()=>{
|
|
5520
6339
|
yAxis: linearAxis,
|
5521
6340
|
crosshairLine: crosshairLine
|
5522
6341
|
},
|
6342
|
+
areaRange: {
|
6343
|
+
...baseConfig,
|
6344
|
+
xAxis: bandAxis,
|
6345
|
+
yAxis: linearAxis,
|
6346
|
+
crosshairLine: crosshairLine
|
6347
|
+
},
|
5523
6348
|
scatter: {
|
5524
6349
|
...baseConfig,
|
5525
6350
|
xAxis: {
|
@@ -5544,6 +6369,9 @@ const darkTheme = ()=>{
|
|
5544
6369
|
donut: {
|
5545
6370
|
...baseConfig
|
5546
6371
|
},
|
6372
|
+
radar: {
|
6373
|
+
...baseConfig
|
6374
|
+
},
|
5547
6375
|
rose: {
|
5548
6376
|
...baseConfig
|
5549
6377
|
},
|
@@ -5814,6 +6642,12 @@ const lightTheme = ()=>{
|
|
5814
6642
|
yAxis: linearAxis,
|
5815
6643
|
crosshairLine
|
5816
6644
|
},
|
6645
|
+
areaRange: {
|
6646
|
+
...baseConfig,
|
6647
|
+
xAxis: bandAxis,
|
6648
|
+
yAxis: linearAxis,
|
6649
|
+
crosshairLine
|
6650
|
+
},
|
5817
6651
|
scatter: {
|
5818
6652
|
...baseConfig,
|
5819
6653
|
xAxis: {
|
@@ -5838,6 +6672,9 @@ const lightTheme = ()=>{
|
|
5838
6672
|
donut: {
|
5839
6673
|
...baseConfig
|
5840
6674
|
},
|
6675
|
+
radar: {
|
6676
|
+
...baseConfig
|
6677
|
+
},
|
5841
6678
|
rose: {
|
5842
6679
|
...baseConfig
|
5843
6680
|
},
|
@@ -5878,6 +6715,8 @@ const registerDarkTheme = ()=>{
|
|
5878
6715
|
registerCustomTheme('dark', darkTheme());
|
5879
6716
|
};
|
5880
6717
|
const registerAll = ()=>{
|
6718
|
+
registerTable();
|
6719
|
+
registerPivotTable();
|
5881
6720
|
registerLine();
|
5882
6721
|
registerColumn();
|
5883
6722
|
registerColumnParallel();
|
@@ -5887,17 +6726,24 @@ const registerAll = ()=>{
|
|
5887
6726
|
registerBarPercent();
|
5888
6727
|
registerArea();
|
5889
6728
|
registerAreaPercent();
|
6729
|
+
registerAreaRange();
|
6730
|
+
registerScatter();
|
5890
6731
|
registerPie();
|
5891
6732
|
registerDonut();
|
5892
6733
|
registerRose();
|
5893
6734
|
registerRoseParallel();
|
6735
|
+
registerRadar();
|
5894
6736
|
registerFunnel();
|
5895
|
-
|
5896
|
-
registerTable();
|
5897
|
-
registerPivotTable();
|
6737
|
+
registerHeatmap();
|
5898
6738
|
registerLightTheme();
|
5899
6739
|
registerDarkTheme();
|
5900
6740
|
};
|
6741
|
+
const updateAdvanced = (chartType, advancedPipe)=>{
|
6742
|
+
Builder._customAdvancedPipe[chartType] = advancedPipe;
|
6743
|
+
};
|
6744
|
+
const updateSpec = (chartType, specPipe)=>{
|
6745
|
+
Builder._customSpecPipe[chartType] = specPipe;
|
6746
|
+
};
|
5901
6747
|
const zChartType = z["enum"]([
|
5902
6748
|
'table',
|
5903
6749
|
'pivotTable',
|
@@ -5910,13 +6756,16 @@ const zChartType = z["enum"]([
|
|
5910
6756
|
'barParallel',
|
5911
6757
|
'area',
|
5912
6758
|
'areaPercent',
|
6759
|
+
'areaRange',
|
6760
|
+
'scatter',
|
6761
|
+
'dualAxis',
|
5913
6762
|
'rose',
|
5914
6763
|
'roseParallel',
|
5915
6764
|
'pie',
|
5916
6765
|
'donut',
|
5917
|
-
'
|
5918
|
-
'
|
5919
|
-
'
|
6766
|
+
'radar',
|
6767
|
+
'funnel',
|
6768
|
+
'heatmap'
|
5920
6769
|
]);
|
5921
6770
|
const zDatum = z.record(z.string().or(z.number()), z.any());
|
5922
6771
|
const zDataset = z.array(zDatum);
|
@@ -6240,22 +7089,7 @@ const zAreaConfig = z.object({
|
|
6240
7089
|
crosshairLine: zCrosshairLine.optional()
|
6241
7090
|
});
|
6242
7091
|
const zAreaPercentConfig = zAreaConfig;
|
6243
|
-
const
|
6244
|
-
backgroundColor: zBackgroundColor.optional(),
|
6245
|
-
label: zLabel.optional(),
|
6246
|
-
color: zColor.optional(),
|
6247
|
-
tooltip: zTooltip.optional(),
|
6248
|
-
legend: zLegend.optional()
|
6249
|
-
});
|
6250
|
-
const zRoseParallelConfig = zRoseConfig;
|
6251
|
-
const zPieConfig = z.object({
|
6252
|
-
backgroundColor: zBackgroundColor.optional(),
|
6253
|
-
label: zLabel.optional(),
|
6254
|
-
color: zColor.optional(),
|
6255
|
-
tooltip: zTooltip.optional(),
|
6256
|
-
legend: zLegend.optional()
|
6257
|
-
});
|
6258
|
-
const zDonutConfig = zPieConfig;
|
7092
|
+
const zAreaRangeConfig = zAreaConfig;
|
6259
7093
|
const zDualAxisConfig = z.object({
|
6260
7094
|
backgroundColor: zBackgroundColor.optional(),
|
6261
7095
|
label: zLabel.optional(),
|
@@ -6273,13 +7107,25 @@ const zScatterConfig = z.object({
|
|
6273
7107
|
yAxis: zYLinearAxis.optional(),
|
6274
7108
|
crosshairLine: zCrosshairLine.optional()
|
6275
7109
|
});
|
6276
|
-
const
|
7110
|
+
const zRoseConfig = z.object({
|
6277
7111
|
backgroundColor: zBackgroundColor.optional(),
|
7112
|
+
label: zLabel.optional(),
|
6278
7113
|
color: zColor.optional(),
|
6279
7114
|
tooltip: zTooltip.optional(),
|
7115
|
+
legend: zLegend.optional()
|
7116
|
+
});
|
7117
|
+
const zRoseParallelConfig = zRoseConfig;
|
7118
|
+
const zPieConfig = z.object({
|
7119
|
+
backgroundColor: zBackgroundColor.optional(),
|
6280
7120
|
label: zLabel.optional(),
|
7121
|
+
color: zColor.optional(),
|
7122
|
+
tooltip: zTooltip.optional(),
|
6281
7123
|
legend: zLegend.optional()
|
6282
7124
|
});
|
7125
|
+
const zDonutConfig = zPieConfig;
|
7126
|
+
const zRadarConfig = zPieConfig;
|
7127
|
+
const zFunnelConfig = zPieConfig;
|
7128
|
+
const zHeatmapConfig = zPieConfig;
|
6283
7129
|
const zConfig = z.object({
|
6284
7130
|
table: zTableConfig.optional(),
|
6285
7131
|
pivotTable: zPivotTableConfig.optional(),
|
@@ -6292,13 +7138,16 @@ const zConfig = z.object({
|
|
6292
7138
|
barPercent: zBarPercentConfig.optional(),
|
6293
7139
|
area: zAreaConfig.optional(),
|
6294
7140
|
areaPercent: zAreaPercentConfig.optional(),
|
7141
|
+
areaRange: zAreaRangeConfig.optional(),
|
7142
|
+
dualAxis: zDualAxisConfig.optional(),
|
7143
|
+
scatter: zScatterConfig.optional(),
|
6295
7144
|
rose: zRoseConfig.optional(),
|
6296
7145
|
roseParallel: zRoseParallelConfig.optional(),
|
6297
7146
|
pie: zPieConfig.optional(),
|
6298
7147
|
donut: zDonutConfig.optional(),
|
6299
|
-
|
6300
|
-
|
6301
|
-
|
7148
|
+
radar: zRadarConfig.optional(),
|
7149
|
+
funnel: zFunnelConfig.optional(),
|
7150
|
+
heatmap: zHeatmapConfig.optional()
|
6302
7151
|
});
|
6303
7152
|
const zAxis = z.object({
|
6304
7153
|
visible: z.boolean().default(true).optional(),
|
@@ -6897,6 +7746,47 @@ const zAreaPercent = z.object({
|
|
6897
7746
|
annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).optional(),
|
6898
7747
|
locale: zLocale.optional()
|
6899
7748
|
});
|
7749
|
+
const zAreaRange = z.object({
|
7750
|
+
chartType: z.literal('areaRange'),
|
7751
|
+
dataset: zDataset.optional(),
|
7752
|
+
dimensions: zDimensions.optional(),
|
7753
|
+
measures: zMeasureTree.optional(),
|
7754
|
+
backgroundColor: zBackgroundColor.optional(),
|
7755
|
+
label: zLabel.optional(),
|
7756
|
+
xAxis: zXBandAxis.optional(),
|
7757
|
+
yAxis: zYLinearAxis.optional(),
|
7758
|
+
crosshairLine: zCrosshairLine.optional(),
|
7759
|
+
theme: zTheme.optional(),
|
7760
|
+
pointStyle: zPointStyle.optional(),
|
7761
|
+
lineStyle: zLineStyle.optional(),
|
7762
|
+
areaStyle: zAreaStyle.optional(),
|
7763
|
+
annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).optional(),
|
7764
|
+
annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).optional(),
|
7765
|
+
annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).optional(),
|
7766
|
+
annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).optional(),
|
7767
|
+
locale: zLocale.optional()
|
7768
|
+
});
|
7769
|
+
const zScatter = z.object({
|
7770
|
+
chartType: z.literal('scatter'),
|
7771
|
+
dataset: zDataset.optional(),
|
7772
|
+
dimensions: zDimensions.optional(),
|
7773
|
+
measures: zMeasureTree.optional(),
|
7774
|
+
backgroundColor: zBackgroundColor.optional(),
|
7775
|
+
color: zColor.optional(),
|
7776
|
+
label: zLabel.optional(),
|
7777
|
+
legend: zLegend.optional(),
|
7778
|
+
tooltip: zTooltip.optional(),
|
7779
|
+
xAxis: zXLinearAxis.optional(),
|
7780
|
+
yAxis: zYLinearAxis.optional(),
|
7781
|
+
crosshairLine: zCrosshairLine.optional(),
|
7782
|
+
theme: zTheme.optional(),
|
7783
|
+
pointStyle: zPointStyle.optional(),
|
7784
|
+
annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).optional(),
|
7785
|
+
annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).optional(),
|
7786
|
+
annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).optional(),
|
7787
|
+
annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).optional(),
|
7788
|
+
locale: zLocale.optional()
|
7789
|
+
});
|
6900
7790
|
const zRose = z.object({
|
6901
7791
|
chartType: z.literal('rose'),
|
6902
7792
|
dataset: zDataset.optional(),
|
@@ -6949,8 +7839,8 @@ const zDonut = z.object({
|
|
6949
7839
|
theme: zTheme.optional(),
|
6950
7840
|
locale: zLocale.optional()
|
6951
7841
|
});
|
6952
|
-
const
|
6953
|
-
chartType: z.literal('
|
7842
|
+
const zRadar = z.object({
|
7843
|
+
chartType: z.literal('radar'),
|
6954
7844
|
dataset: zDataset.optional(),
|
6955
7845
|
dimensions: zDimensions.optional(),
|
6956
7846
|
measures: zMeasureTree.optional(),
|
@@ -6959,15 +7849,7 @@ const zScatter = z.object({
|
|
6959
7849
|
label: zLabel.optional(),
|
6960
7850
|
legend: zLegend.optional(),
|
6961
7851
|
tooltip: zTooltip.optional(),
|
6962
|
-
xAxis: zXLinearAxis.optional(),
|
6963
|
-
yAxis: zYLinearAxis.optional(),
|
6964
|
-
crosshairLine: zCrosshairLine.optional(),
|
6965
7852
|
theme: zTheme.optional(),
|
6966
|
-
pointStyle: zPointStyle.optional(),
|
6967
|
-
annotationPoint: z.array(zAnnotationPoint).or(zAnnotationPoint).optional(),
|
6968
|
-
annotationVerticalLine: z.array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).optional(),
|
6969
|
-
annotationHorizontalLine: z.array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).optional(),
|
6970
|
-
annotationArea: z.array(zAnnotationArea).or(zAnnotationArea).optional(),
|
6971
7853
|
locale: zLocale.optional()
|
6972
7854
|
});
|
6973
7855
|
const zFunnel = z.object({
|
@@ -6983,6 +7865,19 @@ const zFunnel = z.object({
|
|
6983
7865
|
theme: zTheme.optional(),
|
6984
7866
|
locale: zLocale.optional()
|
6985
7867
|
});
|
7868
|
+
const zHeatmap = z.object({
|
7869
|
+
chartType: z.literal('heatmap'),
|
7870
|
+
dataset: zDataset.optional(),
|
7871
|
+
dimensions: zDimensions.optional(),
|
7872
|
+
measures: zMeasureTree.optional(),
|
7873
|
+
backgroundColor: zBackgroundColor.optional(),
|
7874
|
+
color: zColor.optional(),
|
7875
|
+
label: zLabel.optional(),
|
7876
|
+
legend: zLegend.optional(),
|
7877
|
+
tooltip: zTooltip.optional(),
|
7878
|
+
theme: zTheme.optional(),
|
7879
|
+
locale: zLocale.optional()
|
7880
|
+
});
|
6986
7881
|
const zVSeed = z.discriminatedUnion('chartType', [
|
6987
7882
|
zTable,
|
6988
7883
|
zPivotTable,
|
@@ -6995,12 +7890,15 @@ const zVSeed = z.discriminatedUnion('chartType', [
|
|
6995
7890
|
zBarPercent,
|
6996
7891
|
zArea,
|
6997
7892
|
zAreaPercent,
|
7893
|
+
zAreaRange,
|
7894
|
+
zScatter,
|
6998
7895
|
zPie,
|
7896
|
+
zDonut,
|
6999
7897
|
zRose,
|
7000
7898
|
zRoseParallel,
|
7001
|
-
|
7002
|
-
|
7003
|
-
|
7899
|
+
zRadar,
|
7900
|
+
zFunnel,
|
7901
|
+
zHeatmap
|
7004
7902
|
]);
|
7005
7903
|
const zAdvancedVSeed = z.object({
|
7006
7904
|
chartType: zChartType,
|
@@ -7017,6 +7915,6 @@ const zAdvancedVSeed = z.object({
|
|
7017
7915
|
annotation: zAnnotation,
|
7018
7916
|
locale: zLocale
|
7019
7917
|
});
|
7020
|
-
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, findAllDimensions, findAllMeasures, findDimensionById, findFirstDimension, findFirstMeasure, findMeasureById, foldMeasures, funnelAdvancedPipeline, funnelSpecPipeline, i18n, intl, isPivotChart, isPivotTable, isTable, isVChart, isVTable, lightTheme, lineAdvancedPipeline, lineSpecPipeline, pieAdvancedPipeline, pieSpecPipeline, pivotTableAdvancedPipeline, pivotTableSpecPipeline, preorderTraverse, registerAll, registerArea, registerAreaPercent, registerBar, registerBarParallel, registerBarPercent, registerColumn, registerColumnParallel, registerColumnPercent, registerCustomTheme, registerDarkTheme, registerDonut, registerFunnel, registerLightTheme, registerLine, registerPie, registerPivotTable, registerRose, registerRoseParallel, registerScatter, registerTable, roseAdvancedPipeline, roseParallelAdvancedPipeline, roseParallelSpecPipeline, roseSpecPipeline, scatterAdvancedPipeline, scatterSpecPipeline, tableAdvancedPipeline, tableSpecPipeline, unfoldDimensions, zAdvancedVSeed, zAnalysis, zAnnotation, zAnnotationArea, zAnnotationHorizontalLine, zAnnotationPoint, zAnnotationVerticalLine, zArea, zAreaConfig, zAreaPercent, zAreaPercentConfig, zAreaStyle, zAxis, zBackgroundColor, zBar, zBarConfig, zBarParallel, zBarParallelConfig, zBarPercent, zBarPercentConfig, zBarStyle, zChartType, zColor, zColumn, zColumnConfig, zColumnParallel, zColumnParallelConfig, zColumnPercent, zColumnPercentConfig, zConfig, zCrosshairLine, zCrosshairRect, zCustomTheme, zCustomThemeConfig, zDataset, zDatasetReshapeInfo, zDatum, zDimension, zDimensionGroup, zDimensionTree, zDimensions, zDonut, zDonutConfig, zDualAxisConfig, zEncoding, zFoldInfo, zFunnel, zFunnelConfig, zLabel, zLegend, zLine, zLineConfig, zLineStyle, zLocale, zMarkStyle, zMeasure, zMeasureGroup, zMeasureTree, zMeasures, zNumFormat, zPie, zPieConfig, zPivotTable, zPivotTableConfig, zPointStyle, zRose, zRoseConfig, zRoseParallel, zRoseParallelConfig, zScatter, zScatterConfig, zSortAxis, zSortLegend, zStackCornerRadius, zTable, zTableConfig, zTheme, zTooltip, zUnfoldInfo, zVSeed, zXBandAxis, zXLinearAxis, zYBandAxis, zYLinearAxis };
|
7918
|
+
export { Builder, FoldMeasureId, FoldMeasureName, FoldMeasureValue, ORIGINAL_DATA, Separator, UnfoldDimensionGroup, UnfoldDimensionGroupId, areaAdvancedPipeline, areaPercentAdvancedPipeline, areaPercentSpecPipeline, areaRangeAdvancedPipeline, areaRangeSpecPipeline, areaSpecPipeline, autoFormatter, autoNumFormatter, barAdvancedPipeline, barParallelAdvancedPipeline, barParallelSpecPipeline, barPercentAdvancedPipeline, barPercentSpecPipeline, barSpecPipeline, columnAdvancedPipeline, columnParallelAdvancedPipeline, columnParallelSpecPipeline, columnPercentAdvancedPipeline, columnPercentSpecPipeline, columnSpecPipeline, createFormatter, createNumFormatter, darkTheme, dataReshapeFor1D, dataReshapeFor1D1M, dataReshapeFor1D2M, dataReshapeFor2D1M, dataReshapeFor2D1M0Name, donutAdvancedPipeline, donutSpecPipeline, execPipeline, findAllDimensions, findAllMeasures, findDimensionById, findFirstDimension, findFirstMeasure, findMeasureById, foldMeasures, funnelAdvancedPipeline, funnelSpecPipeline, heatmapAdvancedPipeline, heatmapSpecPipeline, i18n, intl, isPivotChart, isPivotTable, isTable, isVChart, isVTable, lightTheme, lineAdvancedPipeline, lineSpecPipeline, pieAdvancedPipeline, pieSpecPipeline, pivotTableAdvancedPipeline, pivotTableSpecPipeline, preorderTraverse, radarAdvancedPipeline, radarSpecPipeline, registerAll, registerArea, registerAreaPercent, registerAreaRange, registerBar, registerBarParallel, registerBarPercent, registerColumn, registerColumnParallel, registerColumnPercent, registerCustomTheme, registerDarkTheme, registerDonut, registerFunnel, registerHeatmap, registerLightTheme, registerLine, registerPie, registerPivotTable, registerRadar, registerRose, registerRoseParallel, registerScatter, registerTable, roseAdvancedPipeline, roseParallelAdvancedPipeline, roseParallelSpecPipeline, roseSpecPipeline, scatterAdvancedPipeline, scatterSpecPipeline, tableAdvancedPipeline, tableSpecPipeline, unfoldDimensions, updateAdvanced, updateSpec, zAdvancedVSeed, zAnalysis, zAnnotation, zAnnotationArea, zAnnotationHorizontalLine, zAnnotationPoint, zAnnotationVerticalLine, zArea, zAreaConfig, zAreaPercent, zAreaPercentConfig, zAreaRange, zAreaRangeConfig, zAreaStyle, zAxis, zBackgroundColor, zBar, zBarConfig, zBarParallel, zBarParallelConfig, zBarPercent, zBarPercentConfig, zBarStyle, zChartType, zColor, zColumn, zColumnConfig, zColumnParallel, zColumnParallelConfig, zColumnPercent, zColumnPercentConfig, zConfig, zCrosshairLine, zCrosshairRect, zCustomTheme, zCustomThemeConfig, zDataset, zDatasetReshapeInfo, zDatum, zDimension, zDimensionGroup, zDimensionTree, zDimensions, zDonut, zDonutConfig, zDualAxisConfig, zEncoding, zFoldInfo, zFunnel, zFunnelConfig, zHeatmap, zHeatmapConfig, zLabel, zLegend, zLine, zLineConfig, zLineStyle, zLocale, zMarkStyle, zMeasure, zMeasureGroup, zMeasureTree, zMeasures, zNumFormat, zPie, zPieConfig, zPivotTable, zPivotTableConfig, zPointStyle, zRadar, zRadarConfig, zRose, zRoseConfig, zRoseParallel, zRoseParallelConfig, zScatter, zScatterConfig, zSortAxis, zSortLegend, zStackCornerRadius, zTable, zTableConfig, zTheme, zTooltip, zUnfoldInfo, zVSeed, zXBandAxis, zXLinearAxis, zYBandAxis, zYLinearAxis };
|
7021
7919
|
|
7022
7920
|
//# sourceMappingURL=index.js.map
|