@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/umd/index.js
CHANGED
@@ -32,42 +32,45 @@
|
|
32
32
|
__webpack_require__.d(__webpack_exports__, {
|
33
33
|
registerBar: ()=>registerBar,
|
34
34
|
isVChart: ()=>isVChart,
|
35
|
+
funnelAdvancedPipeline: ()=>funnelAdvancedPipeline,
|
35
36
|
autoFormatter: ()=>autoFormatter,
|
36
37
|
roseParallelAdvancedPipeline: ()=>roseParallelAdvancedPipeline,
|
37
|
-
zBaseConfig: ()=>zBaseConfig,
|
38
38
|
pieAdvancedPipeline: ()=>pieAdvancedPipeline,
|
39
39
|
execPipeline: ()=>execPipeline,
|
40
40
|
areaSpecPipeline: ()=>areaSpecPipeline,
|
41
41
|
registerCustomTheme: ()=>registerCustomTheme,
|
42
42
|
registerLine: ()=>registerLine,
|
43
|
+
zBaseConfig: ()=>zBaseConfig,
|
43
44
|
zColor: ()=>zColor,
|
45
|
+
findFirstMeasure: ()=>findFirstMeasure,
|
46
|
+
scatterAdvancedPipeline: ()=>scatterAdvancedPipeline,
|
44
47
|
zMeasureGroup: ()=>zMeasureGroup,
|
45
|
-
zStackCornerRadius: ()=>zStackCornerRadius,
|
46
|
-
zTooltip: ()=>zTooltip,
|
47
|
-
zUnfoldInfo: ()=>zUnfoldInfo,
|
48
48
|
zMeasures: ()=>zMeasures,
|
49
|
+
zUnfoldInfo: ()=>zUnfoldInfo,
|
49
50
|
zCrosshairRect: ()=>zCrosshairRect,
|
50
51
|
FoldMeasureName: ()=>FoldMeasureName,
|
51
52
|
intl: ()=>intl,
|
52
53
|
darkTheme: ()=>darkTheme,
|
53
54
|
createNumFormatter: ()=>createNumFormatter,
|
54
55
|
columnPercentAdvancedPipeline: ()=>columnPercentAdvancedPipeline,
|
55
|
-
|
56
|
+
scatterSpecPipeline: ()=>scatterSpecPipeline,
|
56
57
|
isVTable: ()=>isVTable,
|
57
58
|
zAnnotation: ()=>zAnnotation,
|
59
|
+
zAxis: ()=>zAxis,
|
58
60
|
zCrosshairLine: ()=>zCrosshairLine,
|
59
61
|
columnSpecPipeline: ()=>columnSpecPipeline,
|
60
62
|
UnfoldDimensionGroup: ()=>UnfoldDimensionGroup,
|
61
63
|
zDatasetReshapeInfo: ()=>zDatasetReshapeInfo,
|
62
64
|
zFoldInfo: ()=>zFoldInfo,
|
63
|
-
|
65
|
+
zStackCornerRadius: ()=>zStackCornerRadius,
|
64
66
|
zAreaStyle: ()=>zAreaStyle,
|
65
67
|
ORIGINAL_DATA: ()=>ORIGINAL_DATA,
|
66
|
-
|
68
|
+
dataReshapeFor1D2M: ()=>dataReshapeFor1D2M,
|
67
69
|
zAnnotationArea: ()=>zAnnotationArea,
|
70
|
+
zAnnotationHorizontalLine: ()=>zAnnotationHorizontalLine,
|
68
71
|
zMarkStyle: ()=>zMarkStyle,
|
69
|
-
zYLinearAxis: ()=>zYLinearAxis,
|
70
72
|
Separator: ()=>Separator,
|
73
|
+
zTooltip: ()=>zTooltip,
|
71
74
|
columnAdvancedPipeline: ()=>columnAdvancedPipeline,
|
72
75
|
columnParallelSpecPipeline: ()=>columnParallelSpecPipeline,
|
73
76
|
zLabel: ()=>zLabel,
|
@@ -77,7 +80,10 @@
|
|
77
80
|
lightTheme: ()=>lightTheme,
|
78
81
|
registerColumnParallel: ()=>registerColumnParallel,
|
79
82
|
zDimension: ()=>zDimension,
|
83
|
+
funnelSpecPipeline: ()=>funnelSpecPipeline,
|
80
84
|
zPointStyle: ()=>zPointStyle,
|
85
|
+
zYBandAxis: ()=>zYBandAxis,
|
86
|
+
zYLinearAxis: ()=>zYLinearAxis,
|
81
87
|
isPivotChart: ()=>isPivotChart,
|
82
88
|
zCustomTheme: ()=>zCustomTheme,
|
83
89
|
roseParallelSpecPipeline: ()=>roseParallelSpecPipeline,
|
@@ -290,7 +296,7 @@
|
|
290
296
|
};
|
291
297
|
const createFormatter = (format)=>createNumFormatter(format);
|
292
298
|
const autoFormatter = (value, locale)=>autoNumFormatter(value, locale);
|
293
|
-
|
299
|
+
const findMeasureById = (measures, id)=>{
|
294
300
|
if (!measures) return;
|
295
301
|
const stack = [
|
296
302
|
...measures
|
@@ -301,7 +307,22 @@
|
|
301
307
|
if (current.id === id && !('children' in current)) return current;
|
302
308
|
if ('children' in current && current.children) stack.push(...current.children);
|
303
309
|
}
|
304
|
-
}
|
310
|
+
};
|
311
|
+
const findFirstMeasure = (measures)=>{
|
312
|
+
if (!measures) return;
|
313
|
+
const stack = [
|
314
|
+
...measures
|
315
|
+
].reverse();
|
316
|
+
while(stack.length > 0){
|
317
|
+
const current = stack.pop();
|
318
|
+
if (!current) continue;
|
319
|
+
if (!('children' in current)) return current;
|
320
|
+
if ('children' in current && current.children) {
|
321
|
+
const children = (current.children || []).reverse();
|
322
|
+
stack.push(...children);
|
323
|
+
}
|
324
|
+
}
|
325
|
+
};
|
305
326
|
const autoMeasures = (advancedVSeed, context)=>{
|
306
327
|
const result = {
|
307
328
|
...advancedVSeed
|
@@ -713,6 +734,60 @@
|
|
713
734
|
};
|
714
735
|
}
|
715
736
|
};
|
737
|
+
const dataReshapeFor1D2M_emptyReshapeResult = {
|
738
|
+
dataset: [],
|
739
|
+
foldInfo: {
|
740
|
+
foldMap: {},
|
741
|
+
measureId: '',
|
742
|
+
measureName: '',
|
743
|
+
measureValue: ''
|
744
|
+
},
|
745
|
+
unfoldInfo: {
|
746
|
+
groupName: '',
|
747
|
+
groupId: '',
|
748
|
+
colorItems: [],
|
749
|
+
colorIdMap: {}
|
750
|
+
}
|
751
|
+
};
|
752
|
+
const dataReshapeFor1D2M = (dataset, dimensions, measures, options)=>{
|
753
|
+
const { foldMeasureId = FoldMeasureId, foldMeasureName = FoldMeasureName, foldMeasureValue = FoldMeasureValue, unfoldDimensionGroup = UnfoldDimensionGroup, unfoldDimensionGroupId = UnfoldDimensionGroupId } = options || {};
|
754
|
+
if (0 === dimensions.length && 0 === measures.length) return dataReshapeFor1D2M_emptyReshapeResult;
|
755
|
+
const { dataset: foldedDataset, foldInfo } = foldMeasures(dataset, measures.length > 1 ? measures.slice(1) : measures, foldMeasureId, foldMeasureName, foldMeasureValue);
|
756
|
+
if (0 === dimensions.length) {
|
757
|
+
const { dataset: finalDataset, unfoldInfo } = unfoldDimensions(foldedDataset, [
|
758
|
+
{
|
759
|
+
id: foldMeasureValue,
|
760
|
+
alias: i18n`指标值`,
|
761
|
+
location: 'dimension'
|
762
|
+
}
|
763
|
+
], [
|
764
|
+
{
|
765
|
+
id: foldMeasureValue,
|
766
|
+
alias: i18n`指标值`
|
767
|
+
}
|
768
|
+
], 0, unfoldDimensionGroup, unfoldDimensionGroupId, foldMeasureId);
|
769
|
+
return {
|
770
|
+
dataset: finalDataset,
|
771
|
+
foldInfo,
|
772
|
+
unfoldInfo
|
773
|
+
};
|
774
|
+
}
|
775
|
+
{
|
776
|
+
const { dataset: finalDataset, unfoldInfo } = unfoldDimensions(foldedDataset, [
|
777
|
+
...dimensions
|
778
|
+
], [
|
779
|
+
{
|
780
|
+
id: foldMeasureValue,
|
781
|
+
alias: i18n`指标值`
|
782
|
+
}
|
783
|
+
], 0, unfoldDimensionGroup, unfoldDimensionGroupId, foldMeasureId);
|
784
|
+
return {
|
785
|
+
dataset: finalDataset,
|
786
|
+
foldInfo,
|
787
|
+
unfoldInfo
|
788
|
+
};
|
789
|
+
}
|
790
|
+
};
|
716
791
|
const reshapeTo2D1M = (advancedVSeed, context)=>{
|
717
792
|
const result = {
|
718
793
|
...advancedVSeed
|
@@ -759,6 +834,28 @@
|
|
759
834
|
]
|
760
835
|
};
|
761
836
|
};
|
837
|
+
const reshapeTo1D2M = (advancedVSeed, context)=>{
|
838
|
+
const result = {
|
839
|
+
...advancedVSeed
|
840
|
+
};
|
841
|
+
const { vseed } = context;
|
842
|
+
const { dataset } = vseed;
|
843
|
+
const { dimensions, measures } = advancedVSeed;
|
844
|
+
if (!measures || !dimensions || !dataset) return result;
|
845
|
+
if (0 === measures.length) throw new Error('measures can not be empty');
|
846
|
+
const { dataset: newDatasets, foldInfo, unfoldInfo } = dataReshapeFor1D2M(dataset, dimensions, measures);
|
847
|
+
return {
|
848
|
+
...result,
|
849
|
+
dataset: newDatasets,
|
850
|
+
datasetReshapeInfo: [
|
851
|
+
{
|
852
|
+
id: '1D2M',
|
853
|
+
foldInfo,
|
854
|
+
unfoldInfo
|
855
|
+
}
|
856
|
+
]
|
857
|
+
};
|
858
|
+
};
|
762
859
|
const pivotReshapeTo1D1M = (advancedVSeed, context)=>{
|
763
860
|
const result = {
|
764
861
|
...advancedVSeed
|
@@ -798,6 +895,45 @@
|
|
798
895
|
datasetReshapeInfo: datasetReshapeInfo
|
799
896
|
};
|
800
897
|
};
|
898
|
+
const pivotReshapeTo1D2M = (advancedVSeed, context)=>{
|
899
|
+
const result = {
|
900
|
+
...advancedVSeed
|
901
|
+
};
|
902
|
+
const { vseed } = context;
|
903
|
+
const { dataset } = vseed;
|
904
|
+
const { dimensions, measures } = advancedVSeed;
|
905
|
+
if (!measures || !dimensions) return result;
|
906
|
+
const measureGroups = [];
|
907
|
+
if (measures) measures.forEach((measure)=>{
|
908
|
+
if (measure.children && measure.children.length > 0) measureGroups.push(measure);
|
909
|
+
});
|
910
|
+
const newDatasets = [];
|
911
|
+
const datasetReshapeInfo = [];
|
912
|
+
measureGroups.forEach((measureGroup)=>{
|
913
|
+
const measures = measureGroup.children;
|
914
|
+
if (!measures) return;
|
915
|
+
const commonDimensions = dimensions.filter((dim)=>'dimension' === dim.location);
|
916
|
+
const groupId = measureGroup.id;
|
917
|
+
const { dataset: newSubDataset, foldInfo, unfoldInfo } = dataReshapeFor1D2M(dataset, commonDimensions, measures, {
|
918
|
+
foldMeasureId: FoldMeasureId,
|
919
|
+
foldMeasureName: FoldMeasureName,
|
920
|
+
foldMeasureValue: FoldMeasureValue + groupId,
|
921
|
+
unfoldDimensionGroup: UnfoldDimensionGroup
|
922
|
+
});
|
923
|
+
const reshapeInfo = {
|
924
|
+
id: groupId,
|
925
|
+
foldInfo,
|
926
|
+
unfoldInfo
|
927
|
+
};
|
928
|
+
newDatasets.push(newSubDataset);
|
929
|
+
datasetReshapeInfo.push(reshapeInfo);
|
930
|
+
});
|
931
|
+
return {
|
932
|
+
...result,
|
933
|
+
dataset: newDatasets,
|
934
|
+
datasetReshapeInfo: datasetReshapeInfo
|
935
|
+
};
|
936
|
+
};
|
801
937
|
const pivotReshapeTo2D1M = (advancedVSeed, context)=>{
|
802
938
|
const result = {
|
803
939
|
...advancedVSeed
|
@@ -981,6 +1117,37 @@
|
|
981
1117
|
encoding
|
982
1118
|
};
|
983
1119
|
};
|
1120
|
+
const encodingFunnel = (advancedVSeed)=>{
|
1121
|
+
const result = {
|
1122
|
+
...advancedVSeed
|
1123
|
+
};
|
1124
|
+
const { datasetReshapeInfo, dimensions } = advancedVSeed;
|
1125
|
+
if (!datasetReshapeInfo || !dimensions) return result;
|
1126
|
+
const encoding = datasetReshapeInfo.reduce((prev, cur)=>{
|
1127
|
+
const { foldInfo, unfoldInfo } = cur;
|
1128
|
+
const size = [
|
1129
|
+
foldInfo.measureValue
|
1130
|
+
];
|
1131
|
+
const group = [
|
1132
|
+
unfoldInfo.groupId
|
1133
|
+
];
|
1134
|
+
const color = [
|
1135
|
+
unfoldInfo.groupId
|
1136
|
+
];
|
1137
|
+
return [
|
1138
|
+
...prev,
|
1139
|
+
{
|
1140
|
+
size,
|
1141
|
+
group,
|
1142
|
+
color
|
1143
|
+
}
|
1144
|
+
];
|
1145
|
+
}, []);
|
1146
|
+
return {
|
1147
|
+
...result,
|
1148
|
+
encoding
|
1149
|
+
};
|
1150
|
+
};
|
984
1151
|
function chunk_2T7K3PFL_i(...e) {
|
985
1152
|
return chunk_WIMGWYZL_u(chunk_2T7K3PFL_o, e);
|
986
1153
|
}
|
@@ -1064,6 +1231,7 @@
|
|
1064
1231
|
};
|
1065
1232
|
const areaConfig = lineConfig;
|
1066
1233
|
const areaPercentConfig = lineConfig;
|
1234
|
+
const scatterConfig = lineConfig;
|
1067
1235
|
const barConfig = columnConfig;
|
1068
1236
|
const barParallelConfig = columnConfig;
|
1069
1237
|
const barPercentConfig = columnConfig;
|
@@ -1072,6 +1240,7 @@
|
|
1072
1240
|
const donutConfig = pieConfig;
|
1073
1241
|
const roseConfig = pieConfig;
|
1074
1242
|
const roseParallelConfig = pieConfig;
|
1243
|
+
const funnelConfig = pieConfig;
|
1075
1244
|
function chunk_BZNENX2T_r(o) {
|
1076
1245
|
if ("object" != typeof o || null === o) return !1;
|
1077
1246
|
let e = Object.getPrototypeOf(o);
|
@@ -1401,12 +1570,96 @@
|
|
1401
1570
|
markStyle_markStyle,
|
1402
1571
|
annotation_annotation
|
1403
1572
|
];
|
1573
|
+
const funnelAdvancedPipeline = [
|
1574
|
+
initAdvancedVSeed,
|
1575
|
+
locale_locale,
|
1576
|
+
autoMeasures,
|
1577
|
+
autoDimensions,
|
1578
|
+
pivotAdapter([
|
1579
|
+
reshapeTo1D1M
|
1580
|
+
], [
|
1581
|
+
pivotReshapeTo1D1M
|
1582
|
+
]),
|
1583
|
+
encodingFunnel,
|
1584
|
+
funnelConfig,
|
1585
|
+
vchartBaseConfig,
|
1586
|
+
vchartTheme,
|
1587
|
+
annotation_annotation
|
1588
|
+
];
|
1589
|
+
const encodingYY = (advancedVSeed)=>{
|
1590
|
+
const result = {
|
1591
|
+
...advancedVSeed
|
1592
|
+
};
|
1593
|
+
const { datasetReshapeInfo, measures } = advancedVSeed;
|
1594
|
+
if (!datasetReshapeInfo || !measures) return result;
|
1595
|
+
const firstMeasure = findFirstMeasure(measures);
|
1596
|
+
const encoding = datasetReshapeInfo.reduce((prev, cur)=>{
|
1597
|
+
const { foldInfo, unfoldInfo } = cur;
|
1598
|
+
const x = [
|
1599
|
+
firstMeasure?.id
|
1600
|
+
];
|
1601
|
+
const y = [
|
1602
|
+
foldInfo.measureValue
|
1603
|
+
];
|
1604
|
+
const group = [
|
1605
|
+
unfoldInfo.groupId
|
1606
|
+
];
|
1607
|
+
const color = [
|
1608
|
+
unfoldInfo.groupId
|
1609
|
+
];
|
1610
|
+
return [
|
1611
|
+
...prev,
|
1612
|
+
{
|
1613
|
+
x,
|
1614
|
+
y,
|
1615
|
+
group,
|
1616
|
+
color
|
1617
|
+
}
|
1618
|
+
];
|
1619
|
+
}, []);
|
1620
|
+
return {
|
1621
|
+
...result,
|
1622
|
+
encoding
|
1623
|
+
};
|
1624
|
+
};
|
1625
|
+
const scatterAdvancedPipeline = [
|
1626
|
+
initAdvancedVSeed,
|
1627
|
+
locale_locale,
|
1628
|
+
autoMeasures,
|
1629
|
+
autoDimensions,
|
1630
|
+
pivotAdapter([
|
1631
|
+
reshapeTo1D2M
|
1632
|
+
], [
|
1633
|
+
pivotReshapeTo1D2M
|
1634
|
+
]),
|
1635
|
+
encodingYY,
|
1636
|
+
vchartBaseConfig,
|
1637
|
+
scatterConfig,
|
1638
|
+
vchartTheme,
|
1639
|
+
markStyle_markStyle,
|
1640
|
+
annotation_annotation
|
1641
|
+
];
|
1404
1642
|
const dataset_dataset = (spec, context)=>{
|
1405
1643
|
const { advancedVSeed } = context;
|
1644
|
+
const { encoding } = advancedVSeed;
|
1645
|
+
const angle = encoding[0]?.angle?.[0];
|
1646
|
+
const x = encoding[0]?.x?.[0];
|
1647
|
+
const group = encoding[0]?.group?.[0];
|
1648
|
+
const fields = {};
|
1649
|
+
if (angle) fields[angle] = {
|
1650
|
+
sortIndex: 0
|
1651
|
+
};
|
1652
|
+
if (x) fields[x] = {
|
1653
|
+
sortIndex: 0
|
1654
|
+
};
|
1655
|
+
if (group) fields[group] = {
|
1656
|
+
sortIndex: 1
|
1657
|
+
};
|
1406
1658
|
return {
|
1407
1659
|
...spec,
|
1408
1660
|
data: {
|
1409
|
-
values: advancedVSeed.dataset
|
1661
|
+
values: advancedVSeed.dataset,
|
1662
|
+
fields: fields
|
1410
1663
|
}
|
1411
1664
|
};
|
1412
1665
|
};
|
@@ -1658,7 +1911,7 @@
|
|
1658
1911
|
state: {
|
1659
1912
|
hover: {
|
1660
1913
|
lineWidth: 1,
|
1661
|
-
fillOpacity: 0.
|
1914
|
+
fillOpacity: 0.6
|
1662
1915
|
}
|
1663
1916
|
}
|
1664
1917
|
};
|
@@ -1694,6 +1947,12 @@
|
|
1694
1947
|
style: {
|
1695
1948
|
stroke: '#ffffff',
|
1696
1949
|
lineWidth: 1
|
1950
|
+
},
|
1951
|
+
state: {
|
1952
|
+
hover: {
|
1953
|
+
lineWidth: 1,
|
1954
|
+
fillOpacity: 0.6
|
1955
|
+
}
|
1697
1956
|
}
|
1698
1957
|
};
|
1699
1958
|
result.region = [
|
@@ -1720,6 +1979,42 @@
|
|
1720
1979
|
indicatorsAsCol: false
|
1721
1980
|
};
|
1722
1981
|
};
|
1982
|
+
const initFunnel = (spec, context)=>{
|
1983
|
+
const result = {
|
1984
|
+
...spec
|
1985
|
+
};
|
1986
|
+
const { advancedVSeed } = context;
|
1987
|
+
const { encoding } = advancedVSeed;
|
1988
|
+
if (!encoding[0].size || !encoding[0].group || !encoding[0].color) return result;
|
1989
|
+
result.type = 'funnel';
|
1990
|
+
result.valueField = encoding[0].size[0];
|
1991
|
+
result.categoryField = encoding[0].group[0];
|
1992
|
+
result.padding = 0;
|
1993
|
+
result.isTransform = true;
|
1994
|
+
result.shape = 'rect';
|
1995
|
+
result.maxSize = '75%';
|
1996
|
+
result.minSize = '10%';
|
1997
|
+
result.region = [
|
1998
|
+
{
|
1999
|
+
clip: true
|
2000
|
+
}
|
2001
|
+
];
|
2002
|
+
result.funnel = {
|
2003
|
+
style: {
|
2004
|
+
cornerRadius: 4
|
2005
|
+
},
|
2006
|
+
state: {
|
2007
|
+
hover: {
|
2008
|
+
fillOpacity: 0.6
|
2009
|
+
}
|
2010
|
+
}
|
2011
|
+
};
|
2012
|
+
result.transformLabel = {
|
2013
|
+
visible: true
|
2014
|
+
};
|
2015
|
+
result.animation = true;
|
2016
|
+
return result;
|
2017
|
+
};
|
1723
2018
|
const xBand = (spec, context)=>{
|
1724
2019
|
const result = {
|
1725
2020
|
...spec
|
@@ -1888,7 +2183,7 @@
|
|
1888
2183
|
}
|
1889
2184
|
},
|
1890
2185
|
innerOffset: {
|
1891
|
-
|
2186
|
+
right: LINEAR_AXIS_INNER_OFFSET_TOP
|
1892
2187
|
}
|
1893
2188
|
};
|
1894
2189
|
result.axes = [
|
@@ -2202,6 +2497,9 @@
|
|
2202
2497
|
result.tooltip = {
|
2203
2498
|
visible: enable,
|
2204
2499
|
mark: {
|
2500
|
+
title: {
|
2501
|
+
value: (datum)=>datum && datum[groupName] || ''
|
2502
|
+
},
|
2205
2503
|
content: [
|
2206
2504
|
{
|
2207
2505
|
visible: true,
|
@@ -2445,11 +2743,11 @@
|
|
2445
2743
|
label: d,
|
2446
2744
|
shape: {
|
2447
2745
|
outerBorder: border ? {
|
2448
|
-
stroke: colorScheme[index],
|
2746
|
+
stroke: colorScheme?.[index],
|
2449
2747
|
distance: 3,
|
2450
2748
|
lineWidth: 1
|
2451
2749
|
} : void 0,
|
2452
|
-
fill: colorScheme[index]
|
2750
|
+
fill: colorScheme?.[index]
|
2453
2751
|
}
|
2454
2752
|
})),
|
2455
2753
|
item: {
|
@@ -2501,8 +2799,8 @@
|
|
2501
2799
|
const { color } = baseConfig;
|
2502
2800
|
const { colorScheme, colorMapping } = color;
|
2503
2801
|
const mappingList = [];
|
2504
|
-
if (colorMapping) Object.entries(colorMapping).forEach(([key, value])=>{
|
2505
|
-
const idMap = Object.entries(unfoldInfo.colorIdMap).filter(([_, v])=>key
|
2802
|
+
if (colorMapping) Object.entries(colorMapping).sort((a, b)=>a[0].split(Separator).length - b[0].split(Separator).length).forEach(([key, value])=>{
|
2803
|
+
const idMap = Object.entries(unfoldInfo.colorIdMap).filter(([_, v])=>v.includes(key));
|
2506
2804
|
for (const [colorId] of idMap)mappingList.push([
|
2507
2805
|
colorId,
|
2508
2806
|
value
|
@@ -2833,19 +3131,17 @@
|
|
2833
3131
|
].includes(selector.op));
|
2834
3132
|
const barStyle_barStyle = (spec, context)=>{
|
2835
3133
|
const { advancedVSeed } = context;
|
2836
|
-
const { markStyle
|
3134
|
+
const { markStyle } = advancedVSeed;
|
2837
3135
|
const { barStyle } = markStyle;
|
2838
3136
|
const result = {
|
2839
3137
|
...spec,
|
2840
3138
|
bar: {
|
3139
|
+
style: {
|
3140
|
+
stroke: '#fff',
|
3141
|
+
lineWidth: 1
|
3142
|
+
},
|
2841
3143
|
state: {
|
2842
3144
|
hover: {
|
2843
|
-
stroke: (datum, context)=>{
|
2844
|
-
const field = encoding[0]?.group?.[0];
|
2845
|
-
const color = context.seriesColor(datum[field]);
|
2846
|
-
return color;
|
2847
|
-
},
|
2848
|
-
lineWidth: 4,
|
2849
3145
|
fillOpacity: 0.6
|
2850
3146
|
}
|
2851
3147
|
}
|
@@ -2901,14 +3197,7 @@
|
|
2901
3197
|
const { pointStyle } = markStyle;
|
2902
3198
|
const result = {
|
2903
3199
|
...spec,
|
2904
|
-
point: {
|
2905
|
-
state: {
|
2906
|
-
dimension_hover: {
|
2907
|
-
scaleX: 1.4,
|
2908
|
-
scaleY: 1.4
|
2909
|
-
}
|
2910
|
-
}
|
2911
|
-
}
|
3200
|
+
point: {}
|
2912
3201
|
};
|
2913
3202
|
if (!pointStyle) return result;
|
2914
3203
|
const pointStyles = Array.isArray(pointStyle) ? pointStyle : [
|
@@ -2954,6 +3243,47 @@
|
|
2954
3243
|
}
|
2955
3244
|
};
|
2956
3245
|
};
|
3246
|
+
const pointStateDimensionHover = (spec)=>{
|
3247
|
+
const point = spec.point || {};
|
3248
|
+
const result = {
|
3249
|
+
...spec,
|
3250
|
+
point: {
|
3251
|
+
...point,
|
3252
|
+
state: {
|
3253
|
+
dimension_hover: {
|
3254
|
+
scaleX: 1.4,
|
3255
|
+
scaleY: 1.4
|
3256
|
+
}
|
3257
|
+
}
|
3258
|
+
}
|
3259
|
+
};
|
3260
|
+
return result;
|
3261
|
+
};
|
3262
|
+
const pointStateHover = (spec, context)=>{
|
3263
|
+
const point = spec.point || {};
|
3264
|
+
const { advancedVSeed } = context;
|
3265
|
+
const { encoding } = advancedVSeed;
|
3266
|
+
const result = {
|
3267
|
+
...spec,
|
3268
|
+
point: {
|
3269
|
+
...point,
|
3270
|
+
state: {
|
3271
|
+
hover: {
|
3272
|
+
scaleX: 1.4,
|
3273
|
+
scaleY: 1.4,
|
3274
|
+
stroke: (datum, context)=>{
|
3275
|
+
const field = encoding[0]?.group?.[0];
|
3276
|
+
const color = context.seriesColor(datum[field]);
|
3277
|
+
return color;
|
3278
|
+
},
|
3279
|
+
fillOpacity: 0.6,
|
3280
|
+
lineWidth: 1
|
3281
|
+
}
|
3282
|
+
}
|
3283
|
+
}
|
3284
|
+
};
|
3285
|
+
return result;
|
3286
|
+
};
|
2957
3287
|
function chunk_HVPVHFDT_i(...e) {
|
2958
3288
|
return chunk_WIMGWYZL_u(chunk_HVPVHFDT_p, e);
|
2959
3289
|
}
|
@@ -3692,6 +4022,46 @@
|
|
3692
4022
|
};
|
3693
4023
|
return result;
|
3694
4024
|
};
|
4025
|
+
const horizontalCrosshairLine = (spec, context)=>{
|
4026
|
+
const result = {
|
4027
|
+
...spec
|
4028
|
+
};
|
4029
|
+
const { advancedVSeed, vseed } = context;
|
4030
|
+
const { chartType } = vseed;
|
4031
|
+
const config = advancedVSeed.config?.[chartType]?.crosshairLine;
|
4032
|
+
if (!config) return result;
|
4033
|
+
if (!result.crosshair) result.crosshair = {};
|
4034
|
+
const { visible = true, lineColor, labelColor, labelVisible, labelBackgroundColor } = config;
|
4035
|
+
const crosshair = result.crosshair;
|
4036
|
+
crosshair.yField = {
|
4037
|
+
visible,
|
4038
|
+
line: {
|
4039
|
+
type: 'line',
|
4040
|
+
style: {
|
4041
|
+
lineWidth: 1,
|
4042
|
+
opacity: 1,
|
4043
|
+
stroke: lineColor,
|
4044
|
+
lineDash: [
|
4045
|
+
4,
|
4046
|
+
2
|
4047
|
+
]
|
4048
|
+
}
|
4049
|
+
},
|
4050
|
+
label: {
|
4051
|
+
visible: labelVisible,
|
4052
|
+
labelBackground: {
|
4053
|
+
visible: labelVisible,
|
4054
|
+
style: {
|
4055
|
+
fill: labelBackgroundColor
|
4056
|
+
}
|
4057
|
+
},
|
4058
|
+
style: {
|
4059
|
+
fill: labelColor
|
4060
|
+
}
|
4061
|
+
}
|
4062
|
+
};
|
4063
|
+
return result;
|
4064
|
+
};
|
3695
4065
|
const line_line = [
|
3696
4066
|
initLine,
|
3697
4067
|
color_color,
|
@@ -3704,6 +4074,7 @@
|
|
3704
4074
|
verticalCrosshairLine,
|
3705
4075
|
discreteLegend,
|
3706
4076
|
pointStyle_pointStyle,
|
4077
|
+
pointStateDimensionHover,
|
3707
4078
|
lineStyle_lineStyle,
|
3708
4079
|
annotationPoint_annotationPoint,
|
3709
4080
|
annotationVerticalLine_annotationVerticalLine,
|
@@ -3726,6 +4097,7 @@
|
|
3726
4097
|
tooltip_tooltip,
|
3727
4098
|
verticalCrosshairLine,
|
3728
4099
|
pointStyle_pointStyle,
|
4100
|
+
pointStateDimensionHover,
|
3729
4101
|
lineStyle_lineStyle,
|
3730
4102
|
annotationPoint_annotationPoint,
|
3731
4103
|
annotationVerticalLine_annotationVerticalLine,
|
@@ -4042,6 +4414,7 @@
|
|
4042
4414
|
verticalCrosshairLine,
|
4043
4415
|
discreteLegend,
|
4044
4416
|
pointStyle_pointStyle,
|
4417
|
+
pointStateDimensionHover,
|
4045
4418
|
lineStyle_lineStyle,
|
4046
4419
|
areaStyle_areaStyle,
|
4047
4420
|
annotationPoint_annotationPoint,
|
@@ -4066,6 +4439,7 @@
|
|
4066
4439
|
tooltip_tooltip,
|
4067
4440
|
verticalCrosshairLine,
|
4068
4441
|
pointStyle_pointStyle,
|
4442
|
+
pointStateDimensionHover,
|
4069
4443
|
lineStyle_lineStyle,
|
4070
4444
|
areaStyle_areaStyle,
|
4071
4445
|
annotationPoint_annotationPoint,
|
@@ -4258,7 +4632,6 @@
|
|
4258
4632
|
tooltip_tooltip,
|
4259
4633
|
discreteLegend,
|
4260
4634
|
verticalCrosshairRect,
|
4261
|
-
barStyle_barStyle,
|
4262
4635
|
annotationPoint_annotationPoint,
|
4263
4636
|
annotationVerticalLine_annotationVerticalLine,
|
4264
4637
|
annotationHorizontalLine_annotationHorizontalLine,
|
@@ -4280,7 +4653,6 @@
|
|
4280
4653
|
label_label,
|
4281
4654
|
tooltip_tooltip,
|
4282
4655
|
verticalCrosshairRect,
|
4283
|
-
barStyle_barStyle,
|
4284
4656
|
annotationPoint_annotationPoint,
|
4285
4657
|
annotationVerticalLine_annotationVerticalLine,
|
4286
4658
|
annotationHorizontalLine_annotationHorizontalLine,
|
@@ -4293,6 +4665,113 @@
|
|
4293
4665
|
const roseParallelSpecPipeline = [
|
4294
4666
|
pivotAdapter_pivotAdapter(roseParallel, pivotRoseParallel)
|
4295
4667
|
];
|
4668
|
+
const funnel = [
|
4669
|
+
initFunnel,
|
4670
|
+
color_color,
|
4671
|
+
background_backgroundColor,
|
4672
|
+
dataset_dataset,
|
4673
|
+
label_label,
|
4674
|
+
tooltip_tooltip,
|
4675
|
+
discreteLegend,
|
4676
|
+
annotationPoint_annotationPoint,
|
4677
|
+
annotationVerticalLine_annotationVerticalLine,
|
4678
|
+
annotationHorizontalLine_annotationHorizontalLine,
|
4679
|
+
annotationArea_annotationArea
|
4680
|
+
];
|
4681
|
+
const pivotFunnel = [
|
4682
|
+
initPivot,
|
4683
|
+
pivotGridStyle,
|
4684
|
+
pivotIndicators_pivotIndicatorsAsRow,
|
4685
|
+
datasetPivot,
|
4686
|
+
pivotIndicators([
|
4687
|
+
initFunnel,
|
4688
|
+
color_color,
|
4689
|
+
background_backgroundColor,
|
4690
|
+
datasetPivotPlaceholder,
|
4691
|
+
label_label,
|
4692
|
+
tooltip_tooltip,
|
4693
|
+
annotationPoint_annotationPoint,
|
4694
|
+
annotationVerticalLine_annotationVerticalLine,
|
4695
|
+
annotationHorizontalLine_annotationHorizontalLine,
|
4696
|
+
annotationArea_annotationArea
|
4697
|
+
]),
|
4698
|
+
pivotRowDimensions,
|
4699
|
+
pivotColumnDimensions,
|
4700
|
+
pivotDiscreteLegend
|
4701
|
+
];
|
4702
|
+
const funnelSpecPipeline = [
|
4703
|
+
pivotAdapter_pivotAdapter(funnel, pivotFunnel)
|
4704
|
+
];
|
4705
|
+
const initScatter = (spec, context)=>{
|
4706
|
+
const result = {
|
4707
|
+
...spec
|
4708
|
+
};
|
4709
|
+
const { advancedVSeed } = context;
|
4710
|
+
const { encoding } = advancedVSeed;
|
4711
|
+
if (!encoding[0].y || !encoding[0].x || !encoding[0].group) return result;
|
4712
|
+
result.type = 'scatter';
|
4713
|
+
result.direction = 'vertical';
|
4714
|
+
result.xField = encoding[0].x[0];
|
4715
|
+
result.yField = encoding[0].y[0];
|
4716
|
+
result.seriesField = encoding[0].group[0];
|
4717
|
+
result.padding = 0;
|
4718
|
+
result.region = [
|
4719
|
+
{
|
4720
|
+
clip: true
|
4721
|
+
}
|
4722
|
+
];
|
4723
|
+
result.animation = true;
|
4724
|
+
return result;
|
4725
|
+
};
|
4726
|
+
const scatter = [
|
4727
|
+
initScatter,
|
4728
|
+
color_color,
|
4729
|
+
background_backgroundColor,
|
4730
|
+
dataset_dataset,
|
4731
|
+
xLinear,
|
4732
|
+
yLinear,
|
4733
|
+
label_label,
|
4734
|
+
tooltip_tooltip,
|
4735
|
+
verticalCrosshairLine,
|
4736
|
+
horizontalCrosshairLine,
|
4737
|
+
discreteLegend,
|
4738
|
+
pointStyle_pointStyle,
|
4739
|
+
pointStateHover,
|
4740
|
+
annotationPoint_annotationPoint,
|
4741
|
+
annotationVerticalLine_annotationVerticalLine,
|
4742
|
+
annotationHorizontalLine_annotationHorizontalLine,
|
4743
|
+
annotationArea_annotationArea
|
4744
|
+
];
|
4745
|
+
const pivotScatter = [
|
4746
|
+
initPivot,
|
4747
|
+
pivotGridStyle,
|
4748
|
+
pivotIndicators_pivotIndicatorsAsRow,
|
4749
|
+
datasetPivot,
|
4750
|
+
pivotIndicators([
|
4751
|
+
initScatter,
|
4752
|
+
color_color,
|
4753
|
+
background_backgroundColor,
|
4754
|
+
datasetPivotPlaceholder,
|
4755
|
+
xLinear,
|
4756
|
+
yLinear,
|
4757
|
+
label_label,
|
4758
|
+
tooltip_tooltip,
|
4759
|
+
verticalCrosshairLine,
|
4760
|
+
horizontalCrosshairLine,
|
4761
|
+
pointStyle_pointStyle,
|
4762
|
+
pointStateHover,
|
4763
|
+
annotationPoint_annotationPoint,
|
4764
|
+
annotationVerticalLine_annotationVerticalLine,
|
4765
|
+
annotationHorizontalLine_annotationHorizontalLine,
|
4766
|
+
annotationArea_annotationArea
|
4767
|
+
]),
|
4768
|
+
pivotRowDimensions,
|
4769
|
+
pivotColumnDimensions,
|
4770
|
+
pivotDiscreteLegend
|
4771
|
+
];
|
4772
|
+
const scatterSpecPipeline = [
|
4773
|
+
pivotAdapter_pivotAdapter(scatter, pivotScatter)
|
4774
|
+
];
|
4296
4775
|
const buildAdvanced = (builder)=>{
|
4297
4776
|
const { chartType } = builder.vseed;
|
4298
4777
|
if (!chartType) throw new Error('chartType is nil in buildAdvanced');
|
@@ -4423,6 +4902,14 @@
|
|
4423
4902
|
Builder._advancedPipelineMap.roseParallel = roseParallelAdvancedPipeline;
|
4424
4903
|
Builder._specPipelineMap.roseParallel = roseParallelSpecPipeline;
|
4425
4904
|
};
|
4905
|
+
const registerFunnel = ()=>{
|
4906
|
+
Builder._advancedPipelineMap.funnel = funnelAdvancedPipeline;
|
4907
|
+
Builder._specPipelineMap.funnel = funnelSpecPipeline;
|
4908
|
+
};
|
4909
|
+
const registerScatter = ()=>{
|
4910
|
+
Builder._advancedPipelineMap.scatter = scatterAdvancedPipeline;
|
4911
|
+
Builder._specPipelineMap.scatter = scatterSpecPipeline;
|
4912
|
+
};
|
4426
4913
|
const lightTheme = ()=>{
|
4427
4914
|
const linearAxis = {
|
4428
4915
|
nice: true,
|
@@ -4648,6 +5135,23 @@
|
|
4648
5135
|
xAxis: bandAxis,
|
4649
5136
|
yAxis: linearAxis,
|
4650
5137
|
crosshairLine
|
5138
|
+
},
|
5139
|
+
scatter: {
|
5140
|
+
xAxis: {
|
5141
|
+
...linearAxis,
|
5142
|
+
line: {
|
5143
|
+
...linearAxis.line,
|
5144
|
+
visible: true
|
5145
|
+
}
|
5146
|
+
},
|
5147
|
+
yAxis: {
|
5148
|
+
...linearAxis,
|
5149
|
+
line: {
|
5150
|
+
...linearAxis.line,
|
5151
|
+
visible: true
|
5152
|
+
}
|
5153
|
+
},
|
5154
|
+
crosshairLine
|
4651
5155
|
}
|
4652
5156
|
}
|
4653
5157
|
};
|
@@ -4876,6 +5380,23 @@
|
|
4876
5380
|
xAxis: bandAxis,
|
4877
5381
|
yAxis: linearAxis,
|
4878
5382
|
crosshairLine: crosshairLine
|
5383
|
+
},
|
5384
|
+
scatter: {
|
5385
|
+
xAxis: {
|
5386
|
+
...linearAxis,
|
5387
|
+
line: {
|
5388
|
+
...linearAxis.line,
|
5389
|
+
visible: true
|
5390
|
+
}
|
5391
|
+
},
|
5392
|
+
yAxis: {
|
5393
|
+
...linearAxis,
|
5394
|
+
line: {
|
5395
|
+
...linearAxis.line,
|
5396
|
+
visible: true
|
5397
|
+
}
|
5398
|
+
},
|
5399
|
+
crosshairLine
|
4879
5400
|
}
|
4880
5401
|
}
|
4881
5402
|
};
|
@@ -4907,6 +5428,8 @@
|
|
4907
5428
|
registerDonut();
|
4908
5429
|
registerRose();
|
4909
5430
|
registerRoseParallel();
|
5431
|
+
registerFunnel();
|
5432
|
+
registerScatter();
|
4910
5433
|
registerLightTheme();
|
4911
5434
|
registerDarkTheme();
|
4912
5435
|
};
|
@@ -8209,7 +8732,9 @@
|
|
8209
8732
|
'roseParallel',
|
8210
8733
|
'pie',
|
8211
8734
|
'donut',
|
8212
|
-
'dualAxis'
|
8735
|
+
'dualAxis',
|
8736
|
+
'scatter',
|
8737
|
+
'funnel'
|
8213
8738
|
]);
|
8214
8739
|
const zDatum = record(schemas_string().or(schemas_number()), any());
|
8215
8740
|
const zDataset = schemas_array(zDatum);
|
@@ -8282,7 +8807,8 @@
|
|
8282
8807
|
group: schemas_array(schemas_string()).optional(),
|
8283
8808
|
angle: schemas_array(schemas_string()).optional(),
|
8284
8809
|
radius: schemas_array(schemas_string()).optional(),
|
8285
|
-
tooltip: schemas_array(schemas_string()).optional()
|
8810
|
+
tooltip: schemas_array(schemas_string()).optional(),
|
8811
|
+
size: schemas_array(schemas_string()).optional()
|
8286
8812
|
}));
|
8287
8813
|
const zBackgroundColor = schemas_string().default('transparent').optional();
|
8288
8814
|
const zLabel = schemas_object({
|
@@ -8515,6 +9041,8 @@
|
|
8515
9041
|
0
|
8516
9042
|
]);
|
8517
9043
|
const zConfig = schemas_object({
|
9044
|
+
table: schemas_object({}).optional(),
|
9045
|
+
pivotTable: schemas_object({}).optional(),
|
8518
9046
|
line: schemas_object({
|
8519
9047
|
xAxis: zXBandAxis.optional(),
|
8520
9048
|
yAxis: zYLinearAxis.optional(),
|
@@ -8571,8 +9099,12 @@
|
|
8571
9099
|
pie: schemas_object({}).optional(),
|
8572
9100
|
donut: schemas_object({}).optional(),
|
8573
9101
|
dualAxis: schemas_object({}).optional(),
|
8574
|
-
|
8575
|
-
|
9102
|
+
scatter: schemas_object({
|
9103
|
+
xAxis: zXLinearAxis.optional(),
|
9104
|
+
yAxis: zYLinearAxis.optional(),
|
9105
|
+
crosshairLine: zCrosshairLine.optional()
|
9106
|
+
}).optional(),
|
9107
|
+
funnel: schemas_object({}).optional()
|
8576
9108
|
});
|
8577
9109
|
const zSelector = union([
|
8578
9110
|
schemas_string(),
|
@@ -9021,6 +9553,19 @@
|
|
9021
9553
|
annotationArea: zAnnotationArea.optional(),
|
9022
9554
|
locale: zLocale.optional()
|
9023
9555
|
});
|
9556
|
+
const zRose = schemas_object({
|
9557
|
+
chartType: literal('rose'),
|
9558
|
+
dataset: zDataset.optional(),
|
9559
|
+
dimensions: zDimensions.optional(),
|
9560
|
+
measures: zMeasures.optional(),
|
9561
|
+
backgroundColor: zBackgroundColor.optional(),
|
9562
|
+
color: zColor.optional(),
|
9563
|
+
label: zLabel.optional(),
|
9564
|
+
legend: zLegend.optional(),
|
9565
|
+
tooltip: zTooltip.optional(),
|
9566
|
+
theme: zTheme.optional(),
|
9567
|
+
locale: zLocale.optional()
|
9568
|
+
});
|
9024
9569
|
const zBarPercent = schemas_object({
|
9025
9570
|
chartType: literal('barPercent'),
|
9026
9571
|
dataset: zDataset.optional(),
|
@@ -9056,6 +9601,19 @@
|
|
9056
9601
|
theme: zTheme.optional(),
|
9057
9602
|
locale: zLocale.optional()
|
9058
9603
|
});
|
9604
|
+
const zDonut = schemas_object({
|
9605
|
+
chartType: literal('donut'),
|
9606
|
+
dataset: zDataset.optional(),
|
9607
|
+
dimensions: zDimensions.optional(),
|
9608
|
+
measures: zMeasures.optional(),
|
9609
|
+
backgroundColor: zBackgroundColor.optional(),
|
9610
|
+
color: zColor.optional(),
|
9611
|
+
label: zLabel.optional(),
|
9612
|
+
legend: zLegend.optional(),
|
9613
|
+
tooltip: zTooltip.optional(),
|
9614
|
+
theme: zTheme.optional(),
|
9615
|
+
locale: zLocale.optional()
|
9616
|
+
});
|
9059
9617
|
const zArea = schemas_object({
|
9060
9618
|
chartType: literal('area'),
|
9061
9619
|
dataset: zDataset.optional(),
|
@@ -9102,6 +9660,53 @@
|
|
9102
9660
|
annotationArea: zAnnotationArea.optional(),
|
9103
9661
|
locale: zLocale.optional()
|
9104
9662
|
});
|
9663
|
+
const zRoseParallel = schemas_object({
|
9664
|
+
chartType: literal('roseParallel'),
|
9665
|
+
dataset: zDataset.optional(),
|
9666
|
+
dimensions: zDimensions.optional(),
|
9667
|
+
measures: zMeasures.optional(),
|
9668
|
+
backgroundColor: zBackgroundColor.optional(),
|
9669
|
+
color: zColor.optional(),
|
9670
|
+
label: zLabel.optional(),
|
9671
|
+
legend: zLegend.optional(),
|
9672
|
+
tooltip: zTooltip.optional(),
|
9673
|
+
theme: zTheme.optional(),
|
9674
|
+
locale: zLocale.optional()
|
9675
|
+
});
|
9676
|
+
const zScatter = schemas_object({
|
9677
|
+
chartType: literal('scatter'),
|
9678
|
+
dataset: zDataset.optional(),
|
9679
|
+
dimensions: zDimensions.optional(),
|
9680
|
+
measures: zMeasures.optional(),
|
9681
|
+
backgroundColor: zBackgroundColor.optional(),
|
9682
|
+
color: zColor.optional(),
|
9683
|
+
label: zLabel.optional(),
|
9684
|
+
legend: zLegend.optional(),
|
9685
|
+
tooltip: zTooltip.optional(),
|
9686
|
+
xAxis: zXLinearAxis.optional(),
|
9687
|
+
yAxis: zYLinearAxis.optional(),
|
9688
|
+
crosshairLine: zCrosshairLine.optional(),
|
9689
|
+
theme: zTheme.optional(),
|
9690
|
+
pointStyle: zPointStyle.optional(),
|
9691
|
+
annotationPoint: zAnnotationPoint.optional(),
|
9692
|
+
annotationVerticalLine: zAnnotationVerticalLine.optional(),
|
9693
|
+
annotationHorizontalLine: zAnnotationHorizontalLine.optional(),
|
9694
|
+
annotationArea: zAnnotationArea.optional(),
|
9695
|
+
locale: zLocale.optional()
|
9696
|
+
});
|
9697
|
+
const zFunnel = schemas_object({
|
9698
|
+
chartType: literal('funnel'),
|
9699
|
+
dataset: zDataset.optional(),
|
9700
|
+
dimensions: zDimensions.optional(),
|
9701
|
+
measures: zMeasures.optional(),
|
9702
|
+
backgroundColor: zBackgroundColor.optional(),
|
9703
|
+
color: zColor.optional(),
|
9704
|
+
label: zLabel.optional(),
|
9705
|
+
legend: zLegend.optional(),
|
9706
|
+
tooltip: zTooltip.optional(),
|
9707
|
+
theme: zTheme.optional(),
|
9708
|
+
locale: zLocale.optional()
|
9709
|
+
});
|
9105
9710
|
const zVSeed = discriminatedUnion('chartType', [
|
9106
9711
|
zLine,
|
9107
9712
|
zColumn,
|
@@ -9112,7 +9717,12 @@
|
|
9112
9717
|
zBarPercent,
|
9113
9718
|
zArea,
|
9114
9719
|
zAreaPercent,
|
9115
|
-
zPie
|
9720
|
+
zPie,
|
9721
|
+
zRose,
|
9722
|
+
zRoseParallel,
|
9723
|
+
zScatter,
|
9724
|
+
zDonut,
|
9725
|
+
zFunnel
|
9116
9726
|
]);
|
9117
9727
|
return __webpack_exports__;
|
9118
9728
|
})());
|