@visactor/vseed 0.0.19 → 0.0.21
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/advanced/colorItems.d.ts +2 -0
- package/dist/builder/builder/advanced/index.d.ts +1 -0
- package/dist/builder/builder/builder.d.ts +259 -145
- package/dist/builder/register/chartType.d.ts +2 -0
- package/dist/builder/register/index.d.ts +1 -1
- package/dist/dataReshape/foldMeasures.d.ts +3 -3
- package/dist/index.cjs +930 -142
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +845 -135
- package/dist/index.js.map +1 -1
- package/dist/pipeline/advanced/chart/index.d.ts +1 -0
- package/dist/pipeline/advanced/{pipeline → chart/pipeline}/area.d.ts +1 -1
- package/dist/pipeline/advanced/{pipeline → chart/pipeline}/areaPercent.d.ts +1 -1
- package/dist/pipeline/advanced/{pipeline → chart/pipeline}/bar.d.ts +1 -1
- package/dist/pipeline/advanced/{pipeline → chart/pipeline}/barParallel.d.ts +1 -1
- package/dist/pipeline/advanced/{pipeline → chart/pipeline}/barPercent.d.ts +1 -1
- package/dist/pipeline/advanced/{pipeline → chart/pipeline}/column.d.ts +1 -1
- package/dist/pipeline/advanced/{pipeline → chart/pipeline}/columnParallel.d.ts +1 -1
- package/dist/pipeline/advanced/{pipeline → chart/pipeline}/columnPercent.d.ts +1 -1
- package/dist/pipeline/advanced/{pipeline → chart/pipeline}/donut.d.ts +1 -1
- package/dist/pipeline/advanced/{pipeline → chart/pipeline}/funnel.d.ts +1 -1
- package/dist/pipeline/advanced/{pipeline → chart/pipeline}/line.d.ts +1 -1
- package/dist/pipeline/advanced/{pipeline → chart/pipeline}/pie.d.ts +1 -1
- package/dist/pipeline/advanced/{pipeline → chart/pipeline}/rose.d.ts +1 -1
- package/dist/pipeline/advanced/{pipeline → chart/pipeline}/roseParallel.d.ts +1 -1
- package/dist/pipeline/advanced/{pipeline → chart/pipeline}/scatter.d.ts +1 -1
- package/dist/pipeline/advanced/chart/pipes/annotation/annotation.d.ts +2 -0
- package/dist/pipeline/advanced/{pipes → chart/pipes}/config/config.d.ts +1 -1
- package/dist/pipeline/advanced/chart/pipes/encoding/encodingFunnel.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipes/encoding/encodingPie.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipes/encoding/encodingRose.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipes/encoding/encodingXY.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipes/encoding/encodingYX.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipes/encoding/encodingYY.d.ts +2 -0
- package/dist/pipeline/advanced/{pipes → chart/pipes}/encoding/index.d.ts +1 -0
- package/dist/pipeline/advanced/{pipes → chart/pipes}/index.d.ts +0 -1
- package/dist/pipeline/advanced/chart/pipes/init/autoDimensions.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipes/init/autoMeasures.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipes/init/initAdvancedVSeed.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipes/markStyle/markStyle.d.ts +2 -0
- package/dist/pipeline/advanced/{pipes → chart/pipes}/pivot/pivotAdapter.d.ts +1 -1
- package/dist/pipeline/advanced/{pipes → chart/pipes}/reshape/pivotReshapeTo1D1M.d.ts +1 -1
- package/dist/pipeline/advanced/{pipes → chart/pipes}/reshape/pivotReshapeTo1D2M.d.ts +1 -1
- package/dist/pipeline/advanced/{pipes → chart/pipes}/reshape/pivotReshapeTo2D1M.d.ts +1 -1
- package/dist/pipeline/advanced/{pipes → chart/pipes}/reshape/reshapeTo1D1M.d.ts +1 -1
- package/dist/pipeline/advanced/{pipes → chart/pipes}/reshape/reshapeTo1D2M.d.ts +1 -1
- package/dist/pipeline/advanced/{pipes → chart/pipes}/reshape/reshapeTo2D1M.d.ts +1 -1
- package/dist/pipeline/advanced/chart/pipes/theme/theme.d.ts +2 -0
- package/dist/pipeline/advanced/index.d.ts +2 -1
- package/dist/pipeline/advanced/table/index.d.ts +1 -0
- package/dist/pipeline/advanced/table/pipeline/index.d.ts +2 -0
- package/dist/pipeline/advanced/table/pipeline/pivotTable.d.ts +2 -0
- package/dist/pipeline/advanced/table/pipeline/table.d.ts +2 -0
- package/dist/pipeline/advanced/table/pipes/index.d.ts +2 -0
- package/dist/pipeline/advanced/table/pipes/init/autoDimensions.d.ts +2 -0
- package/dist/pipeline/advanced/table/pipes/init/autoMeasures.d.ts +2 -0
- package/dist/pipeline/advanced/table/pipes/init/autoPivotDimensions.d.ts +2 -0
- package/dist/pipeline/advanced/table/pipes/init/autoPivotMeasures.d.ts +2 -0
- package/dist/pipeline/advanced/table/pipes/init/index.d.ts +5 -0
- package/dist/pipeline/advanced/table/pipes/init/initAdvancedVSeed.d.ts +2 -0
- package/dist/pipeline/advanced/table/pipes/records/index.d.ts +1 -0
- package/dist/pipeline/advanced/table/pipes/records/records.d.ts +2 -0
- package/dist/pipeline/spec/chart/index.d.ts +1 -0
- package/dist/pipeline/spec/chart/pipeline/area.d.ts +1 -0
- package/dist/pipeline/spec/chart/pipeline/areaPercent.d.ts +1 -0
- package/dist/pipeline/spec/chart/pipeline/bar.d.ts +2 -0
- package/dist/pipeline/spec/{pipeline → chart/pipeline}/barParallel.d.ts +1 -1
- package/dist/pipeline/spec/{pipeline → chart/pipeline}/barPercent.d.ts +1 -1
- package/dist/pipeline/spec/chart/pipeline/column.d.ts +1 -0
- package/dist/pipeline/spec/{pipeline → chart/pipeline}/columnParallel.d.ts +1 -1
- package/dist/pipeline/spec/{pipeline → chart/pipeline}/columnPercent.d.ts +1 -1
- package/dist/pipeline/spec/chart/pipeline/donut.d.ts +2 -0
- package/dist/pipeline/spec/{pipeline → chart/pipeline}/funnel.d.ts +1 -1
- package/dist/pipeline/spec/chart/pipeline/line.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipeline/pie.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipeline/rose.d.ts +1 -0
- package/dist/pipeline/spec/{pipeline → chart/pipeline}/roseParallel.d.ts +1 -1
- package/dist/pipeline/spec/{pipeline → chart/pipeline}/scatter.d.ts +1 -1
- package/dist/pipeline/spec/chart/pipes/index.d.ts +14 -0
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/init/index.d.ts +1 -0
- package/dist/pipeline/spec/index.d.ts +2 -1
- package/dist/pipeline/spec/table/index.d.ts +1 -0
- package/dist/pipeline/spec/table/pipeline/index.d.ts +2 -0
- package/dist/pipeline/spec/table/pipeline/pivotTable.d.ts +2 -0
- package/dist/pipeline/spec/table/pipeline/table.d.ts +2 -0
- package/dist/pipeline/spec/table/pipes/columns/index.d.ts +2 -0
- package/dist/pipeline/spec/table/pipes/columns/measuresToColumns.d.ts +3 -0
- package/dist/pipeline/spec/table/pipes/columns/pivotColumns.d.ts +2 -0
- package/dist/pipeline/spec/table/pipes/index.d.ts +5 -0
- package/dist/pipeline/spec/table/pipes/indicators/index.d.ts +1 -0
- package/dist/pipeline/spec/table/pipes/indicators/pivotIndicators.d.ts +2 -0
- package/dist/pipeline/spec/table/pipes/init/index.d.ts +2 -0
- package/dist/pipeline/spec/table/pipes/init/pivotTable.d.ts +2 -0
- package/dist/pipeline/spec/table/pipes/init/table.d.ts +2 -0
- package/dist/pipeline/spec/table/pipes/rows/index.d.ts +1 -0
- package/dist/pipeline/spec/table/pipes/rows/pivotRows.d.ts +2 -0
- package/dist/pipeline/spec/table/pipes/theme/bodyStyle.d.ts +2 -0
- package/dist/pipeline/spec/table/pipes/theme/cornerHeaderStyle.d.ts +2 -0
- package/dist/pipeline/spec/table/pipes/theme/frameStyle.d.ts +2 -0
- package/dist/pipeline/spec/table/pipes/theme/headerStyle.d.ts +2 -0
- package/dist/pipeline/spec/table/pipes/theme/index.d.ts +6 -0
- package/dist/pipeline/spec/table/pipes/theme/rowHeaderStyle.d.ts +2 -0
- package/dist/pipeline/spec/table/pipes/theme/scrollStyle.d.ts +2 -0
- package/dist/pipeline/spec/table/pipes/theme/selectionStyle.d.ts +2 -0
- package/dist/pipeline/utils/chatType.d.ts +4 -2
- package/dist/pipeline/utils/dimensions/find.d.ts +4 -0
- package/dist/pipeline/utils/dimensions/index.d.ts +1 -0
- package/dist/pipeline/utils/index.d.ts +2 -0
- package/dist/pipeline/utils/measures/find.d.ts +4 -0
- package/dist/pipeline/utils/measures/index.d.ts +1 -1
- package/dist/pipeline/utils/tree/index.d.ts +1 -0
- package/dist/pipeline/utils/tree/traverse.d.ts +11 -0
- package/dist/types/advancedVSeed.d.ts +57 -52
- package/dist/types/builder/builder.d.ts +1 -0
- package/dist/types/chartType/area/area.d.ts +12 -51
- package/dist/types/chartType/areaPercent/areaPercent.d.ts +12 -51
- package/dist/types/chartType/bar/bar.d.ts +13 -51
- package/dist/types/chartType/barParallel/barParallel.d.ts +12 -51
- package/dist/types/chartType/barPercent/barPercent.d.ts +12 -51
- package/dist/types/chartType/column/column.d.ts +12 -51
- package/dist/types/chartType/columnParallel/columnParallel.d.ts +12 -51
- package/dist/types/chartType/columnPercent/columnPercent.d.ts +12 -51
- package/dist/types/chartType/donut/donut.d.ts +12 -51
- package/dist/types/chartType/dualAxis/dualAxis.d.ts +3 -3
- package/dist/types/chartType/funnel/funnel.d.ts +12 -51
- package/dist/types/chartType/index.d.ts +3 -3
- package/dist/types/chartType/line/line.d.ts +12 -51
- package/dist/types/chartType/pie/pie.d.ts +12 -51
- package/dist/types/chartType/pivotTable/index.d.ts +1 -1
- package/dist/types/chartType/pivotTable/pivotTable.d.ts +58 -2
- package/dist/types/chartType/rose/rose.d.ts +12 -50
- package/dist/types/chartType/roseParallel/roseParallel.d.ts +13 -51
- package/dist/types/chartType/scatter/scatter.d.ts +12 -51
- package/dist/types/chartType/table/index.d.ts +1 -1
- package/dist/types/chartType/table/table.d.ts +60 -4
- package/dist/types/properties/config/config.d.ts +50 -2
- package/dist/types/properties/dimensions/dimensions.d.ts +28 -10
- package/dist/types/properties/dimensions/index.d.ts +1 -2
- package/dist/types/properties/measures/measures.d.ts +44 -84
- package/dist/types/properties/theme/customTheme.d.ts +48 -4
- package/dist/types/vseed.d.ts +241 -720
- package/dist/umd/index.js +1202 -144
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/pipeline/advanced/pipes/annotation/annotation.d.ts +0 -2
- package/dist/pipeline/advanced/pipes/encoding/encodingFunnel.d.ts +0 -2
- package/dist/pipeline/advanced/pipes/encoding/encodingPie.d.ts +0 -2
- package/dist/pipeline/advanced/pipes/encoding/encodingRose.d.ts +0 -2
- package/dist/pipeline/advanced/pipes/encoding/encodingXY.d.ts +0 -2
- package/dist/pipeline/advanced/pipes/encoding/encodingYX.d.ts +0 -2
- package/dist/pipeline/advanced/pipes/encoding/encodingYY.d.ts +0 -2
- package/dist/pipeline/advanced/pipes/i18n/index.d.ts +0 -1
- package/dist/pipeline/advanced/pipes/i18n/locale.d.ts +0 -2
- package/dist/pipeline/advanced/pipes/init/autoDimensions.d.ts +0 -2
- package/dist/pipeline/advanced/pipes/init/autoMeasures.d.ts +0 -2
- package/dist/pipeline/advanced/pipes/init/initAdvancedVSeed.d.ts +0 -2
- package/dist/pipeline/advanced/pipes/init/utils.d.ts +0 -1
- package/dist/pipeline/advanced/pipes/markStyle/markStyle.d.ts +0 -2
- package/dist/pipeline/advanced/pipes/theme/theme.d.ts +0 -2
- package/dist/pipeline/spec/pipeline/area.d.ts +0 -1
- package/dist/pipeline/spec/pipeline/areaPercent.d.ts +0 -1
- package/dist/pipeline/spec/pipeline/bar.d.ts +0 -2
- package/dist/pipeline/spec/pipeline/column.d.ts +0 -1
- package/dist/pipeline/spec/pipeline/donut.d.ts +0 -2
- package/dist/pipeline/spec/pipeline/line.d.ts +0 -2
- package/dist/pipeline/spec/pipeline/pie.d.ts +0 -2
- package/dist/pipeline/spec/pipeline/rose.d.ts +0 -1
- package/dist/pipeline/spec/pipes/index.d.ts +0 -14
- package/dist/pipeline/utils/measures/findMeasureById.d.ts +0 -3
- /package/dist/pipeline/advanced/{pipeline → chart/pipeline}/index.d.ts +0 -0
- /package/dist/pipeline/advanced/{pipes → chart/pipes}/annotation/index.d.ts +0 -0
- /package/dist/pipeline/advanced/{pipes → chart/pipes}/config/index.d.ts +0 -0
- /package/dist/pipeline/advanced/{pipes → chart/pipes}/init/index.d.ts +0 -0
- /package/dist/pipeline/advanced/{pipes → chart/pipes}/markStyle/index.d.ts +0 -0
- /package/dist/pipeline/advanced/{pipes → chart/pipes}/pivot/index.d.ts +0 -0
- /package/dist/pipeline/advanced/{pipes → chart/pipes}/reshape/index.d.ts +0 -0
- /package/dist/pipeline/advanced/{pipes → chart/pipes}/theme/index.d.ts +0 -0
- /package/dist/pipeline/spec/{pipeline → chart/pipeline}/index.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/annotation/annotationArea.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/annotation/annotationAreaBand.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/annotation/annotationHorizontalLine.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/annotation/annotationPoint.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/annotation/annotationVerticalLine.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/annotation/index.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/annotation/utils.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/axes/a.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/axes/angle.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/axes/index.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/axes/radius.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/axes/xBand.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/axes/xLinear.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/axes/yBand.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/axes/yLinear.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/backgroundColor/background.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/backgroundColor/index.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/color/color.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/color/index.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/crosshair/horizontalCrosshairLine.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/crosshair/horizontalCrosshairRect.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/crosshair/index.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/crosshair/verticalCrosshairLine.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/crosshair/verticalCrosshairRect.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/dataset/dataset.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/dataset/datasetPivot.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/dataset/index.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/init/area.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/init/bar.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/init/barParallel.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/init/column.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/init/columnParallel.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/init/donut.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/init/funnel.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/init/line.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/init/pie.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/init/pivot.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/init/rose.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/init/roseParallel.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/init/scatter.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/label/index.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/label/label.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/legend/discreteLegend.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/legend/index.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/legend/pivotDiscreteLegend.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/markStyle/areaStyle.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/markStyle/barStyle.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/markStyle/index.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/markStyle/lineStyle.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/markStyle/pointState.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/markStyle/pointStyle.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/percent/index.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/percent/percent.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/pivotChart/index.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/pivotChart/pivotAdapter.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/pivotChart/pivotColumnDimensions.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/pivotChart/pivotGridStyle.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/pivotChart/pivotIndicators.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/pivotChart/pivotRowDimensions.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/stack/index.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/stack/stack.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/stack/stackCornerRadius.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/tooltip/index.d.ts +0 -0
- /package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/tooltip/tooltip.d.ts +0 -0
- /package/dist/pipeline/{constant.d.ts → utils/constant.d.ts} +0 -0
package/dist/index.cjs
CHANGED
@@ -30,6 +30,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
30
30
|
pieAdvancedPipeline: ()=>pieAdvancedPipeline,
|
31
31
|
execPipeline: ()=>execPipeline,
|
32
32
|
areaSpecPipeline: ()=>areaSpecPipeline,
|
33
|
+
isTable: ()=>isTable,
|
33
34
|
zDonut: ()=>zDonut,
|
34
35
|
zRoseConfig: ()=>zRoseConfig,
|
35
36
|
findFirstMeasure: ()=>findFirstMeasure,
|
@@ -40,16 +41,21 @@ __webpack_require__.d(__webpack_exports__, {
|
|
40
41
|
columnPercentAdvancedPipeline: ()=>columnPercentAdvancedPipeline,
|
41
42
|
zColumnConfig: ()=>zColumnConfig,
|
42
43
|
zAnnotation: ()=>zAnnotation,
|
44
|
+
pivotTableAdvancedPipeline: ()=>pivotTableAdvancedPipeline,
|
43
45
|
zYBandAxis: ()=>zYBandAxis,
|
44
46
|
dataReshapeFor1D2M: ()=>dataReshapeFor1D2M,
|
45
47
|
zAnnotationHorizontalLine: ()=>zAnnotationHorizontalLine,
|
46
48
|
zMarkStyle: ()=>zMarkStyle,
|
47
|
-
|
49
|
+
registerFunnel: ()=>registerFunnel,
|
48
50
|
Separator: ()=>Separator,
|
51
|
+
zYLinearAxis: ()=>zYLinearAxis,
|
49
52
|
columnAdvancedPipeline: ()=>columnAdvancedPipeline,
|
50
53
|
zLabel: ()=>zLabel,
|
51
54
|
registerColumn: ()=>registerColumn,
|
55
|
+
findAllMeasures: ()=>findAllMeasures,
|
52
56
|
funnelSpecPipeline: ()=>funnelSpecPipeline,
|
57
|
+
preorderTraverse: ()=>preorderTraverse,
|
58
|
+
zDimensionTree: ()=>zDimensionTree,
|
53
59
|
roseParallelSpecPipeline: ()=>roseParallelSpecPipeline,
|
54
60
|
zLineStyle: ()=>zLineStyle,
|
55
61
|
dataReshapeFor1D1M: ()=>dataReshapeFor1D1M,
|
@@ -59,6 +65,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
59
65
|
UnfoldDimensionGroupId: ()=>UnfoldDimensionGroupId,
|
60
66
|
zNumFormat: ()=>zNumFormat,
|
61
67
|
barPercentAdvancedPipeline: ()=>barPercentAdvancedPipeline,
|
68
|
+
findAllDimensions: ()=>findAllDimensions,
|
69
|
+
findDimensionById: ()=>findDimensionById,
|
70
|
+
zPivotTableConfig: ()=>zPivotTableConfig,
|
62
71
|
zArea: ()=>zArea,
|
63
72
|
zColumnParallel: ()=>zColumnParallel,
|
64
73
|
zDimensions: ()=>zDimensions,
|
@@ -76,29 +85,39 @@ __webpack_require__.d(__webpack_exports__, {
|
|
76
85
|
zCrosshairLine: ()=>zCrosshairLine,
|
77
86
|
registerBarPercent: ()=>registerBarPercent,
|
78
87
|
roseSpecPipeline: ()=>roseSpecPipeline,
|
88
|
+
zPivotTable: ()=>zPivotTable,
|
79
89
|
registerLightTheme: ()=>registerLightTheme,
|
80
90
|
roseAdvancedPipeline: ()=>roseAdvancedPipeline,
|
81
91
|
zBarParallel: ()=>zBarParallel,
|
92
|
+
zAnnotationVerticalLine: ()=>zAnnotationVerticalLine,
|
82
93
|
zChartType: ()=>zChartType,
|
94
|
+
tableAdvancedPipeline: ()=>tableAdvancedPipeline,
|
83
95
|
registerDarkTheme: ()=>registerDarkTheme,
|
84
|
-
|
96
|
+
registerPivotTable: ()=>registerPivotTable,
|
85
97
|
pieSpecPipeline: ()=>pieSpecPipeline,
|
86
|
-
|
98
|
+
zMeasureTree: ()=>zMeasureTree,
|
87
99
|
barSpecPipeline: ()=>barSpecPipeline,
|
100
|
+
zStackCornerRadius: ()=>zStackCornerRadius,
|
101
|
+
registerRose: ()=>registerRose,
|
88
102
|
zRose: ()=>zRose,
|
89
103
|
unfoldDimensions: ()=>unfoldDimensions,
|
90
104
|
roseParallelAdvancedPipeline: ()=>roseParallelAdvancedPipeline,
|
91
|
-
|
105
|
+
registerTable: ()=>registerTable,
|
92
106
|
autoFormatter: ()=>autoFormatter,
|
107
|
+
findFirstDimension: ()=>findFirstDimension,
|
93
108
|
Builder: ()=>Builder,
|
94
|
-
registerBar: ()=>registerBar,
|
95
109
|
registerAll: ()=>registerAll,
|
110
|
+
registerBar: ()=>registerBar,
|
96
111
|
isVChart: ()=>isVChart,
|
112
|
+
zPieConfig: ()=>zPieConfig,
|
113
|
+
zTable: ()=>zTable,
|
97
114
|
registerLine: ()=>registerLine,
|
98
115
|
registerCustomTheme: ()=>registerCustomTheme,
|
99
116
|
zColor: ()=>zColor,
|
100
|
-
|
117
|
+
registerRoseParallel: ()=>registerRoseParallel,
|
118
|
+
registerDonut: ()=>registerDonut,
|
101
119
|
zDonutConfig: ()=>zDonutConfig,
|
120
|
+
zMeasureGroup: ()=>zMeasureGroup,
|
102
121
|
zUnfoldInfo: ()=>zUnfoldInfo,
|
103
122
|
zFunnelConfig: ()=>zFunnelConfig,
|
104
123
|
zMeasures: ()=>zMeasures,
|
@@ -128,6 +147,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
128
147
|
zColumn: ()=>zColumn,
|
129
148
|
zCustomTheme: ()=>zCustomTheme,
|
130
149
|
zLineConfig: ()=>zLineConfig,
|
150
|
+
zTableConfig: ()=>zTableConfig,
|
131
151
|
zXBandAxis: ()=>zXBandAxis,
|
132
152
|
zColumnPercentConfig: ()=>zColumnPercentConfig,
|
133
153
|
findMeasureById: ()=>findMeasureById,
|
@@ -138,13 +158,16 @@ __webpack_require__.d(__webpack_exports__, {
|
|
138
158
|
registerBarParallel: ()=>registerBarParallel,
|
139
159
|
zMeasure: ()=>zMeasure,
|
140
160
|
zLocale: ()=>zLocale,
|
161
|
+
pivotTableSpecPipeline: ()=>pivotTableSpecPipeline,
|
162
|
+
registerScatter: ()=>registerScatter,
|
141
163
|
zEncoding: ()=>zEncoding,
|
142
164
|
autoNumFormatter: ()=>autoNumFormatter,
|
143
165
|
zAdvancedVSeed: ()=>zAdvancedVSeed,
|
144
|
-
|
166
|
+
tableSpecPipeline: ()=>tableSpecPipeline,
|
145
167
|
zConfig: ()=>zConfig,
|
146
168
|
zRoseParallelConfig: ()=>zRoseParallelConfig,
|
147
169
|
zBarStyle: ()=>zBarStyle,
|
170
|
+
zXLinearAxis: ()=>zXLinearAxis,
|
148
171
|
zAreaPercent: ()=>zAreaPercent,
|
149
172
|
columnParallelAdvancedPipeline: ()=>columnParallelAdvancedPipeline,
|
150
173
|
zColumnPercent: ()=>zColumnPercent,
|
@@ -152,9 +175,10 @@ __webpack_require__.d(__webpack_exports__, {
|
|
152
175
|
zScatter: ()=>zScatter,
|
153
176
|
foldMeasures: ()=>foldMeasures,
|
154
177
|
dataReshapeFor2D1M: ()=>dataReshapeFor2D1M,
|
178
|
+
isPivotTable: ()=>isPivotTable,
|
179
|
+
registerPie: ()=>registerPie,
|
155
180
|
zFunnel: ()=>zFunnel,
|
156
181
|
zScatterConfig: ()=>zScatterConfig,
|
157
|
-
zTooltip: ()=>zTooltip,
|
158
182
|
zBarParallelConfig: ()=>zBarParallelConfig,
|
159
183
|
barParallelAdvancedPipeline: ()=>barParallelAdvancedPipeline,
|
160
184
|
FoldMeasureValue: ()=>FoldMeasureValue,
|
@@ -162,7 +186,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
162
186
|
barPercentSpecPipeline: ()=>barPercentSpecPipeline,
|
163
187
|
lineAdvancedPipeline: ()=>lineAdvancedPipeline,
|
164
188
|
lineSpecPipeline: ()=>lineSpecPipeline,
|
189
|
+
zTooltip: ()=>zTooltip,
|
165
190
|
createFormatter: ()=>createFormatter,
|
191
|
+
zDimensionGroup: ()=>zDimensionGroup,
|
166
192
|
columnPercentSpecPipeline: ()=>columnPercentSpecPipeline,
|
167
193
|
areaAdvancedPipeline: ()=>areaAdvancedPipeline,
|
168
194
|
areaPercentSpecPipeline: ()=>areaPercentSpecPipeline,
|
@@ -171,23 +197,27 @@ __webpack_require__.d(__webpack_exports__, {
|
|
171
197
|
});
|
172
198
|
const initAdvancedVSeed = (advancedVSeed, context)=>{
|
173
199
|
const { vseed } = context;
|
174
|
-
const { chartType } = vseed;
|
200
|
+
const { chartType, locale } = vseed;
|
175
201
|
return {
|
176
202
|
...advancedVSeed,
|
177
|
-
chartType
|
203
|
+
chartType,
|
204
|
+
locale: locale || 'zh-CN'
|
178
205
|
};
|
179
206
|
};
|
180
207
|
const execPipeline = (pipeline, context, initialValue = {})=>{
|
181
208
|
const result = pipeline.reduce((prev, cur)=>cur(prev, context), initialValue);
|
182
209
|
return result;
|
183
210
|
};
|
211
|
+
const isTable = (vseed)=>'table' === vseed.chartType;
|
212
|
+
const isPivotTable = (vseed)=>'pivotTable' === vseed.chartType;
|
184
213
|
const isVTable = (vseed)=>[
|
185
214
|
'table',
|
186
215
|
'pivotTable'
|
187
216
|
].includes(vseed.chartType);
|
188
217
|
const isVChart = (vseed)=>!isVTable(vseed);
|
189
218
|
const isPivotChart = (vseed)=>{
|
190
|
-
|
219
|
+
if (isVTable(vseed)) return false;
|
220
|
+
const { measures = [], dimensions = [] } = vseed;
|
191
221
|
const hasRowOrColumnDimension = dimensions && dimensions.some((dimension)=>'rowDimension' === dimension.location || 'columnDimension' === dimension.location);
|
192
222
|
const hasMeasureGroup = measures && measures.find((measure)=>measure && measure.children);
|
193
223
|
return hasRowOrColumnDimension || hasMeasureGroup;
|
@@ -278,32 +308,92 @@ const autoNumFormatter = (value, locale = intl.getLocale())=>{
|
|
278
308
|
};
|
279
309
|
const createFormatter = (format)=>createNumFormatter(format);
|
280
310
|
const autoFormatter = (value, locale)=>autoNumFormatter(value, locale);
|
281
|
-
const
|
282
|
-
if (!
|
311
|
+
const preorderTraverse = (tree, callback)=>{
|
312
|
+
if (!tree || 0 === tree.length) return;
|
283
313
|
const stack = [
|
284
|
-
...
|
285
|
-
];
|
314
|
+
...tree
|
315
|
+
].reverse();
|
286
316
|
while(stack.length > 0){
|
287
|
-
const
|
288
|
-
|
289
|
-
if (
|
290
|
-
if ('children' in
|
317
|
+
const node = stack.pop();
|
318
|
+
const stop = callback(node);
|
319
|
+
if (true === stop) return;
|
320
|
+
if (!('children' in node)) continue;
|
321
|
+
const children = node.children;
|
322
|
+
if (children && children.length > 0) for(let i = children.length - 1; i >= 0; i--){
|
323
|
+
const child = children[i];
|
324
|
+
stack.push(child);
|
325
|
+
}
|
291
326
|
}
|
292
327
|
};
|
328
|
+
const findMeasureById = (measures = [], id)=>{
|
329
|
+
if (!measures) return;
|
330
|
+
let result;
|
331
|
+
preorderTraverse(measures, (node)=>{
|
332
|
+
if (!('children' in node)) {
|
333
|
+
if (node.id === id) {
|
334
|
+
result = node;
|
335
|
+
return true;
|
336
|
+
}
|
337
|
+
}
|
338
|
+
return false;
|
339
|
+
});
|
340
|
+
return result;
|
341
|
+
};
|
293
342
|
const findFirstMeasure = (measures = [])=>{
|
294
343
|
if (!measures) return;
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
if (!current) continue;
|
301
|
-
if (!('children' in current)) return current;
|
302
|
-
if ('children' in current && current.children) {
|
303
|
-
const children = (current.children || []).reverse();
|
304
|
-
stack.push(...children);
|
344
|
+
let result;
|
345
|
+
preorderTraverse(measures, (node)=>{
|
346
|
+
if (!('children' in node)) {
|
347
|
+
result = node;
|
348
|
+
return true;
|
305
349
|
}
|
306
|
-
|
350
|
+
return false;
|
351
|
+
});
|
352
|
+
return result;
|
353
|
+
};
|
354
|
+
const findAllMeasures = (measures = [])=>{
|
355
|
+
if (!measures) return [];
|
356
|
+
const result = [];
|
357
|
+
preorderTraverse(measures, (node)=>{
|
358
|
+
if (!('children' in node)) result.push(node);
|
359
|
+
return false;
|
360
|
+
});
|
361
|
+
return result;
|
362
|
+
};
|
363
|
+
const findDimensionById = (dimensions = [], id)=>{
|
364
|
+
if (!dimensions) return;
|
365
|
+
let result;
|
366
|
+
preorderTraverse(dimensions, (node)=>{
|
367
|
+
if (!('children' in node)) {
|
368
|
+
if (node.id === id) {
|
369
|
+
result = node;
|
370
|
+
return true;
|
371
|
+
}
|
372
|
+
}
|
373
|
+
return false;
|
374
|
+
});
|
375
|
+
return result;
|
376
|
+
};
|
377
|
+
const findFirstDimension = (dimensions = [])=>{
|
378
|
+
if (!dimensions) return;
|
379
|
+
let result;
|
380
|
+
preorderTraverse(dimensions, (node)=>{
|
381
|
+
if (!('children' in node)) {
|
382
|
+
result = node;
|
383
|
+
return true;
|
384
|
+
}
|
385
|
+
return false;
|
386
|
+
});
|
387
|
+
return result;
|
388
|
+
};
|
389
|
+
const findAllDimensions = (dimensions = [])=>{
|
390
|
+
if (!dimensions) return [];
|
391
|
+
const result = [];
|
392
|
+
preorderTraverse(dimensions, (node)=>{
|
393
|
+
if (!('children' in node)) result.push(node);
|
394
|
+
return false;
|
395
|
+
});
|
396
|
+
return result;
|
307
397
|
};
|
308
398
|
const autoMeasures = (advancedVSeed, context)=>{
|
309
399
|
const result = {
|
@@ -382,7 +472,7 @@ const autoDimensions = (advancedVSeed, context)=>{
|
|
382
472
|
};
|
383
473
|
const { vseed } = context;
|
384
474
|
const { dimensions, dataset } = vseed;
|
385
|
-
const
|
475
|
+
const measures = findAllMeasures(advancedVSeed.measures);
|
386
476
|
if (!dataset) throw new Error('dataset is required');
|
387
477
|
if (0 === dataset.length) return result;
|
388
478
|
if (dimensions) {
|
@@ -435,7 +525,10 @@ const unfoldDimensions = (dataset, dimensions, measures, unfoldStartIndex = 0, u
|
|
435
525
|
for(let i = 0; i < dataset.length; i++){
|
436
526
|
const datum = dataset[i];
|
437
527
|
const colorName = generateDimGroupName(dimensionsToBeUnfolded, datum, dimensionsSeparator);
|
438
|
-
const colorId =
|
528
|
+
const colorId = [
|
529
|
+
colorName,
|
530
|
+
datum[foldMeasureId] || 'id'
|
531
|
+
].join(dimensionsSeparator);
|
439
532
|
datum[unfoldGroupName] = colorName;
|
440
533
|
datum[unfoldGroupId] = colorId;
|
441
534
|
colorItems.push(colorId);
|
@@ -735,7 +828,8 @@ const pivotReshapeTo1D1M = (advancedVSeed, context)=>{
|
|
735
828
|
};
|
736
829
|
const { vseed } = context;
|
737
830
|
const { dataset } = vseed;
|
738
|
-
const {
|
831
|
+
const { measures } = advancedVSeed;
|
832
|
+
const dimensions = advancedVSeed.dimensions;
|
739
833
|
if (!measures || !dimensions) return result;
|
740
834
|
const measureGroups = [];
|
741
835
|
if (measures) measures.forEach((measure)=>{
|
@@ -774,7 +868,8 @@ const pivotReshapeTo1D2M = (advancedVSeed, context)=>{
|
|
774
868
|
};
|
775
869
|
const { vseed } = context;
|
776
870
|
const { dataset } = vseed;
|
777
|
-
const {
|
871
|
+
const { measures } = advancedVSeed;
|
872
|
+
const dimensions = advancedVSeed.dimensions;
|
778
873
|
if (!measures || !dimensions) return result;
|
779
874
|
const measureGroups = [];
|
780
875
|
if (measures) measures.forEach((measure)=>{
|
@@ -813,7 +908,8 @@ const pivotReshapeTo2D1M = (advancedVSeed, context)=>{
|
|
813
908
|
};
|
814
909
|
const { vseed } = context;
|
815
910
|
const { dataset } = vseed;
|
816
|
-
const {
|
911
|
+
const { measures } = advancedVSeed;
|
912
|
+
const dimensions = advancedVSeed.dimensions;
|
817
913
|
if (!measures || !dimensions) return result;
|
818
914
|
const measureGroups = [];
|
819
915
|
if (measures) measures.forEach((measure)=>{
|
@@ -918,6 +1014,42 @@ const encodingYX = (advancedVSeed)=>{
|
|
918
1014
|
encoding
|
919
1015
|
};
|
920
1016
|
};
|
1017
|
+
const encodingYY = (advancedVSeed)=>{
|
1018
|
+
const result = {
|
1019
|
+
...advancedVSeed
|
1020
|
+
};
|
1021
|
+
const { datasetReshapeInfo, measures } = advancedVSeed;
|
1022
|
+
if (!datasetReshapeInfo || !measures) return result;
|
1023
|
+
const firstMeasure = findFirstMeasure(measures);
|
1024
|
+
const encoding = datasetReshapeInfo.reduce((prev, cur)=>{
|
1025
|
+
const { foldInfo, unfoldInfo } = cur;
|
1026
|
+
const x = [
|
1027
|
+
firstMeasure?.id
|
1028
|
+
];
|
1029
|
+
const y = [
|
1030
|
+
foldInfo.measureValue
|
1031
|
+
];
|
1032
|
+
const group = [
|
1033
|
+
unfoldInfo.groupId
|
1034
|
+
];
|
1035
|
+
const color = [
|
1036
|
+
unfoldInfo.groupId
|
1037
|
+
];
|
1038
|
+
return [
|
1039
|
+
...prev,
|
1040
|
+
{
|
1041
|
+
x,
|
1042
|
+
y,
|
1043
|
+
group,
|
1044
|
+
color
|
1045
|
+
}
|
1046
|
+
];
|
1047
|
+
}, []);
|
1048
|
+
return {
|
1049
|
+
...result,
|
1050
|
+
encoding
|
1051
|
+
};
|
1052
|
+
};
|
921
1053
|
const encodingRose = (advancedVSeed)=>{
|
922
1054
|
const result = {
|
923
1055
|
...advancedVSeed
|
@@ -1158,17 +1290,8 @@ const annotation_annotation = (advancedVSeed, context)=>{
|
|
1158
1290
|
annotation
|
1159
1291
|
};
|
1160
1292
|
};
|
1161
|
-
const locale_locale = (advancedVSeed, context)=>{
|
1162
|
-
const { vseed } = context;
|
1163
|
-
const { locale } = vseed;
|
1164
|
-
return {
|
1165
|
-
...advancedVSeed,
|
1166
|
-
locale: locale || 'zh-CN'
|
1167
|
-
};
|
1168
|
-
};
|
1169
1293
|
const lineAdvancedPipeline = [
|
1170
1294
|
initAdvancedVSeed,
|
1171
|
-
locale_locale,
|
1172
1295
|
autoMeasures,
|
1173
1296
|
autoDimensions,
|
1174
1297
|
pivotAdapter([
|
@@ -1184,7 +1307,6 @@ const lineAdvancedPipeline = [
|
|
1184
1307
|
];
|
1185
1308
|
const barAdvancedPipeline = [
|
1186
1309
|
initAdvancedVSeed,
|
1187
|
-
locale_locale,
|
1188
1310
|
autoMeasures,
|
1189
1311
|
autoDimensions,
|
1190
1312
|
pivotAdapter([
|
@@ -1200,7 +1322,6 @@ const barAdvancedPipeline = [
|
|
1200
1322
|
];
|
1201
1323
|
const barParallelAdvancedPipeline = [
|
1202
1324
|
initAdvancedVSeed,
|
1203
|
-
locale_locale,
|
1204
1325
|
autoMeasures,
|
1205
1326
|
autoDimensions,
|
1206
1327
|
pivotAdapter([
|
@@ -1216,7 +1337,6 @@ const barParallelAdvancedPipeline = [
|
|
1216
1337
|
];
|
1217
1338
|
const barPercentAdvancedPipeline = [
|
1218
1339
|
initAdvancedVSeed,
|
1219
|
-
locale_locale,
|
1220
1340
|
autoMeasures,
|
1221
1341
|
autoDimensions,
|
1222
1342
|
pivotAdapter([
|
@@ -1232,7 +1352,6 @@ const barPercentAdvancedPipeline = [
|
|
1232
1352
|
];
|
1233
1353
|
const columnAdvancedPipeline = [
|
1234
1354
|
initAdvancedVSeed,
|
1235
|
-
locale_locale,
|
1236
1355
|
autoMeasures,
|
1237
1356
|
autoDimensions,
|
1238
1357
|
pivotAdapter([
|
@@ -1248,7 +1367,6 @@ const columnAdvancedPipeline = [
|
|
1248
1367
|
];
|
1249
1368
|
const columnParallelAdvancedPipeline = [
|
1250
1369
|
initAdvancedVSeed,
|
1251
|
-
locale_locale,
|
1252
1370
|
autoMeasures,
|
1253
1371
|
autoDimensions,
|
1254
1372
|
pivotAdapter([
|
@@ -1264,7 +1382,6 @@ const columnParallelAdvancedPipeline = [
|
|
1264
1382
|
];
|
1265
1383
|
const columnPercentAdvancedPipeline = [
|
1266
1384
|
initAdvancedVSeed,
|
1267
|
-
locale_locale,
|
1268
1385
|
autoMeasures,
|
1269
1386
|
autoDimensions,
|
1270
1387
|
pivotAdapter([
|
@@ -1280,7 +1397,6 @@ const columnPercentAdvancedPipeline = [
|
|
1280
1397
|
];
|
1281
1398
|
const areaAdvancedPipeline = [
|
1282
1399
|
initAdvancedVSeed,
|
1283
|
-
locale_locale,
|
1284
1400
|
autoMeasures,
|
1285
1401
|
autoDimensions,
|
1286
1402
|
pivotAdapter([
|
@@ -1296,7 +1412,6 @@ const areaAdvancedPipeline = [
|
|
1296
1412
|
];
|
1297
1413
|
const areaPercentAdvancedPipeline = [
|
1298
1414
|
initAdvancedVSeed,
|
1299
|
-
locale_locale,
|
1300
1415
|
autoMeasures,
|
1301
1416
|
autoDimensions,
|
1302
1417
|
pivotAdapter([
|
@@ -1312,7 +1427,6 @@ const areaPercentAdvancedPipeline = [
|
|
1312
1427
|
];
|
1313
1428
|
const pieAdvancedPipeline = [
|
1314
1429
|
initAdvancedVSeed,
|
1315
|
-
locale_locale,
|
1316
1430
|
autoMeasures,
|
1317
1431
|
autoDimensions,
|
1318
1432
|
pivotAdapter([
|
@@ -1327,7 +1441,6 @@ const pieAdvancedPipeline = [
|
|
1327
1441
|
];
|
1328
1442
|
const donutAdvancedPipeline = [
|
1329
1443
|
initAdvancedVSeed,
|
1330
|
-
locale_locale,
|
1331
1444
|
autoMeasures,
|
1332
1445
|
autoDimensions,
|
1333
1446
|
pivotAdapter([
|
@@ -1342,7 +1455,6 @@ const donutAdvancedPipeline = [
|
|
1342
1455
|
];
|
1343
1456
|
const roseAdvancedPipeline = [
|
1344
1457
|
initAdvancedVSeed,
|
1345
|
-
locale_locale,
|
1346
1458
|
autoMeasures,
|
1347
1459
|
autoDimensions,
|
1348
1460
|
pivotAdapter([
|
@@ -1358,7 +1470,6 @@ const roseAdvancedPipeline = [
|
|
1358
1470
|
];
|
1359
1471
|
const roseParallelAdvancedPipeline = [
|
1360
1472
|
initAdvancedVSeed,
|
1361
|
-
locale_locale,
|
1362
1473
|
autoMeasures,
|
1363
1474
|
autoDimensions,
|
1364
1475
|
pivotAdapter([
|
@@ -1374,7 +1485,6 @@ const roseParallelAdvancedPipeline = [
|
|
1374
1485
|
];
|
1375
1486
|
const funnelAdvancedPipeline = [
|
1376
1487
|
initAdvancedVSeed,
|
1377
|
-
locale_locale,
|
1378
1488
|
autoMeasures,
|
1379
1489
|
autoDimensions,
|
1380
1490
|
pivotAdapter([
|
@@ -1387,45 +1497,8 @@ const funnelAdvancedPipeline = [
|
|
1387
1497
|
theme_theme,
|
1388
1498
|
annotation_annotation
|
1389
1499
|
];
|
1390
|
-
const encodingYY = (advancedVSeed)=>{
|
1391
|
-
const result = {
|
1392
|
-
...advancedVSeed
|
1393
|
-
};
|
1394
|
-
const { datasetReshapeInfo, measures } = advancedVSeed;
|
1395
|
-
if (!datasetReshapeInfo || !measures) return result;
|
1396
|
-
const firstMeasure = findFirstMeasure(measures);
|
1397
|
-
const encoding = datasetReshapeInfo.reduce((prev, cur)=>{
|
1398
|
-
const { foldInfo, unfoldInfo } = cur;
|
1399
|
-
const x = [
|
1400
|
-
firstMeasure?.id
|
1401
|
-
];
|
1402
|
-
const y = [
|
1403
|
-
foldInfo.measureValue
|
1404
|
-
];
|
1405
|
-
const group = [
|
1406
|
-
unfoldInfo.groupId
|
1407
|
-
];
|
1408
|
-
const color = [
|
1409
|
-
unfoldInfo.groupId
|
1410
|
-
];
|
1411
|
-
return [
|
1412
|
-
...prev,
|
1413
|
-
{
|
1414
|
-
x,
|
1415
|
-
y,
|
1416
|
-
group,
|
1417
|
-
color
|
1418
|
-
}
|
1419
|
-
];
|
1420
|
-
}, []);
|
1421
|
-
return {
|
1422
|
-
...result,
|
1423
|
-
encoding
|
1424
|
-
};
|
1425
|
-
};
|
1426
1500
|
const scatterAdvancedPipeline = [
|
1427
1501
|
initAdvancedVSeed,
|
1428
|
-
locale_locale,
|
1429
1502
|
autoMeasures,
|
1430
1503
|
autoDimensions,
|
1431
1504
|
pivotAdapter([
|
@@ -1439,6 +1512,158 @@ const scatterAdvancedPipeline = [
|
|
1439
1512
|
markStyle_markStyle,
|
1440
1513
|
annotation_annotation
|
1441
1514
|
];
|
1515
|
+
const autoMeasures_autoMeasures = (advancedVSeed, context)=>{
|
1516
|
+
const result = {
|
1517
|
+
...advancedVSeed
|
1518
|
+
};
|
1519
|
+
const { vseed } = context;
|
1520
|
+
const { measures, dataset } = vseed;
|
1521
|
+
if (!dataset) throw new Error('dataset is required');
|
1522
|
+
if (0 === dataset.length) return result;
|
1523
|
+
if (measures && measures.length > 0) {
|
1524
|
+
result.measures = measures;
|
1525
|
+
return result;
|
1526
|
+
}
|
1527
|
+
const top100dataset = dataset.slice(0, 100);
|
1528
|
+
const sample = top100dataset.reduce((prev, cur)=>({
|
1529
|
+
...prev,
|
1530
|
+
...cur
|
1531
|
+
}), {});
|
1532
|
+
result.measures = Object.keys(sample).filter((key)=>top100dataset.some((item)=>'number' == typeof item[key]) && ![
|
1533
|
+
'',
|
1534
|
+
null,
|
1535
|
+
void 0
|
1536
|
+
].includes(key)).map((measure)=>({
|
1537
|
+
id: measure,
|
1538
|
+
alias: measure
|
1539
|
+
}));
|
1540
|
+
return result;
|
1541
|
+
};
|
1542
|
+
const autoDimensions_autoDimensions = (advancedVSeed, context)=>{
|
1543
|
+
const result = {
|
1544
|
+
...advancedVSeed
|
1545
|
+
};
|
1546
|
+
const { vseed } = context;
|
1547
|
+
const { dimensions, dataset } = vseed;
|
1548
|
+
const measures = findAllMeasures(advancedVSeed.measures);
|
1549
|
+
if (!dataset) throw new Error('dataset is required');
|
1550
|
+
if (0 === dataset.length) return result;
|
1551
|
+
if (dimensions && dimensions.length > 0) {
|
1552
|
+
result.dimensions = dimensions;
|
1553
|
+
return result;
|
1554
|
+
}
|
1555
|
+
const top100dataset = dataset.slice(0, 100);
|
1556
|
+
const sample = top100dataset.reduce((prev, cur)=>({
|
1557
|
+
...prev,
|
1558
|
+
...cur
|
1559
|
+
}), {});
|
1560
|
+
result.dimensions = Object.keys(sample).filter((key)=>top100dataset.some((item)=>'string' == typeof item[key]) && ![
|
1561
|
+
'',
|
1562
|
+
null,
|
1563
|
+
void 0
|
1564
|
+
].includes(key) && !measures.some((measure)=>measure.id === key)).map((dim)=>({
|
1565
|
+
id: dim,
|
1566
|
+
alias: dim,
|
1567
|
+
location: 'dimension'
|
1568
|
+
}));
|
1569
|
+
return result;
|
1570
|
+
};
|
1571
|
+
const autoPivotDimensions = (advancedVSeed, context)=>{
|
1572
|
+
const result = {
|
1573
|
+
...advancedVSeed
|
1574
|
+
};
|
1575
|
+
const { vseed } = context;
|
1576
|
+
const { dimensions, dataset } = vseed;
|
1577
|
+
const measures = findAllMeasures(advancedVSeed.measures);
|
1578
|
+
if (!dataset) throw new Error('dataset is required');
|
1579
|
+
if (0 === dataset.length) return result;
|
1580
|
+
if (dimensions && dimensions.length > 0) {
|
1581
|
+
const newDimensions = findAllDimensions(dimensions);
|
1582
|
+
result.dimensions = newDimensions.map((item, index)=>{
|
1583
|
+
if ('rowDimension' === item.location || 'columnDimension' === item.location) return item;
|
1584
|
+
return {
|
1585
|
+
...item,
|
1586
|
+
location: index % 2 === 0 ? 'columnDimension' : 'rowDimension'
|
1587
|
+
};
|
1588
|
+
});
|
1589
|
+
return result;
|
1590
|
+
}
|
1591
|
+
const top100dataset = dataset.slice(0, 100);
|
1592
|
+
const sample = top100dataset.reduce((prev, cur)=>({
|
1593
|
+
...prev,
|
1594
|
+
...cur
|
1595
|
+
}), {});
|
1596
|
+
let i = 0;
|
1597
|
+
result.dimensions = Object.keys(sample).filter((key)=>top100dataset.some((item)=>'string' == typeof item[key]) && ![
|
1598
|
+
'',
|
1599
|
+
null,
|
1600
|
+
void 0
|
1601
|
+
].includes(key) && !measures.some((measure)=>measure.id === key)).map((dim)=>({
|
1602
|
+
id: dim,
|
1603
|
+
alias: dim,
|
1604
|
+
location: i++ % 2 === 0 ? 'columnDimension' : 'rowDimension'
|
1605
|
+
}));
|
1606
|
+
return result;
|
1607
|
+
};
|
1608
|
+
const autoPivotMeasures = (advancedVSeed, context)=>{
|
1609
|
+
const result = {
|
1610
|
+
...advancedVSeed
|
1611
|
+
};
|
1612
|
+
const { vseed } = context;
|
1613
|
+
const { dataset } = vseed;
|
1614
|
+
const measures = findAllMeasures(vseed.measures);
|
1615
|
+
if (!dataset) throw new Error('dataset is required');
|
1616
|
+
if (0 === dataset.length) return result;
|
1617
|
+
if (measures && measures.length > 0) {
|
1618
|
+
result.measures = findAllMeasures(measures);
|
1619
|
+
return result;
|
1620
|
+
}
|
1621
|
+
const top100dataset = dataset.slice(0, 100);
|
1622
|
+
const sample = top100dataset.reduce((prev, cur)=>({
|
1623
|
+
...prev,
|
1624
|
+
...cur
|
1625
|
+
}), {});
|
1626
|
+
result.measures = Object.keys(sample).filter((key)=>top100dataset.some((item)=>'number' == typeof item[key]) && ![
|
1627
|
+
'',
|
1628
|
+
null,
|
1629
|
+
void 0
|
1630
|
+
].includes(key)).map((measure)=>({
|
1631
|
+
id: measure,
|
1632
|
+
alias: measure
|
1633
|
+
}));
|
1634
|
+
return result;
|
1635
|
+
};
|
1636
|
+
const initAdvancedVSeed_initAdvancedVSeed = (advancedVSeed, context)=>{
|
1637
|
+
const { vseed } = context;
|
1638
|
+
const { chartType, locale } = vseed;
|
1639
|
+
return {
|
1640
|
+
...advancedVSeed,
|
1641
|
+
chartType,
|
1642
|
+
locale: locale || 'zh-CN'
|
1643
|
+
};
|
1644
|
+
};
|
1645
|
+
const records_records = (advancedVSeed, context)=>{
|
1646
|
+
const { vseed } = context;
|
1647
|
+
const { dataset } = vseed;
|
1648
|
+
return {
|
1649
|
+
...advancedVSeed,
|
1650
|
+
dataset
|
1651
|
+
};
|
1652
|
+
};
|
1653
|
+
const pivotTableAdvancedPipeline = [
|
1654
|
+
initAdvancedVSeed_initAdvancedVSeed,
|
1655
|
+
autoPivotMeasures,
|
1656
|
+
autoPivotDimensions,
|
1657
|
+
records_records,
|
1658
|
+
theme_theme
|
1659
|
+
];
|
1660
|
+
const tableAdvancedPipeline = [
|
1661
|
+
initAdvancedVSeed_initAdvancedVSeed,
|
1662
|
+
autoMeasures_autoMeasures,
|
1663
|
+
autoDimensions_autoDimensions,
|
1664
|
+
records_records,
|
1665
|
+
theme_theme
|
1666
|
+
];
|
1442
1667
|
const dataset_dataset = (spec, context)=>{
|
1443
1668
|
const { advancedVSeed } = context;
|
1444
1669
|
const { encoding } = advancedVSeed;
|
@@ -1816,6 +2041,27 @@ const initFunnel = (spec, context)=>{
|
|
1816
2041
|
result.animation = true;
|
1817
2042
|
return result;
|
1818
2043
|
};
|
2044
|
+
const initScatter = (spec, context)=>{
|
2045
|
+
const result = {
|
2046
|
+
...spec
|
2047
|
+
};
|
2048
|
+
const { advancedVSeed } = context;
|
2049
|
+
const { encoding } = advancedVSeed;
|
2050
|
+
if (!encoding[0].y || !encoding[0].x || !encoding[0].group) return result;
|
2051
|
+
result.type = 'scatter';
|
2052
|
+
result.direction = 'vertical';
|
2053
|
+
result.xField = encoding[0].x[0];
|
2054
|
+
result.yField = encoding[0].y[0];
|
2055
|
+
result.seriesField = encoding[0].group[0];
|
2056
|
+
result.padding = 0;
|
2057
|
+
result.region = [
|
2058
|
+
{
|
2059
|
+
clip: true
|
2060
|
+
}
|
2061
|
+
];
|
2062
|
+
result.animation = true;
|
2063
|
+
return result;
|
2064
|
+
};
|
1819
2065
|
const xBand = (spec, context)=>{
|
1820
2066
|
const result = {
|
1821
2067
|
...spec
|
@@ -2811,7 +3057,7 @@ const pivotColumnDimensions = (spec, context)=>{
|
|
2811
3057
|
...spec
|
2812
3058
|
};
|
2813
3059
|
const { advancedVSeed } = context;
|
2814
|
-
const
|
3060
|
+
const dimensions = advancedVSeed.dimensions;
|
2815
3061
|
if (!dimensions) return result;
|
2816
3062
|
const columnDimensions = dimensions.filter((dim)=>'columnDimension' === dim.location);
|
2817
3063
|
const columns = columnDimensions.map((dim)=>({
|
@@ -2828,7 +3074,7 @@ const pivotRowDimensions = (spec, context)=>{
|
|
2828
3074
|
...spec
|
2829
3075
|
};
|
2830
3076
|
const { advancedVSeed } = context;
|
2831
|
-
const
|
3077
|
+
const dimensions = advancedVSeed.dimensions;
|
2832
3078
|
if (!dimensions) return result;
|
2833
3079
|
const rowDimensions = dimensions.filter((dim)=>'rowDimension' === dim.location);
|
2834
3080
|
const rows = rowDimensions.map((dim)=>({
|
@@ -4465,27 +4711,6 @@ const pivotFunnel = [
|
|
4465
4711
|
const funnelSpecPipeline = [
|
4466
4712
|
pivotAdapter_pivotAdapter(funnel, pivotFunnel)
|
4467
4713
|
];
|
4468
|
-
const initScatter = (spec, context)=>{
|
4469
|
-
const result = {
|
4470
|
-
...spec
|
4471
|
-
};
|
4472
|
-
const { advancedVSeed } = context;
|
4473
|
-
const { encoding } = advancedVSeed;
|
4474
|
-
if (!encoding[0].y || !encoding[0].x || !encoding[0].group) return result;
|
4475
|
-
result.type = 'scatter';
|
4476
|
-
result.direction = 'vertical';
|
4477
|
-
result.xField = encoding[0].x[0];
|
4478
|
-
result.yField = encoding[0].y[0];
|
4479
|
-
result.seriesField = encoding[0].group[0];
|
4480
|
-
result.padding = 0;
|
4481
|
-
result.region = [
|
4482
|
-
{
|
4483
|
-
clip: true
|
4484
|
-
}
|
4485
|
-
];
|
4486
|
-
result.animation = true;
|
4487
|
-
return result;
|
4488
|
-
};
|
4489
4714
|
const scatter = [
|
4490
4715
|
initScatter,
|
4491
4716
|
color_color,
|
@@ -4535,6 +4760,426 @@ const pivotScatter = [
|
|
4535
4760
|
const scatterSpecPipeline = [
|
4536
4761
|
pivotAdapter_pivotAdapter(scatter, pivotScatter)
|
4537
4762
|
];
|
4763
|
+
const initTable = (spec, context)=>{
|
4764
|
+
const { advancedVSeed } = context;
|
4765
|
+
const { dataset } = advancedVSeed;
|
4766
|
+
return {
|
4767
|
+
...spec,
|
4768
|
+
records: dataset,
|
4769
|
+
widthMode: 'standard',
|
4770
|
+
heightMode: 'autoHeight',
|
4771
|
+
autoWrapText: true,
|
4772
|
+
columnResizeMode: 'all',
|
4773
|
+
showHeader: true,
|
4774
|
+
tooltip: {
|
4775
|
+
isShowOverflowTextTooltip: true
|
4776
|
+
},
|
4777
|
+
animationAppear: {
|
4778
|
+
duration: 300,
|
4779
|
+
delay: 250,
|
4780
|
+
type: 'one-by-one',
|
4781
|
+
direction: 'row'
|
4782
|
+
},
|
4783
|
+
theme: {
|
4784
|
+
underlayBackgroundColor: 'transparent'
|
4785
|
+
}
|
4786
|
+
};
|
4787
|
+
};
|
4788
|
+
const initPivotTable = (spec, context)=>{
|
4789
|
+
const { advancedVSeed } = context;
|
4790
|
+
const { dataset } = advancedVSeed;
|
4791
|
+
return {
|
4792
|
+
...spec,
|
4793
|
+
records: dataset,
|
4794
|
+
widthMode: 'standard',
|
4795
|
+
heightMode: 'autoHeight',
|
4796
|
+
autoWrapText: true,
|
4797
|
+
columnResizeMode: 'all',
|
4798
|
+
columnResizeType: 'column',
|
4799
|
+
showColumnHeader: true,
|
4800
|
+
showRowHeader: true,
|
4801
|
+
select: {
|
4802
|
+
highlightMode: 'cell',
|
4803
|
+
headerSelectMode: 'inline'
|
4804
|
+
},
|
4805
|
+
hover: {
|
4806
|
+
highlightMode: 'cross'
|
4807
|
+
},
|
4808
|
+
tooltip: {
|
4809
|
+
isShowOverflowTextTooltip: true
|
4810
|
+
},
|
4811
|
+
widthAdaptiveMode: 'all',
|
4812
|
+
animationAppear: {
|
4813
|
+
duration: 300,
|
4814
|
+
delay: 250,
|
4815
|
+
type: 'one-by-one',
|
4816
|
+
direction: 'row'
|
4817
|
+
},
|
4818
|
+
theme: {
|
4819
|
+
underlayBackgroundColor: 'transparent'
|
4820
|
+
}
|
4821
|
+
};
|
4822
|
+
};
|
4823
|
+
const measureTreeToColumns = (spec, context)=>{
|
4824
|
+
const { advancedVSeed } = context;
|
4825
|
+
const measures = advancedVSeed.measures;
|
4826
|
+
const result = {
|
4827
|
+
...spec
|
4828
|
+
};
|
4829
|
+
const eachNode = (node)=>{
|
4830
|
+
if ('children' in node) return {};
|
4831
|
+
return {
|
4832
|
+
width: 'auto'
|
4833
|
+
};
|
4834
|
+
};
|
4835
|
+
const columns = treeTreeToColumns(measures, eachNode);
|
4836
|
+
return {
|
4837
|
+
...result,
|
4838
|
+
columns: [
|
4839
|
+
...result.columns || [],
|
4840
|
+
...columns
|
4841
|
+
]
|
4842
|
+
};
|
4843
|
+
};
|
4844
|
+
const dimensionTreeToColumns = (spec, context)=>{
|
4845
|
+
const { advancedVSeed } = context;
|
4846
|
+
const dimensions = advancedVSeed.dimensions;
|
4847
|
+
const result = {
|
4848
|
+
...spec
|
4849
|
+
};
|
4850
|
+
const eachNode = (node)=>{
|
4851
|
+
if ('children' in node) return {};
|
4852
|
+
return {
|
4853
|
+
width: 'auto'
|
4854
|
+
};
|
4855
|
+
};
|
4856
|
+
const columns = treeTreeToColumns(dimensions, eachNode);
|
4857
|
+
return {
|
4858
|
+
...result,
|
4859
|
+
columns: [
|
4860
|
+
...result.columns || [],
|
4861
|
+
...columns
|
4862
|
+
]
|
4863
|
+
};
|
4864
|
+
};
|
4865
|
+
const treeTreeToColumns = (tree, callback)=>{
|
4866
|
+
const result = tree.map((item)=>{
|
4867
|
+
if ('children' in item && Array.isArray(item.children)) {
|
4868
|
+
const groupNode = item;
|
4869
|
+
const field = groupNode.id;
|
4870
|
+
const title = groupNode.alias ?? groupNode.id;
|
4871
|
+
const props = callback?.(groupNode) || {};
|
4872
|
+
return {
|
4873
|
+
field,
|
4874
|
+
title,
|
4875
|
+
columns: treeTreeToColumns(item.children, callback),
|
4876
|
+
...props
|
4877
|
+
};
|
4878
|
+
}
|
4879
|
+
{
|
4880
|
+
const field = item.id;
|
4881
|
+
const title = item.alias ?? item.id;
|
4882
|
+
const props = callback?.(item) || {};
|
4883
|
+
return {
|
4884
|
+
field,
|
4885
|
+
title,
|
4886
|
+
...props
|
4887
|
+
};
|
4888
|
+
}
|
4889
|
+
});
|
4890
|
+
return result || [];
|
4891
|
+
};
|
4892
|
+
const pivotColumns = (spec, context)=>{
|
4893
|
+
const { advancedVSeed } = context;
|
4894
|
+
const dimensions = advancedVSeed.dimensions;
|
4895
|
+
const columns = dimensions.filter((item)=>'columnDimension' === item['location']);
|
4896
|
+
return {
|
4897
|
+
...spec,
|
4898
|
+
columns: columns.map((item)=>({
|
4899
|
+
dimensionKey: item.id,
|
4900
|
+
title: item.alias || item.id,
|
4901
|
+
width: 'auto'
|
4902
|
+
}))
|
4903
|
+
};
|
4904
|
+
};
|
4905
|
+
const pivotRows = (spec, context)=>{
|
4906
|
+
const { advancedVSeed } = context;
|
4907
|
+
const dimensions = advancedVSeed.dimensions;
|
4908
|
+
const rows = dimensions.filter((item)=>'rowDimension' === item['location']);
|
4909
|
+
return {
|
4910
|
+
...spec,
|
4911
|
+
rows: rows.map((item)=>({
|
4912
|
+
dimensionKey: item.id,
|
4913
|
+
title: item.alias || item.id,
|
4914
|
+
width: 'auto'
|
4915
|
+
}))
|
4916
|
+
};
|
4917
|
+
};
|
4918
|
+
const pivotIndicators_pivotIndicators = (spec, context)=>{
|
4919
|
+
const { advancedVSeed } = context;
|
4920
|
+
const measures = advancedVSeed.measures;
|
4921
|
+
return {
|
4922
|
+
...spec,
|
4923
|
+
indicatorsAsCol: true,
|
4924
|
+
indicatorTitle: intl.i18n`指标名称`,
|
4925
|
+
indicators: measures.map((item)=>({
|
4926
|
+
cellType: 'text',
|
4927
|
+
indicatorKey: item.id,
|
4928
|
+
title: item.alias || item.id,
|
4929
|
+
width: 'auto'
|
4930
|
+
}))
|
4931
|
+
};
|
4932
|
+
};
|
4933
|
+
const external_d3_color_namespaceObject = require("d3-color");
|
4934
|
+
const bodyStyle = (spec, context)=>{
|
4935
|
+
const result = {
|
4936
|
+
...spec
|
4937
|
+
};
|
4938
|
+
const { advancedVSeed } = context;
|
4939
|
+
const { customTheme, chartType } = advancedVSeed;
|
4940
|
+
const themConfig = customTheme?.config?.[chartType];
|
4941
|
+
if (!result.theme || !themConfig) return result;
|
4942
|
+
const borderColor = themConfig.borderColor || 'rgb(224, 224, 224)';
|
4943
|
+
const backgroundColor = themConfig.bodyBackgroundColor || '#fff';
|
4944
|
+
const fontColor = themConfig.bodyFontColor || '#1B1F23';
|
4945
|
+
const fontSize = themConfig.bodyFontSize || 12;
|
4946
|
+
const hoverCellBgColor = themConfig.hoverBodyBackgroundColor || '#bedaff';
|
4947
|
+
const hoverInlineColor = (0, external_d3_color_namespaceObject.color)(hoverCellBgColor)?.copy({
|
4948
|
+
opacity: 0.1
|
4949
|
+
}).toString();
|
4950
|
+
result.theme.bodyStyle = {
|
4951
|
+
borderColor: borderColor,
|
4952
|
+
borderLineWidth: 1,
|
4953
|
+
padding: [
|
4954
|
+
8.6,
|
4955
|
+
12,
|
4956
|
+
8.6,
|
4957
|
+
12
|
4958
|
+
],
|
4959
|
+
textAlign: 'right',
|
4960
|
+
hover: {
|
4961
|
+
cellBgColor: hoverCellBgColor,
|
4962
|
+
inlineRowBgColor: hoverInlineColor,
|
4963
|
+
inlineColumnBgColor: hoverInlineColor
|
4964
|
+
},
|
4965
|
+
color: fontColor,
|
4966
|
+
fontSize: fontSize,
|
4967
|
+
fontStyle: 'normal',
|
4968
|
+
fontWeight: 'normal',
|
4969
|
+
fontVariant: 'normal',
|
4970
|
+
bgColor: backgroundColor,
|
4971
|
+
lineHeight: 1.5 * fontSize
|
4972
|
+
};
|
4973
|
+
return result;
|
4974
|
+
};
|
4975
|
+
const headerStyle = (spec, context)=>{
|
4976
|
+
const result = {
|
4977
|
+
...spec
|
4978
|
+
};
|
4979
|
+
const { advancedVSeed } = context;
|
4980
|
+
const { customTheme, chartType } = advancedVSeed;
|
4981
|
+
const themConfig = customTheme?.config?.[chartType];
|
4982
|
+
if (!result.theme || !themConfig) return result;
|
4983
|
+
const borderColor = themConfig.borderColor || 'rgb(224, 224, 224)';
|
4984
|
+
const backgroundColor = themConfig.headerBackgroundColor || '#EEF1F5';
|
4985
|
+
const fontColor = themConfig.headerFontColor || '#1B1F23';
|
4986
|
+
const fontSize = themConfig.headerFontSize || 12;
|
4987
|
+
const hoverCellBgColor = themConfig.hoverHeaderBackgroundColor || '#bedaff';
|
4988
|
+
const hoverInlineColor = themConfig.hoverHeaderBackgroundColor;
|
4989
|
+
result.theme.headerStyle = {
|
4990
|
+
borderColor: borderColor,
|
4991
|
+
borderLineWidth: 1,
|
4992
|
+
padding: [
|
4993
|
+
8,
|
4994
|
+
12,
|
4995
|
+
8,
|
4996
|
+
12
|
4997
|
+
],
|
4998
|
+
textAlign: 'center',
|
4999
|
+
hover: {
|
5000
|
+
cellBgColor: (0, external_d3_color_namespaceObject.color)(hoverCellBgColor)?.copy({
|
5001
|
+
opacity: 1
|
5002
|
+
}).brighter(0.5).toString(),
|
5003
|
+
inlineRowBgColor: hoverInlineColor,
|
5004
|
+
inlineColumnBgColor: hoverInlineColor
|
5005
|
+
},
|
5006
|
+
frameStyle: {
|
5007
|
+
borderColor: [
|
5008
|
+
null,
|
5009
|
+
null,
|
5010
|
+
borderColor,
|
5011
|
+
null
|
5012
|
+
],
|
5013
|
+
borderLineWidth: 1
|
5014
|
+
},
|
5015
|
+
fontSize: fontSize,
|
5016
|
+
fontVariant: 'normal',
|
5017
|
+
fontStyle: 'normal',
|
5018
|
+
fontWeight: 'bold',
|
5019
|
+
color: fontColor,
|
5020
|
+
bgColor: backgroundColor,
|
5021
|
+
lineHeight: 1.5 * fontSize
|
5022
|
+
};
|
5023
|
+
return result;
|
5024
|
+
};
|
5025
|
+
const rowHeaderStyle = (spec, context)=>{
|
5026
|
+
const result = {
|
5027
|
+
...spec
|
5028
|
+
};
|
5029
|
+
const { advancedVSeed } = context;
|
5030
|
+
const { customTheme, chartType } = advancedVSeed;
|
5031
|
+
const themConfig = customTheme?.config?.[chartType];
|
5032
|
+
if (!result.theme || !themConfig) return result;
|
5033
|
+
const borderColor = themConfig.borderColor || 'rgb(224, 224, 224)';
|
5034
|
+
const backgroundColor = themConfig.headerBackgroundColor || '#EEF1F5';
|
5035
|
+
const fontColor = themConfig.headerFontColor || '#1B1F23';
|
5036
|
+
const fontSize = themConfig.headerFontSize || 12;
|
5037
|
+
const hoverCellBgColor = themConfig.hoverHeaderBackgroundColor || '#bedaff';
|
5038
|
+
const hoverInlineColor = themConfig.hoverHeaderBackgroundColor;
|
5039
|
+
result.theme.rowHeaderStyle = {
|
5040
|
+
borderColor: borderColor,
|
5041
|
+
borderLineWidth: 1,
|
5042
|
+
padding: [
|
5043
|
+
8.6,
|
5044
|
+
12,
|
5045
|
+
8.6,
|
5046
|
+
12
|
5047
|
+
],
|
5048
|
+
textAlign: 'left',
|
5049
|
+
hover: {
|
5050
|
+
cellBgColor: (0, external_d3_color_namespaceObject.color)(hoverCellBgColor)?.copy({
|
5051
|
+
opacity: 1
|
5052
|
+
}).brighter(0.5).toString(),
|
5053
|
+
inlineRowBgColor: hoverInlineColor,
|
5054
|
+
inlineColumnBgColor: hoverInlineColor
|
5055
|
+
},
|
5056
|
+
frameStyle: {
|
5057
|
+
borderColor: [
|
5058
|
+
null,
|
5059
|
+
borderColor,
|
5060
|
+
null,
|
5061
|
+
null
|
5062
|
+
],
|
5063
|
+
borderLineWidth: 1
|
5064
|
+
},
|
5065
|
+
fontSize: fontSize,
|
5066
|
+
fontVariant: 'normal',
|
5067
|
+
fontStyle: 'normal',
|
5068
|
+
fontWeight: 'bold',
|
5069
|
+
color: fontColor,
|
5070
|
+
bgColor: backgroundColor,
|
5071
|
+
lineHeight: 1.5 * fontSize
|
5072
|
+
};
|
5073
|
+
return result;
|
5074
|
+
};
|
5075
|
+
const cornerHeaderStyle = (spec, context)=>{
|
5076
|
+
const result = {
|
5077
|
+
...spec
|
5078
|
+
};
|
5079
|
+
const { advancedVSeed } = context;
|
5080
|
+
const { customTheme, chartType } = advancedVSeed;
|
5081
|
+
const themConfig = customTheme?.config?.[chartType];
|
5082
|
+
if (!result.theme || !themConfig) return result;
|
5083
|
+
const borderColor = themConfig.borderColor || 'rgb(224, 224, 224)';
|
5084
|
+
const backgroundColor = themConfig.headerBackgroundColor || '#EEF1F5';
|
5085
|
+
const fontColor = themConfig.headerFontColor || '#1B1F23';
|
5086
|
+
const fontSize = themConfig.headerFontSize || 12;
|
5087
|
+
const hoverCellBgColor = themConfig.hoverHeaderBackgroundColor || '#bedaff';
|
5088
|
+
const hoverInlineColor = themConfig.hoverHeaderBackgroundColor;
|
5089
|
+
result.theme.cornerHeaderStyle = {
|
5090
|
+
borderColor: [
|
5091
|
+
borderColor,
|
5092
|
+
borderColor
|
5093
|
+
],
|
5094
|
+
borderLineWidth: 1,
|
5095
|
+
padding: [
|
5096
|
+
8,
|
5097
|
+
12,
|
5098
|
+
8,
|
5099
|
+
12
|
5100
|
+
],
|
5101
|
+
textAlign: 'left',
|
5102
|
+
hover: {
|
5103
|
+
cellBgColor: (0, external_d3_color_namespaceObject.color)(hoverCellBgColor)?.copy({
|
5104
|
+
opacity: 1
|
5105
|
+
}).brighter(0.5).toString(),
|
5106
|
+
inlineRowBgColor: hoverInlineColor,
|
5107
|
+
inlineColumnBgColor: hoverInlineColor
|
5108
|
+
},
|
5109
|
+
frameStyle: {
|
5110
|
+
borderColor: [
|
5111
|
+
null,
|
5112
|
+
borderColor,
|
5113
|
+
borderColor,
|
5114
|
+
null
|
5115
|
+
],
|
5116
|
+
borderLineWidth: 1
|
5117
|
+
},
|
5118
|
+
fontSize: fontSize,
|
5119
|
+
fontVariant: 'normal',
|
5120
|
+
fontStyle: 'normal',
|
5121
|
+
fontWeight: 'bold',
|
5122
|
+
color: fontColor,
|
5123
|
+
bgColor: backgroundColor,
|
5124
|
+
lineHeight: 1.5 * fontSize
|
5125
|
+
};
|
5126
|
+
return result;
|
5127
|
+
};
|
5128
|
+
const frameStyle = (spec, context)=>{
|
5129
|
+
const result = {
|
5130
|
+
...spec
|
5131
|
+
};
|
5132
|
+
const { advancedVSeed } = context;
|
5133
|
+
const { customTheme, chartType } = advancedVSeed;
|
5134
|
+
const themConfig = customTheme?.config?.[chartType];
|
5135
|
+
if (!result.theme || !themConfig) return result;
|
5136
|
+
const borderColor = themConfig.borderColor || 'rgb(224, 224, 224)';
|
5137
|
+
result.theme.frameStyle = {
|
5138
|
+
borderColor,
|
5139
|
+
borderLineWidth: 0,
|
5140
|
+
cornerRadius: 0
|
5141
|
+
};
|
5142
|
+
return result;
|
5143
|
+
};
|
5144
|
+
const selectionStyle = (spec, context)=>{
|
5145
|
+
const result = {
|
5146
|
+
...spec
|
5147
|
+
};
|
5148
|
+
const { advancedVSeed } = context;
|
5149
|
+
const { customTheme, chartType } = advancedVSeed;
|
5150
|
+
const themConfig = customTheme?.config?.[chartType];
|
5151
|
+
if (!result.theme || !themConfig) return result;
|
5152
|
+
const borderColor = themConfig.selectedBorderColor || 'rgb(224, 224, 224)';
|
5153
|
+
result.theme.selectionStyle = {
|
5154
|
+
cellBorderColor: borderColor,
|
5155
|
+
cellBorderLineWidth: 2,
|
5156
|
+
cellBgColor: (0, external_d3_color_namespaceObject.color)(borderColor)?.copy({
|
5157
|
+
opacity: 0.15
|
5158
|
+
}).toString()
|
5159
|
+
};
|
5160
|
+
return result;
|
5161
|
+
};
|
5162
|
+
const tableSpecPipeline = [
|
5163
|
+
initTable,
|
5164
|
+
dimensionTreeToColumns,
|
5165
|
+
measureTreeToColumns,
|
5166
|
+
bodyStyle,
|
5167
|
+
headerStyle,
|
5168
|
+
frameStyle,
|
5169
|
+
selectionStyle
|
5170
|
+
];
|
5171
|
+
const pivotTableSpecPipeline = [
|
5172
|
+
initPivotTable,
|
5173
|
+
pivotColumns,
|
5174
|
+
pivotRows,
|
5175
|
+
pivotIndicators_pivotIndicators,
|
5176
|
+
bodyStyle,
|
5177
|
+
headerStyle,
|
5178
|
+
rowHeaderStyle,
|
5179
|
+
cornerHeaderStyle,
|
5180
|
+
frameStyle,
|
5181
|
+
selectionStyle
|
5182
|
+
];
|
4538
5183
|
const buildAdvanced = (builder)=>{
|
4539
5184
|
const { chartType } = builder.vseed;
|
4540
5185
|
if (!chartType) throw new Error('chartType is nil in buildAdvanced');
|
@@ -4575,6 +5220,17 @@ const build = (builder)=>{
|
|
4575
5220
|
builder.spec = spec;
|
4576
5221
|
return spec;
|
4577
5222
|
};
|
5223
|
+
const getColorItems = (builder)=>{
|
5224
|
+
const advancedVSeed = builder.advancedVSeed;
|
5225
|
+
if (!advancedVSeed) return [];
|
5226
|
+
const { datasetReshapeInfo } = advancedVSeed;
|
5227
|
+
const colorItems = (0, external_remeda_namespaceObject.unique)(datasetReshapeInfo.flatMap((d)=>d.unfoldInfo.colorItems));
|
5228
|
+
const colorIdMap = datasetReshapeInfo.reduce((prev, cur)=>({
|
5229
|
+
...prev,
|
5230
|
+
...cur.unfoldInfo.colorIdMap
|
5231
|
+
}), {});
|
5232
|
+
return colorItems.map((d)=>colorIdMap[d]);
|
5233
|
+
};
|
4578
5234
|
class Builder {
|
4579
5235
|
_vseed;
|
4580
5236
|
_advancedVSeed = null;
|
@@ -4590,6 +5246,7 @@ class Builder {
|
|
4590
5246
|
getSpecPipeline = (chartType)=>Builder._specPipelineMap[chartType];
|
4591
5247
|
getTheme = (themeKey)=>Builder._themeMap[themeKey];
|
4592
5248
|
getThemeMap = ()=>Builder._themeMap;
|
5249
|
+
getColorItems = ()=>getColorItems(this);
|
4593
5250
|
get vseed() {
|
4594
5251
|
return this._vseed;
|
4595
5252
|
}
|
@@ -4673,6 +5330,14 @@ const registerScatter = ()=>{
|
|
4673
5330
|
Builder._advancedPipelineMap.scatter = scatterAdvancedPipeline;
|
4674
5331
|
Builder._specPipelineMap.scatter = scatterSpecPipeline;
|
4675
5332
|
};
|
5333
|
+
const registerTable = ()=>{
|
5334
|
+
Builder._advancedPipelineMap.table = tableAdvancedPipeline;
|
5335
|
+
Builder._specPipelineMap.table = tableSpecPipeline;
|
5336
|
+
};
|
5337
|
+
const registerPivotTable = ()=>{
|
5338
|
+
Builder._advancedPipelineMap.pivotTable = pivotTableAdvancedPipeline;
|
5339
|
+
Builder._specPipelineMap.pivotTable = pivotTableSpecPipeline;
|
5340
|
+
};
|
4676
5341
|
const lightTheme = ()=>{
|
4677
5342
|
const linearAxis = {
|
4678
5343
|
nice: true,
|
@@ -4811,8 +5476,22 @@ const lightTheme = ()=>{
|
|
4811
5476
|
labelFontWeight: 400
|
4812
5477
|
}
|
4813
5478
|
};
|
5479
|
+
const tableConfig = {
|
5480
|
+
borderColor: '#e3e5eb',
|
5481
|
+
bodyFontSize: 12,
|
5482
|
+
bodyFontColor: '#141414',
|
5483
|
+
bodyBackgroundColor: 'transparent',
|
5484
|
+
headerFontSize: 12,
|
5485
|
+
headerFontColor: '#21252c',
|
5486
|
+
headerBackgroundColor: '#f6f7f9',
|
5487
|
+
hoverBodyBackgroundColor: '#bedaff',
|
5488
|
+
hoverHeaderBackgroundColor: '#D9DDE488',
|
5489
|
+
selectedBorderColor: '#4080ff'
|
5490
|
+
};
|
4814
5491
|
return {
|
4815
5492
|
config: {
|
5493
|
+
table: tableConfig,
|
5494
|
+
pivotTable: tableConfig,
|
4816
5495
|
line: {
|
4817
5496
|
...baseConfig,
|
4818
5497
|
xAxis: bandAxis,
|
@@ -5090,8 +5769,22 @@ const darkTheme = ()=>{
|
|
5090
5769
|
labelFontWeight: 400
|
5091
5770
|
}
|
5092
5771
|
};
|
5772
|
+
const tableConfig = {
|
5773
|
+
borderColor: '#4b4e53',
|
5774
|
+
bodyFontSize: 12,
|
5775
|
+
bodyFontColor: '#fdfdfd',
|
5776
|
+
bodyBackgroundColor: 'transparent',
|
5777
|
+
headerFontSize: 12,
|
5778
|
+
headerFontColor: '#fdfdfd',
|
5779
|
+
headerBackgroundColor: '#36393e',
|
5780
|
+
hoverBodyBackgroundColor: '#4284ff66',
|
5781
|
+
hoverHeaderBackgroundColor: '#5f5f5f88',
|
5782
|
+
selectedBorderColor: '#3073F2'
|
5783
|
+
};
|
5093
5784
|
return {
|
5094
5785
|
config: {
|
5786
|
+
table: tableConfig,
|
5787
|
+
pivotTable: tableConfig,
|
5095
5788
|
line: {
|
5096
5789
|
...baseConfig,
|
5097
5790
|
xAxis: bandAxis,
|
@@ -5261,6 +5954,8 @@ const registerAll = ()=>{
|
|
5261
5954
|
registerRoseParallel();
|
5262
5955
|
registerFunnel();
|
5263
5956
|
registerScatter();
|
5957
|
+
registerTable();
|
5958
|
+
registerPivotTable();
|
5264
5959
|
registerLightTheme();
|
5265
5960
|
registerDarkTheme();
|
5266
5961
|
};
|
@@ -5290,14 +5985,21 @@ const zDataset = external_zod_namespaceObject.z.array(zDatum);
|
|
5290
5985
|
const zDimension = external_zod_namespaceObject.z.object({
|
5291
5986
|
id: external_zod_namespaceObject.z.string(),
|
5292
5987
|
alias: external_zod_namespaceObject.z.string().optional(),
|
5293
|
-
visible: external_zod_namespaceObject.z.boolean().default(true).optional(),
|
5294
5988
|
location: external_zod_namespaceObject.z["enum"]([
|
5295
5989
|
'dimension',
|
5296
5990
|
'rowDimension',
|
5297
5991
|
'columnDimension'
|
5298
|
-
]).default('dimension')
|
5992
|
+
]).default('dimension')
|
5299
5993
|
});
|
5300
|
-
const
|
5994
|
+
const zDimensionGroup = external_zod_namespaceObject.z.object({
|
5995
|
+
id: external_zod_namespaceObject.z.string(),
|
5996
|
+
alias: external_zod_namespaceObject.z.string().optional(),
|
5997
|
+
get children () {
|
5998
|
+
return external_zod_namespaceObject.z.array(zDimensionGroup.or(zDimension)).optional();
|
5999
|
+
}
|
6000
|
+
});
|
6001
|
+
const zDimensions = external_zod_namespaceObject.z.array(zDimension);
|
6002
|
+
const zDimensionTree = external_zod_namespaceObject.z.array(zDimensionGroup.or(zDimension));
|
5301
6003
|
const zNumFormat = external_zod_namespaceObject.z.object({
|
5302
6004
|
type: external_zod_namespaceObject.z["enum"]([
|
5303
6005
|
'number',
|
@@ -5331,8 +6033,8 @@ const zNumFormat = external_zod_namespaceObject.z.object({
|
|
5331
6033
|
const zMeasure = external_zod_namespaceObject.z.object({
|
5332
6034
|
id: external_zod_namespaceObject.z.string(),
|
5333
6035
|
alias: external_zod_namespaceObject.z.string().optional(),
|
5334
|
-
autoFormat: external_zod_namespaceObject.z.boolean().default(true)
|
5335
|
-
format: zNumFormat["default"]({})
|
6036
|
+
autoFormat: external_zod_namespaceObject.z.boolean().default(true),
|
6037
|
+
format: zNumFormat["default"]({})
|
5336
6038
|
});
|
5337
6039
|
const zMeasureGroup = external_zod_namespaceObject.z.object({
|
5338
6040
|
id: external_zod_namespaceObject.z.string(),
|
@@ -5341,7 +6043,8 @@ const zMeasureGroup = external_zod_namespaceObject.z.object({
|
|
5341
6043
|
return external_zod_namespaceObject.z.array(zMeasureGroup.or(zMeasure)).optional();
|
5342
6044
|
}
|
5343
6045
|
});
|
5344
|
-
const zMeasures = external_zod_namespaceObject.z.array(
|
6046
|
+
const zMeasures = external_zod_namespaceObject.z.array(zMeasure);
|
6047
|
+
const zMeasureTree = external_zod_namespaceObject.z.array(zMeasureGroup.or(zMeasure));
|
5345
6048
|
const zFoldInfo = external_zod_namespaceObject.z.object({
|
5346
6049
|
foldMap: external_zod_namespaceObject.z.record(external_zod_namespaceObject.z.string(), external_zod_namespaceObject.z.string().or(external_zod_namespaceObject.z.undefined())),
|
5347
6050
|
measureId: external_zod_namespaceObject.z.string(),
|
@@ -5539,6 +6242,19 @@ const zLegend = external_zod_namespaceObject.z.object({
|
|
5539
6242
|
const zTooltip = external_zod_namespaceObject.z.object({
|
5540
6243
|
enable: external_zod_namespaceObject.z.boolean().default(true).optional()
|
5541
6244
|
});
|
6245
|
+
const zTableConfig = external_zod_namespaceObject.z.object({
|
6246
|
+
borderColor: external_zod_namespaceObject.z.string().optional(),
|
6247
|
+
bodyFontSize: external_zod_namespaceObject.z.number().optional(),
|
6248
|
+
bodyFontColor: external_zod_namespaceObject.z.string().optional(),
|
6249
|
+
bodyBackgroundColor: external_zod_namespaceObject.z.string().optional(),
|
6250
|
+
hoverBodyBackgroundColor: external_zod_namespaceObject.z.string().optional(),
|
6251
|
+
headerFontSize: external_zod_namespaceObject.z.number().optional(),
|
6252
|
+
headerFontColor: external_zod_namespaceObject.z.string().optional(),
|
6253
|
+
headerBackgroundColor: external_zod_namespaceObject.z.string().optional(),
|
6254
|
+
hoverHeaderBackgroundColor: external_zod_namespaceObject.z.string().optional(),
|
6255
|
+
selectedBorderColor: external_zod_namespaceObject.z.string().optional()
|
6256
|
+
});
|
6257
|
+
const zPivotTableConfig = zTableConfig;
|
5542
6258
|
const zLineConfig = external_zod_namespaceObject.z.object({
|
5543
6259
|
backgroundColor: zBackgroundColor.optional(),
|
5544
6260
|
label: zLabel.optional(),
|
@@ -5627,8 +6343,8 @@ const zFunnelConfig = external_zod_namespaceObject.z.object({
|
|
5627
6343
|
legend: zLegend.optional()
|
5628
6344
|
});
|
5629
6345
|
const zConfig = external_zod_namespaceObject.z.object({
|
5630
|
-
table:
|
5631
|
-
pivotTable:
|
6346
|
+
table: zTableConfig.optional(),
|
6347
|
+
pivotTable: zPivotTableConfig.optional(),
|
5632
6348
|
line: zLineConfig.optional(),
|
5633
6349
|
column: zColumnConfig.optional(),
|
5634
6350
|
columnParallel: zColumnParallelConfig.optional(),
|
@@ -6004,11 +6720,29 @@ const zLocale = external_zod_namespaceObject.z["enum"]([
|
|
6004
6720
|
'zh-CN',
|
6005
6721
|
'en-US'
|
6006
6722
|
]).default('zh-CN');
|
6723
|
+
const zTable = external_zod_namespaceObject.z.object({
|
6724
|
+
chartType: external_zod_namespaceObject.z.literal('table'),
|
6725
|
+
dataset: zDataset.optional(),
|
6726
|
+
dimensions: zDimensions.optional(),
|
6727
|
+
measures: zMeasureTree.optional(),
|
6728
|
+
backgroundColor: zBackgroundColor.optional(),
|
6729
|
+
theme: zTheme.optional(),
|
6730
|
+
locale: zLocale.optional()
|
6731
|
+
});
|
6732
|
+
const zPivotTable = external_zod_namespaceObject.z.object({
|
6733
|
+
chartType: external_zod_namespaceObject.z.literal('pivotTable'),
|
6734
|
+
dataset: zDataset.optional(),
|
6735
|
+
dimensions: zDimensions.optional(),
|
6736
|
+
measures: zMeasures.optional(),
|
6737
|
+
backgroundColor: zBackgroundColor.optional(),
|
6738
|
+
theme: zTheme.optional(),
|
6739
|
+
locale: zLocale.optional()
|
6740
|
+
});
|
6007
6741
|
const zLine = external_zod_namespaceObject.z.object({
|
6008
6742
|
chartType: external_zod_namespaceObject.z.literal('line'),
|
6009
6743
|
dataset: zDataset.optional(),
|
6010
6744
|
dimensions: zDimensions.optional(),
|
6011
|
-
measures:
|
6745
|
+
measures: zMeasureTree.optional(),
|
6012
6746
|
backgroundColor: zBackgroundColor.optional(),
|
6013
6747
|
color: zColor.optional(),
|
6014
6748
|
label: zLabel.optional(),
|
@@ -6030,7 +6764,7 @@ const zColumn = external_zod_namespaceObject.z.object({
|
|
6030
6764
|
chartType: external_zod_namespaceObject.z.literal('column'),
|
6031
6765
|
dataset: zDataset.optional(),
|
6032
6766
|
dimensions: zDimensions.optional(),
|
6033
|
-
measures:
|
6767
|
+
measures: zMeasureTree.optional(),
|
6034
6768
|
backgroundColor: zBackgroundColor.optional(),
|
6035
6769
|
color: zColor.optional(),
|
6036
6770
|
label: zLabel.optional(),
|
@@ -6052,7 +6786,7 @@ const zColumnParallel = external_zod_namespaceObject.z.object({
|
|
6052
6786
|
chartType: external_zod_namespaceObject.z.literal('columnParallel'),
|
6053
6787
|
dataset: zDataset.optional(),
|
6054
6788
|
dimensions: zDimensions.optional(),
|
6055
|
-
measures:
|
6789
|
+
measures: zMeasureTree.optional(),
|
6056
6790
|
backgroundColor: zBackgroundColor.optional(),
|
6057
6791
|
color: zColor.optional(),
|
6058
6792
|
label: zLabel.optional(),
|
@@ -6074,7 +6808,7 @@ const zColumnPercent = external_zod_namespaceObject.z.object({
|
|
6074
6808
|
chartType: external_zod_namespaceObject.z.literal('columnPercent'),
|
6075
6809
|
dataset: zDataset.optional(),
|
6076
6810
|
dimensions: zDimensions.optional(),
|
6077
|
-
measures:
|
6811
|
+
measures: zMeasureTree.optional(),
|
6078
6812
|
backgroundColor: zBackgroundColor.optional(),
|
6079
6813
|
color: zColor.optional(),
|
6080
6814
|
label: zLabel.optional(),
|
@@ -6096,7 +6830,7 @@ const zBar = external_zod_namespaceObject.z.object({
|
|
6096
6830
|
chartType: external_zod_namespaceObject.z.literal('bar'),
|
6097
6831
|
dataset: zDataset.optional(),
|
6098
6832
|
dimensions: zDimensions.optional(),
|
6099
|
-
measures:
|
6833
|
+
measures: zMeasureTree.optional(),
|
6100
6834
|
backgroundColor: zBackgroundColor.optional(),
|
6101
6835
|
color: zColor.optional(),
|
6102
6836
|
label: zLabel.optional(),
|
@@ -6118,7 +6852,7 @@ const zBarParallel = external_zod_namespaceObject.z.object({
|
|
6118
6852
|
chartType: external_zod_namespaceObject.z.literal('barParallel'),
|
6119
6853
|
dataset: zDataset.optional(),
|
6120
6854
|
dimensions: zDimensions.optional(),
|
6121
|
-
measures:
|
6855
|
+
measures: zMeasureTree.optional(),
|
6122
6856
|
backgroundColor: zBackgroundColor.optional(),
|
6123
6857
|
color: zColor.optional(),
|
6124
6858
|
label: zLabel.optional(),
|
@@ -6140,7 +6874,7 @@ const zBarPercent = external_zod_namespaceObject.z.object({
|
|
6140
6874
|
chartType: external_zod_namespaceObject.z.literal('barPercent'),
|
6141
6875
|
dataset: zDataset.optional(),
|
6142
6876
|
dimensions: zDimensions.optional(),
|
6143
|
-
measures:
|
6877
|
+
measures: zMeasureTree.optional(),
|
6144
6878
|
backgroundColor: zBackgroundColor.optional(),
|
6145
6879
|
color: zColor.optional(),
|
6146
6880
|
label: zLabel.optional(),
|
@@ -6162,7 +6896,7 @@ const zArea = external_zod_namespaceObject.z.object({
|
|
6162
6896
|
chartType: external_zod_namespaceObject.z.literal('area'),
|
6163
6897
|
dataset: zDataset.optional(),
|
6164
6898
|
dimensions: zDimensions.optional(),
|
6165
|
-
measures:
|
6899
|
+
measures: zMeasureTree.optional(),
|
6166
6900
|
backgroundColor: zBackgroundColor.optional(),
|
6167
6901
|
color: zColor.optional(),
|
6168
6902
|
label: zLabel.optional(),
|
@@ -6185,7 +6919,7 @@ const zAreaPercent = external_zod_namespaceObject.z.object({
|
|
6185
6919
|
chartType: external_zod_namespaceObject.z.literal('areaPercent'),
|
6186
6920
|
dataset: zDataset.optional(),
|
6187
6921
|
dimensions: zDimensions.optional(),
|
6188
|
-
measures:
|
6922
|
+
measures: zMeasureTree.optional(),
|
6189
6923
|
backgroundColor: zBackgroundColor.optional(),
|
6190
6924
|
color: zColor.optional(),
|
6191
6925
|
label: zLabel.optional(),
|
@@ -6208,7 +6942,7 @@ const zRose = external_zod_namespaceObject.z.object({
|
|
6208
6942
|
chartType: external_zod_namespaceObject.z.literal('rose'),
|
6209
6943
|
dataset: zDataset.optional(),
|
6210
6944
|
dimensions: zDimensions.optional(),
|
6211
|
-
measures:
|
6945
|
+
measures: zMeasureTree.optional(),
|
6212
6946
|
backgroundColor: zBackgroundColor.optional(),
|
6213
6947
|
color: zColor.optional(),
|
6214
6948
|
label: zLabel.optional(),
|
@@ -6221,7 +6955,7 @@ const zRoseParallel = external_zod_namespaceObject.z.object({
|
|
6221
6955
|
chartType: external_zod_namespaceObject.z.literal('roseParallel'),
|
6222
6956
|
dataset: zDataset.optional(),
|
6223
6957
|
dimensions: zDimensions.optional(),
|
6224
|
-
measures:
|
6958
|
+
measures: zMeasureTree.optional(),
|
6225
6959
|
backgroundColor: zBackgroundColor.optional(),
|
6226
6960
|
color: zColor.optional(),
|
6227
6961
|
label: zLabel.optional(),
|
@@ -6234,7 +6968,7 @@ const zPie = external_zod_namespaceObject.z.object({
|
|
6234
6968
|
chartType: external_zod_namespaceObject.z.literal('pie'),
|
6235
6969
|
dataset: zDataset.optional(),
|
6236
6970
|
dimensions: zDimensions.optional(),
|
6237
|
-
measures:
|
6971
|
+
measures: zMeasureTree.optional(),
|
6238
6972
|
backgroundColor: zBackgroundColor.optional(),
|
6239
6973
|
color: zColor.optional(),
|
6240
6974
|
label: zLabel.optional(),
|
@@ -6247,7 +6981,7 @@ const zDonut = external_zod_namespaceObject.z.object({
|
|
6247
6981
|
chartType: external_zod_namespaceObject.z.literal('donut'),
|
6248
6982
|
dataset: zDataset.optional(),
|
6249
6983
|
dimensions: zDimensions.optional(),
|
6250
|
-
measures:
|
6984
|
+
measures: zMeasureTree.optional(),
|
6251
6985
|
backgroundColor: zBackgroundColor.optional(),
|
6252
6986
|
color: zColor.optional(),
|
6253
6987
|
label: zLabel.optional(),
|
@@ -6260,7 +6994,7 @@ const zScatter = external_zod_namespaceObject.z.object({
|
|
6260
6994
|
chartType: external_zod_namespaceObject.z.literal('scatter'),
|
6261
6995
|
dataset: zDataset.optional(),
|
6262
6996
|
dimensions: zDimensions.optional(),
|
6263
|
-
measures:
|
6997
|
+
measures: zMeasureTree.optional(),
|
6264
6998
|
backgroundColor: zBackgroundColor.optional(),
|
6265
6999
|
color: zColor.optional(),
|
6266
7000
|
label: zLabel.optional(),
|
@@ -6281,7 +7015,7 @@ const zFunnel = external_zod_namespaceObject.z.object({
|
|
6281
7015
|
chartType: external_zod_namespaceObject.z.literal('funnel'),
|
6282
7016
|
dataset: zDataset.optional(),
|
6283
7017
|
dimensions: zDimensions.optional(),
|
6284
|
-
measures:
|
7018
|
+
measures: zMeasureTree.optional(),
|
6285
7019
|
backgroundColor: zBackgroundColor.optional(),
|
6286
7020
|
color: zColor.optional(),
|
6287
7021
|
label: zLabel.optional(),
|
@@ -6291,6 +7025,8 @@ const zFunnel = external_zod_namespaceObject.z.object({
|
|
6291
7025
|
locale: zLocale.optional()
|
6292
7026
|
});
|
6293
7027
|
const zVSeed = external_zod_namespaceObject.z.discriminatedUnion('chartType', [
|
7028
|
+
zTable,
|
7029
|
+
zPivotTable,
|
6294
7030
|
zLine,
|
6295
7031
|
zColumn,
|
6296
7032
|
zColumnParallel,
|
@@ -6311,8 +7047,8 @@ const zAdvancedVSeed = external_zod_namespaceObject.z.object({
|
|
6311
7047
|
chartType: zChartType,
|
6312
7048
|
dataset: zDataset,
|
6313
7049
|
datasetReshapeInfo: zDatasetReshapeInfo,
|
6314
|
-
dimensions:
|
6315
|
-
measures:
|
7050
|
+
dimensions: zDimensionTree,
|
7051
|
+
measures: zMeasureTree,
|
6316
7052
|
encoding: zEncoding,
|
6317
7053
|
config: zConfig,
|
6318
7054
|
theme: zTheme,
|
@@ -6356,6 +7092,10 @@ exports.dataReshapeFor2D1M = __webpack_exports__.dataReshapeFor2D1M;
|
|
6356
7092
|
exports.donutAdvancedPipeline = __webpack_exports__.donutAdvancedPipeline;
|
6357
7093
|
exports.donutSpecPipeline = __webpack_exports__.donutSpecPipeline;
|
6358
7094
|
exports.execPipeline = __webpack_exports__.execPipeline;
|
7095
|
+
exports.findAllDimensions = __webpack_exports__.findAllDimensions;
|
7096
|
+
exports.findAllMeasures = __webpack_exports__.findAllMeasures;
|
7097
|
+
exports.findDimensionById = __webpack_exports__.findDimensionById;
|
7098
|
+
exports.findFirstDimension = __webpack_exports__.findFirstDimension;
|
6359
7099
|
exports.findFirstMeasure = __webpack_exports__.findFirstMeasure;
|
6360
7100
|
exports.findMeasureById = __webpack_exports__.findMeasureById;
|
6361
7101
|
exports.foldMeasures = __webpack_exports__.foldMeasures;
|
@@ -6364,6 +7104,8 @@ exports.funnelSpecPipeline = __webpack_exports__.funnelSpecPipeline;
|
|
6364
7104
|
exports.i18n = __webpack_exports__.i18n;
|
6365
7105
|
exports.intl = __webpack_exports__.intl;
|
6366
7106
|
exports.isPivotChart = __webpack_exports__.isPivotChart;
|
7107
|
+
exports.isPivotTable = __webpack_exports__.isPivotTable;
|
7108
|
+
exports.isTable = __webpack_exports__.isTable;
|
6367
7109
|
exports.isVChart = __webpack_exports__.isVChart;
|
6368
7110
|
exports.isVTable = __webpack_exports__.isVTable;
|
6369
7111
|
exports.lightTheme = __webpack_exports__.lightTheme;
|
@@ -6371,6 +7113,9 @@ exports.lineAdvancedPipeline = __webpack_exports__.lineAdvancedPipeline;
|
|
6371
7113
|
exports.lineSpecPipeline = __webpack_exports__.lineSpecPipeline;
|
6372
7114
|
exports.pieAdvancedPipeline = __webpack_exports__.pieAdvancedPipeline;
|
6373
7115
|
exports.pieSpecPipeline = __webpack_exports__.pieSpecPipeline;
|
7116
|
+
exports.pivotTableAdvancedPipeline = __webpack_exports__.pivotTableAdvancedPipeline;
|
7117
|
+
exports.pivotTableSpecPipeline = __webpack_exports__.pivotTableSpecPipeline;
|
7118
|
+
exports.preorderTraverse = __webpack_exports__.preorderTraverse;
|
6374
7119
|
exports.registerAll = __webpack_exports__.registerAll;
|
6375
7120
|
exports.registerArea = __webpack_exports__.registerArea;
|
6376
7121
|
exports.registerAreaPercent = __webpack_exports__.registerAreaPercent;
|
@@ -6382,14 +7127,24 @@ exports.registerColumnParallel = __webpack_exports__.registerColumnParallel;
|
|
6382
7127
|
exports.registerColumnPercent = __webpack_exports__.registerColumnPercent;
|
6383
7128
|
exports.registerCustomTheme = __webpack_exports__.registerCustomTheme;
|
6384
7129
|
exports.registerDarkTheme = __webpack_exports__.registerDarkTheme;
|
7130
|
+
exports.registerDonut = __webpack_exports__.registerDonut;
|
7131
|
+
exports.registerFunnel = __webpack_exports__.registerFunnel;
|
6385
7132
|
exports.registerLightTheme = __webpack_exports__.registerLightTheme;
|
6386
7133
|
exports.registerLine = __webpack_exports__.registerLine;
|
7134
|
+
exports.registerPie = __webpack_exports__.registerPie;
|
7135
|
+
exports.registerPivotTable = __webpack_exports__.registerPivotTable;
|
7136
|
+
exports.registerRose = __webpack_exports__.registerRose;
|
7137
|
+
exports.registerRoseParallel = __webpack_exports__.registerRoseParallel;
|
7138
|
+
exports.registerScatter = __webpack_exports__.registerScatter;
|
7139
|
+
exports.registerTable = __webpack_exports__.registerTable;
|
6387
7140
|
exports.roseAdvancedPipeline = __webpack_exports__.roseAdvancedPipeline;
|
6388
7141
|
exports.roseParallelAdvancedPipeline = __webpack_exports__.roseParallelAdvancedPipeline;
|
6389
7142
|
exports.roseParallelSpecPipeline = __webpack_exports__.roseParallelSpecPipeline;
|
6390
7143
|
exports.roseSpecPipeline = __webpack_exports__.roseSpecPipeline;
|
6391
7144
|
exports.scatterAdvancedPipeline = __webpack_exports__.scatterAdvancedPipeline;
|
6392
7145
|
exports.scatterSpecPipeline = __webpack_exports__.scatterSpecPipeline;
|
7146
|
+
exports.tableAdvancedPipeline = __webpack_exports__.tableAdvancedPipeline;
|
7147
|
+
exports.tableSpecPipeline = __webpack_exports__.tableSpecPipeline;
|
6393
7148
|
exports.unfoldDimensions = __webpack_exports__.unfoldDimensions;
|
6394
7149
|
exports.zAdvancedVSeed = __webpack_exports__.zAdvancedVSeed;
|
6395
7150
|
exports.zAnnotation = __webpack_exports__.zAnnotation;
|
@@ -6428,6 +7183,8 @@ exports.zDataset = __webpack_exports__.zDataset;
|
|
6428
7183
|
exports.zDatasetReshapeInfo = __webpack_exports__.zDatasetReshapeInfo;
|
6429
7184
|
exports.zDatum = __webpack_exports__.zDatum;
|
6430
7185
|
exports.zDimension = __webpack_exports__.zDimension;
|
7186
|
+
exports.zDimensionGroup = __webpack_exports__.zDimensionGroup;
|
7187
|
+
exports.zDimensionTree = __webpack_exports__.zDimensionTree;
|
6431
7188
|
exports.zDimensions = __webpack_exports__.zDimensions;
|
6432
7189
|
exports.zDonut = __webpack_exports__.zDonut;
|
6433
7190
|
exports.zDonutConfig = __webpack_exports__.zDonutConfig;
|
@@ -6445,10 +7202,13 @@ exports.zLocale = __webpack_exports__.zLocale;
|
|
6445
7202
|
exports.zMarkStyle = __webpack_exports__.zMarkStyle;
|
6446
7203
|
exports.zMeasure = __webpack_exports__.zMeasure;
|
6447
7204
|
exports.zMeasureGroup = __webpack_exports__.zMeasureGroup;
|
7205
|
+
exports.zMeasureTree = __webpack_exports__.zMeasureTree;
|
6448
7206
|
exports.zMeasures = __webpack_exports__.zMeasures;
|
6449
7207
|
exports.zNumFormat = __webpack_exports__.zNumFormat;
|
6450
7208
|
exports.zPie = __webpack_exports__.zPie;
|
6451
7209
|
exports.zPieConfig = __webpack_exports__.zPieConfig;
|
7210
|
+
exports.zPivotTable = __webpack_exports__.zPivotTable;
|
7211
|
+
exports.zPivotTableConfig = __webpack_exports__.zPivotTableConfig;
|
6452
7212
|
exports.zPointStyle = __webpack_exports__.zPointStyle;
|
6453
7213
|
exports.zRose = __webpack_exports__.zRose;
|
6454
7214
|
exports.zRoseConfig = __webpack_exports__.zRoseConfig;
|
@@ -6457,6 +7217,8 @@ exports.zRoseParallelConfig = __webpack_exports__.zRoseParallelConfig;
|
|
6457
7217
|
exports.zScatter = __webpack_exports__.zScatter;
|
6458
7218
|
exports.zScatterConfig = __webpack_exports__.zScatterConfig;
|
6459
7219
|
exports.zStackCornerRadius = __webpack_exports__.zStackCornerRadius;
|
7220
|
+
exports.zTable = __webpack_exports__.zTable;
|
7221
|
+
exports.zTableConfig = __webpack_exports__.zTableConfig;
|
6460
7222
|
exports.zTheme = __webpack_exports__.zTheme;
|
6461
7223
|
exports.zTooltip = __webpack_exports__.zTooltip;
|
6462
7224
|
exports.zUnfoldInfo = __webpack_exports__.zUnfoldInfo;
|
@@ -6501,6 +7263,10 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
6501
7263
|
"donutAdvancedPipeline",
|
6502
7264
|
"donutSpecPipeline",
|
6503
7265
|
"execPipeline",
|
7266
|
+
"findAllDimensions",
|
7267
|
+
"findAllMeasures",
|
7268
|
+
"findDimensionById",
|
7269
|
+
"findFirstDimension",
|
6504
7270
|
"findFirstMeasure",
|
6505
7271
|
"findMeasureById",
|
6506
7272
|
"foldMeasures",
|
@@ -6509,6 +7275,8 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
6509
7275
|
"i18n",
|
6510
7276
|
"intl",
|
6511
7277
|
"isPivotChart",
|
7278
|
+
"isPivotTable",
|
7279
|
+
"isTable",
|
6512
7280
|
"isVChart",
|
6513
7281
|
"isVTable",
|
6514
7282
|
"lightTheme",
|
@@ -6516,6 +7284,9 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
6516
7284
|
"lineSpecPipeline",
|
6517
7285
|
"pieAdvancedPipeline",
|
6518
7286
|
"pieSpecPipeline",
|
7287
|
+
"pivotTableAdvancedPipeline",
|
7288
|
+
"pivotTableSpecPipeline",
|
7289
|
+
"preorderTraverse",
|
6519
7290
|
"registerAll",
|
6520
7291
|
"registerArea",
|
6521
7292
|
"registerAreaPercent",
|
@@ -6527,14 +7298,24 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
6527
7298
|
"registerColumnPercent",
|
6528
7299
|
"registerCustomTheme",
|
6529
7300
|
"registerDarkTheme",
|
7301
|
+
"registerDonut",
|
7302
|
+
"registerFunnel",
|
6530
7303
|
"registerLightTheme",
|
6531
7304
|
"registerLine",
|
7305
|
+
"registerPie",
|
7306
|
+
"registerPivotTable",
|
7307
|
+
"registerRose",
|
7308
|
+
"registerRoseParallel",
|
7309
|
+
"registerScatter",
|
7310
|
+
"registerTable",
|
6532
7311
|
"roseAdvancedPipeline",
|
6533
7312
|
"roseParallelAdvancedPipeline",
|
6534
7313
|
"roseParallelSpecPipeline",
|
6535
7314
|
"roseSpecPipeline",
|
6536
7315
|
"scatterAdvancedPipeline",
|
6537
7316
|
"scatterSpecPipeline",
|
7317
|
+
"tableAdvancedPipeline",
|
7318
|
+
"tableSpecPipeline",
|
6538
7319
|
"unfoldDimensions",
|
6539
7320
|
"zAdvancedVSeed",
|
6540
7321
|
"zAnnotation",
|
@@ -6573,6 +7354,8 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
6573
7354
|
"zDatasetReshapeInfo",
|
6574
7355
|
"zDatum",
|
6575
7356
|
"zDimension",
|
7357
|
+
"zDimensionGroup",
|
7358
|
+
"zDimensionTree",
|
6576
7359
|
"zDimensions",
|
6577
7360
|
"zDonut",
|
6578
7361
|
"zDonutConfig",
|
@@ -6590,10 +7373,13 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
6590
7373
|
"zMarkStyle",
|
6591
7374
|
"zMeasure",
|
6592
7375
|
"zMeasureGroup",
|
7376
|
+
"zMeasureTree",
|
6593
7377
|
"zMeasures",
|
6594
7378
|
"zNumFormat",
|
6595
7379
|
"zPie",
|
6596
7380
|
"zPieConfig",
|
7381
|
+
"zPivotTable",
|
7382
|
+
"zPivotTableConfig",
|
6597
7383
|
"zPointStyle",
|
6598
7384
|
"zRose",
|
6599
7385
|
"zRoseConfig",
|
@@ -6602,6 +7388,8 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
6602
7388
|
"zScatter",
|
6603
7389
|
"zScatterConfig",
|
6604
7390
|
"zStackCornerRadius",
|
7391
|
+
"zTable",
|
7392
|
+
"zTableConfig",
|
6605
7393
|
"zTheme",
|
6606
7394
|
"zTooltip",
|
6607
7395
|
"zUnfoldInfo",
|