@visactor/vseed 0.0.18 → 0.0.20
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/build.d.ts +0 -1
- package/dist/builder/builder/buildAdvanced.d.ts +0 -1
- package/dist/builder/builder/buildSpec.d.ts +0 -1
- package/dist/builder/builder/builder.d.ts +5367 -5355
- package/dist/builder/builder/index.d.ts +0 -1
- package/dist/builder/index.d.ts +0 -1
- package/dist/builder/register/all.d.ts +0 -1
- package/dist/builder/register/chartType.d.ts +2 -1
- package/dist/builder/register/index.d.ts +1 -2
- package/dist/builder/register/theme.d.ts +0 -1
- package/dist/dataReshape/constant.d.ts +0 -1
- package/dist/dataReshape/dataReshapeFor1D1M.d.ts +0 -1
- package/dist/dataReshape/dataReshapeFor1D2M.d.ts +0 -1
- package/dist/dataReshape/dataReshapeFor2D1M.d.ts +0 -1
- package/dist/dataReshape/foldMeasures.d.ts +3 -4
- package/dist/dataReshape/index.d.ts +0 -1
- package/dist/dataReshape/unfoldDimensions.d.ts +0 -1
- package/dist/dataSelector/index.d.ts +0 -1
- package/dist/dataSelector/selector.d.ts +0 -1
- package/dist/i18n/i18n.d.ts +0 -1
- package/dist/i18n/index.d.ts +0 -1
- package/dist/index.cjs +1234 -701
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1173 -757
- package/dist/index.js.map +1 -1
- package/dist/pipeline/advanced/chart/index.d.ts +1 -0
- package/dist/pipeline/advanced/chart/pipeline/area.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipeline/areaPercent.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipeline/bar.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipeline/barParallel.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipeline/barPercent.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipeline/column.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipeline/columnParallel.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipeline/columnPercent.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipeline/donut.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipeline/funnel.d.ts +2 -0
- package/dist/pipeline/advanced/{pipeline → chart/pipeline}/index.d.ts +0 -1
- package/dist/pipeline/advanced/chart/pipeline/line.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipeline/pie.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipeline/rose.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipeline/roseParallel.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipeline/scatter.d.ts +2 -0
- package/dist/pipeline/advanced/chart/pipes/annotation/annotation.d.ts +2 -0
- package/dist/pipeline/advanced/{pipes → chart/pipes}/annotation/index.d.ts +0 -1
- package/dist/pipeline/advanced/{pipes → chart/pipes}/config/config.d.ts +1 -2
- package/dist/pipeline/advanced/chart/pipes/config/index.d.ts +1 -0
- 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 -1
- package/dist/pipeline/advanced/{pipes → chart/pipes}/index.d.ts +0 -3
- 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/{pipes → chart/pipes}/init/index.d.ts +0 -1
- package/dist/pipeline/advanced/chart/pipes/init/initAdvancedVSeed.d.ts +2 -0
- package/dist/pipeline/advanced/{pipes → chart/pipes}/markStyle/index.d.ts +0 -1
- package/dist/pipeline/advanced/chart/pipes/markStyle/markStyle.d.ts +2 -0
- package/dist/pipeline/advanced/{pipes → chart/pipes}/pivot/index.d.ts +0 -1
- package/dist/pipeline/advanced/{pipes → chart/pipes}/pivot/pivotAdapter.d.ts +1 -2
- package/dist/pipeline/advanced/{pipes → chart/pipes}/reshape/index.d.ts +0 -1
- package/dist/pipeline/advanced/{pipes → chart/pipes}/reshape/pivotReshapeTo1D1M.d.ts +1 -2
- package/dist/pipeline/advanced/{pipes → chart/pipes}/reshape/pivotReshapeTo1D2M.d.ts +1 -2
- package/dist/pipeline/advanced/{pipes → chart/pipes}/reshape/pivotReshapeTo2D1M.d.ts +1 -2
- package/dist/pipeline/advanced/{pipes → chart/pipes}/reshape/reshapeTo1D1M.d.ts +1 -2
- package/dist/pipeline/advanced/{pipes → chart/pipes}/reshape/reshapeTo1D2M.d.ts +1 -2
- package/dist/pipeline/advanced/{pipes → chart/pipes}/reshape/reshapeTo2D1M.d.ts +1 -2
- package/dist/pipeline/advanced/chart/pipes/theme/index.d.ts +1 -0
- package/dist/pipeline/advanced/chart/pipes/theme/theme.d.ts +2 -0
- package/dist/pipeline/advanced/index.d.ts +2 -2
- 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/index.d.ts +0 -1
- 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/chart/pipeline/barParallel.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipeline/barPercent.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipeline/column.d.ts +1 -0
- package/dist/pipeline/spec/chart/pipeline/columnParallel.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipeline/columnPercent.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipeline/donut.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipeline/funnel.d.ts +2 -0
- package/dist/pipeline/spec/{pipeline → chart/pipeline}/index.d.ts +0 -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/chart/pipeline/roseParallel.d.ts +2 -0
- package/dist/pipeline/spec/chart/pipeline/scatter.d.ts +2 -0
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/annotation/annotationArea.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/annotation/annotationAreaBand.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/annotation/annotationHorizontalLine.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/annotation/annotationPoint.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/annotation/annotationVerticalLine.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/annotation/index.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/annotation/utils.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/axes/a.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/axes/angle.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/axes/index.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/axes/radius.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/axes/xBand.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/axes/xLinear.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/axes/yBand.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/axes/yLinear.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/backgroundColor/background.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/backgroundColor/index.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/color/color.d.ts +0 -1
- package/dist/pipeline/spec/chart/pipes/color/index.d.ts +1 -0
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/crosshair/horizontalCrosshairLine.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/crosshair/horizontalCrosshairRect.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/crosshair/index.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/crosshair/verticalCrosshairLine.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/crosshair/verticalCrosshairRect.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/dataset/dataset.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/dataset/datasetPivot.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/dataset/index.d.ts +0 -1
- package/dist/pipeline/spec/chart/pipes/index.d.ts +14 -0
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/init/area.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/init/bar.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/init/barParallel.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/init/column.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/init/columnParallel.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/init/donut.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/init/funnel.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/init/index.d.ts +1 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/init/line.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/init/pie.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/init/pivot.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/init/rose.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/init/roseParallel.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/init/scatter.d.ts +0 -1
- package/dist/pipeline/spec/chart/pipes/label/index.d.ts +1 -0
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/label/label.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/legend/discreteLegend.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/legend/index.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/legend/pivotDiscreteLegend.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/markStyle/areaStyle.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/markStyle/barStyle.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/markStyle/index.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/markStyle/lineStyle.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/markStyle/pointState.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/markStyle/pointStyle.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/percent/index.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/percent/percent.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/pivotChart/index.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/pivotChart/pivotAdapter.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/pivotChart/pivotColumnDimensions.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/pivotChart/pivotGridStyle.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/pivotChart/pivotIndicators.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/pivotChart/pivotRowDimensions.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/stack/index.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/stack/stack.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/stack/stackCornerRadius.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/tooltip/index.d.ts +0 -1
- package/dist/pipeline/spec/{pipes/vchart → chart/pipes}/tooltip/tooltip.d.ts +0 -1
- package/dist/pipeline/spec/index.d.ts +2 -2
- 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 +4 -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/utils/chatType.d.ts +6 -40
- package/dist/pipeline/{constant.d.ts → utils/constant.d.ts} +0 -1
- package/dist/pipeline/utils/dimensions/find.d.ts +4 -0
- package/dist/pipeline/utils/dimensions/index.d.ts +1 -0
- package/dist/pipeline/utils/format/createFormatter.d.ts +0 -1
- package/dist/pipeline/utils/format/createNumFormatter.d.ts +1 -2
- package/dist/pipeline/utils/format/index.d.ts +0 -1
- package/dist/pipeline/utils/index.d.ts +2 -1
- package/dist/pipeline/utils/measures/find.d.ts +4 -0
- package/dist/pipeline/utils/measures/index.d.ts +1 -2
- package/dist/pipeline/utils/pipeline.d.ts +0 -1
- package/dist/pipeline/utils/tree/index.d.ts +1 -0
- package/dist/pipeline/utils/tree/traverse.d.ts +11 -0
- package/dist/theme/dark.d.ts +0 -1
- package/dist/theme/index.d.ts +0 -1
- package/dist/theme/light.d.ts +0 -1
- package/dist/types/advancedVSeed.d.ts +2531 -1942
- package/dist/types/builder/builder.d.ts +1 -1
- package/dist/types/builder/index.d.ts +0 -1
- package/dist/types/builder/spec.d.ts +0 -1
- package/dist/types/chartType/area/area.d.ts +43 -22
- package/dist/types/chartType/area/index.d.ts +0 -1
- package/dist/types/chartType/areaPercent/areaPercent.d.ts +43 -22
- package/dist/types/chartType/areaPercent/index.d.ts +0 -1
- package/dist/types/chartType/bar/bar.d.ts +43 -22
- package/dist/types/chartType/bar/index.d.ts +0 -1
- package/dist/types/chartType/barParallel/barParallel.d.ts +43 -22
- package/dist/types/chartType/barParallel/index.d.ts +0 -1
- package/dist/types/chartType/barPercent/barPercent.d.ts +43 -22
- package/dist/types/chartType/barPercent/index.d.ts +0 -1
- package/dist/types/chartType/column/column.d.ts +43 -22
- package/dist/types/chartType/column/index.d.ts +0 -1
- package/dist/types/chartType/columnParallel/columnParallel.d.ts +43 -22
- package/dist/types/chartType/columnParallel/index.d.ts +0 -1
- package/dist/types/chartType/columnPercent/columnPercent.d.ts +43 -22
- package/dist/types/chartType/columnPercent/index.d.ts +0 -1
- package/dist/types/chartType/donut/donut.d.ts +41 -22
- package/dist/types/chartType/donut/index.d.ts +0 -1
- package/dist/types/chartType/dualAxis/dualAxis.d.ts +3 -4
- package/dist/types/chartType/dualAxis/index.d.ts +0 -1
- package/dist/types/chartType/funnel/funnel.d.ts +41 -22
- package/dist/types/chartType/funnel/index.d.ts +0 -1
- package/dist/types/chartType/index.d.ts +3 -4
- package/dist/types/chartType/line/index.d.ts +0 -1
- package/dist/types/chartType/line/line.d.ts +43 -22
- package/dist/types/chartType/pie/index.d.ts +0 -1
- package/dist/types/chartType/pie/pie.d.ts +41 -22
- package/dist/types/chartType/pivotTable/index.d.ts +1 -2
- package/dist/types/chartType/pivotTable/pivotTable.d.ts +58 -4
- package/dist/types/chartType/rose/index.d.ts +0 -1
- package/dist/types/chartType/rose/rose.d.ts +38 -19
- package/dist/types/chartType/roseParallel/index.d.ts +0 -1
- package/dist/types/chartType/roseParallel/roseParallel.d.ts +38 -19
- package/dist/types/chartType/scatter/index.d.ts +0 -1
- package/dist/types/chartType/scatter/scatter.d.ts +45 -22
- package/dist/types/chartType/table/index.d.ts +1 -2
- package/dist/types/chartType/table/table.d.ts +98 -5
- package/dist/types/dataSelector/index.d.ts +0 -1
- package/dist/types/dataSelector/selector.d.ts +0 -1
- package/dist/types/i18n/i18n.d.ts +0 -1
- package/dist/types/i18n/index.d.ts +0 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/pipeline/advancedVSeed/advancedVSeed.d.ts +0 -1
- package/dist/types/pipeline/advancedVSeed/index.d.ts +0 -1
- package/dist/types/pipeline/index.d.ts +0 -1
- package/dist/types/pipeline/pipeline.d.ts +0 -1
- package/dist/types/pipeline/spec/index.d.ts +0 -1
- package/dist/types/pipeline/spec/spec.d.ts +0 -1
- package/dist/types/properties/annotation/annotation.d.ts +0 -1
- package/dist/types/properties/annotation/annotationArea.d.ts +0 -1
- package/dist/types/properties/annotation/annotationHorizontalLine.d.ts +0 -1
- package/dist/types/properties/annotation/annotationPoint.d.ts +0 -1
- package/dist/types/properties/annotation/annotationVerticalLine.d.ts +0 -1
- package/dist/types/properties/annotation/index.d.ts +0 -1
- package/dist/types/properties/chartType/chartType.d.ts +0 -1
- package/dist/types/properties/chartType/index.d.ts +0 -1
- package/dist/types/properties/config/{axis.d.ts → axes/axis.d.ts} +12 -1
- package/dist/types/properties/config/{bandAxis.d.ts → axes/bandAxis.d.ts} +2 -3
- package/dist/types/properties/config/axes/index.d.ts +3 -0
- package/dist/types/properties/config/{linearAxis.d.ts → axes/linearAxis.d.ts} +4 -1
- package/dist/types/properties/{baseConfig → config/backgroundColor}/backgroundColor.d.ts +0 -1
- package/dist/types/properties/config/backgroundColor/index.d.ts +1 -0
- package/dist/types/properties/{baseConfig → config/color}/color.d.ts +0 -1
- package/dist/types/properties/config/color/index.d.ts +1 -0
- package/dist/types/properties/config/config.d.ts +3029 -7
- package/dist/types/properties/config/{crosshair.d.ts → crosshair/crosshair.d.ts} +0 -1
- package/dist/types/properties/config/crosshair/index.d.ts +1 -0
- package/dist/types/properties/config/index.d.ts +6 -4
- package/dist/types/properties/config/label/index.d.ts +1 -0
- package/dist/types/properties/{baseConfig → config/label}/label.d.ts +0 -1
- package/dist/types/properties/config/legend/index.d.ts +1 -0
- package/dist/types/properties/{baseConfig → config/legend}/legend.d.ts +0 -1
- package/dist/types/properties/config/stackCornerRadius/index.d.ts +1 -0
- package/dist/types/properties/config/{stackCornerRadius.d.ts → stackCornerRadius/stackCornerRadius.d.ts} +0 -1
- package/dist/types/properties/config/tooltip/index.d.ts +1 -0
- package/dist/types/properties/{baseConfig → config/tooltip}/tooltip.d.ts +0 -1
- package/dist/types/properties/dataset/dataset.d.ts +0 -1
- package/dist/types/properties/dataset/index.d.ts +0 -1
- package/dist/types/properties/datasetReshapeInfo/datasetReshapeInfo.d.ts +0 -1
- package/dist/types/properties/datasetReshapeInfo/index.d.ts +0 -1
- package/dist/types/properties/dimensions/dimensions.d.ts +48 -7
- package/dist/types/properties/dimensions/index.d.ts +1 -3
- package/dist/types/properties/encoding/encoding.d.ts +0 -1
- package/dist/types/properties/encoding/index.d.ts +0 -1
- package/dist/types/properties/index.d.ts +0 -2
- package/dist/types/properties/markStyle/areaStyle.d.ts +0 -1
- package/dist/types/properties/markStyle/barStyle.d.ts +0 -1
- package/dist/types/properties/markStyle/index.d.ts +0 -1
- package/dist/types/properties/markStyle/lineStyle.d.ts +0 -1
- package/dist/types/properties/markStyle/markStyle.d.ts +0 -1
- package/dist/types/properties/markStyle/pointStyle.d.ts +0 -1
- package/dist/types/properties/measures/format/formatter.d.ts +0 -1
- package/dist/types/properties/measures/format/index.d.ts +0 -1
- package/dist/types/properties/measures/format/numFormat.d.ts +99 -7
- package/dist/types/properties/measures/index.d.ts +0 -1
- package/dist/types/properties/measures/measures.d.ts +143 -32
- package/dist/types/properties/theme/customTheme.d.ts +2349 -3226
- package/dist/types/properties/theme/index.d.ts +0 -1
- package/dist/types/properties/theme/theme.d.ts +0 -1
- package/dist/types/vseed.d.ts +736 -271
- package/dist/umd/index.js +10010 -6159
- package/dist/umd/index.js.map +1 -1
- package/package.json +3 -1
- package/dist/builder/builder/build.d.ts.map +0 -1
- package/dist/builder/builder/buildAdvanced.d.ts.map +0 -1
- package/dist/builder/builder/buildSpec.d.ts.map +0 -1
- package/dist/builder/builder/builder.d.ts.map +0 -1
- package/dist/builder/builder/index.d.ts.map +0 -1
- package/dist/builder/index.d.ts.map +0 -1
- package/dist/builder/register/all.d.ts.map +0 -1
- package/dist/builder/register/chartType.d.ts.map +0 -1
- package/dist/builder/register/index.d.ts.map +0 -1
- package/dist/builder/register/theme.d.ts.map +0 -1
- package/dist/dataReshape/constant.d.ts.map +0 -1
- package/dist/dataReshape/dataReshapeFor1D1M.d.ts.map +0 -1
- package/dist/dataReshape/dataReshapeFor1D2M.d.ts.map +0 -1
- package/dist/dataReshape/dataReshapeFor2D1M.d.ts.map +0 -1
- package/dist/dataReshape/foldMeasures.d.ts.map +0 -1
- package/dist/dataReshape/index.d.ts.map +0 -1
- package/dist/dataReshape/unfoldDimensions.d.ts.map +0 -1
- package/dist/dataSelector/index.d.ts.map +0 -1
- package/dist/dataSelector/selector.d.ts.map +0 -1
- package/dist/i18n/i18n.d.ts.map +0 -1
- package/dist/i18n/index.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/pipeline/advanced/index.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipeline/area.d.ts +0 -3
- package/dist/pipeline/advanced/pipeline/area.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipeline/areaPercent.d.ts +0 -3
- package/dist/pipeline/advanced/pipeline/areaPercent.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipeline/bar.d.ts +0 -3
- package/dist/pipeline/advanced/pipeline/bar.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipeline/barParallel.d.ts +0 -3
- package/dist/pipeline/advanced/pipeline/barParallel.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipeline/barPercent.d.ts +0 -3
- package/dist/pipeline/advanced/pipeline/barPercent.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipeline/column.d.ts +0 -3
- package/dist/pipeline/advanced/pipeline/column.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipeline/columnParallel.d.ts +0 -3
- package/dist/pipeline/advanced/pipeline/columnParallel.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipeline/columnPercent.d.ts +0 -3
- package/dist/pipeline/advanced/pipeline/columnPercent.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipeline/donut.d.ts +0 -3
- package/dist/pipeline/advanced/pipeline/donut.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipeline/funnel.d.ts +0 -3
- package/dist/pipeline/advanced/pipeline/funnel.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipeline/index.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipeline/line.d.ts +0 -3
- package/dist/pipeline/advanced/pipeline/line.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipeline/pie.d.ts +0 -3
- package/dist/pipeline/advanced/pipeline/pie.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipeline/rose.d.ts +0 -3
- package/dist/pipeline/advanced/pipeline/rose.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipeline/roseParallel.d.ts +0 -3
- package/dist/pipeline/advanced/pipeline/roseParallel.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipeline/scatter.d.ts +0 -3
- package/dist/pipeline/advanced/pipeline/scatter.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/annotation/annotation.d.ts +0 -3
- package/dist/pipeline/advanced/pipes/annotation/annotation.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/annotation/index.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/baseConfig/baseConfig.d.ts +0 -4
- package/dist/pipeline/advanced/pipes/baseConfig/baseConfig.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/baseConfig/index.d.ts +0 -2
- package/dist/pipeline/advanced/pipes/baseConfig/index.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/config/config.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/config/index.d.ts +0 -2
- package/dist/pipeline/advanced/pipes/config/index.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/encoding/encodingFunnel.d.ts +0 -3
- package/dist/pipeline/advanced/pipes/encoding/encodingFunnel.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/encoding/encodingPie.d.ts +0 -3
- package/dist/pipeline/advanced/pipes/encoding/encodingPie.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/encoding/encodingRose.d.ts +0 -3
- package/dist/pipeline/advanced/pipes/encoding/encodingRose.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/encoding/encodingXY.d.ts +0 -3
- package/dist/pipeline/advanced/pipes/encoding/encodingXY.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/encoding/encodingYX.d.ts +0 -3
- package/dist/pipeline/advanced/pipes/encoding/encodingYX.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/encoding/encodingYY.d.ts +0 -3
- package/dist/pipeline/advanced/pipes/encoding/encodingYY.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/encoding/index.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/i18n/index.d.ts +0 -2
- package/dist/pipeline/advanced/pipes/i18n/index.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/i18n/locale.d.ts +0 -3
- package/dist/pipeline/advanced/pipes/i18n/locale.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/index.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/init/autoDimensions.d.ts +0 -3
- package/dist/pipeline/advanced/pipes/init/autoDimensions.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/init/autoMeasures.d.ts +0 -3
- package/dist/pipeline/advanced/pipes/init/autoMeasures.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/init/index.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/init/initAdvancedVSeed.d.ts +0 -3
- package/dist/pipeline/advanced/pipes/init/initAdvancedVSeed.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/init/utils.d.ts +0 -2
- package/dist/pipeline/advanced/pipes/init/utils.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/markStyle/index.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/markStyle/markStyle.d.ts +0 -3
- package/dist/pipeline/advanced/pipes/markStyle/markStyle.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/pivot/index.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/pivot/pivotAdapter.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/reshape/index.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/reshape/pivotReshapeTo1D1M.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/reshape/pivotReshapeTo1D2M.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/reshape/pivotReshapeTo2D1M.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/reshape/reshapeTo1D1M.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/reshape/reshapeTo1D2M.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/reshape/reshapeTo2D1M.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/theme/index.d.ts +0 -2
- package/dist/pipeline/advanced/pipes/theme/index.d.ts.map +0 -1
- package/dist/pipeline/advanced/pipes/theme/theme.d.ts +0 -4
- package/dist/pipeline/advanced/pipes/theme/theme.d.ts.map +0 -1
- package/dist/pipeline/constant.d.ts.map +0 -1
- package/dist/pipeline/index.d.ts.map +0 -1
- package/dist/pipeline/spec/index.d.ts.map +0 -1
- package/dist/pipeline/spec/pipeline/area.d.ts +0 -2
- package/dist/pipeline/spec/pipeline/area.d.ts.map +0 -1
- package/dist/pipeline/spec/pipeline/areaPercent.d.ts +0 -2
- package/dist/pipeline/spec/pipeline/areaPercent.d.ts.map +0 -1
- package/dist/pipeline/spec/pipeline/bar.d.ts +0 -3
- package/dist/pipeline/spec/pipeline/bar.d.ts.map +0 -1
- package/dist/pipeline/spec/pipeline/barParallel.d.ts +0 -3
- package/dist/pipeline/spec/pipeline/barParallel.d.ts.map +0 -1
- package/dist/pipeline/spec/pipeline/barPercent.d.ts +0 -3
- package/dist/pipeline/spec/pipeline/barPercent.d.ts.map +0 -1
- package/dist/pipeline/spec/pipeline/column.d.ts +0 -2
- package/dist/pipeline/spec/pipeline/column.d.ts.map +0 -1
- package/dist/pipeline/spec/pipeline/columnParallel.d.ts +0 -3
- package/dist/pipeline/spec/pipeline/columnParallel.d.ts.map +0 -1
- package/dist/pipeline/spec/pipeline/columnPercent.d.ts +0 -3
- package/dist/pipeline/spec/pipeline/columnPercent.d.ts.map +0 -1
- package/dist/pipeline/spec/pipeline/donut.d.ts +0 -3
- package/dist/pipeline/spec/pipeline/donut.d.ts.map +0 -1
- package/dist/pipeline/spec/pipeline/funnel.d.ts +0 -3
- package/dist/pipeline/spec/pipeline/funnel.d.ts.map +0 -1
- package/dist/pipeline/spec/pipeline/index.d.ts.map +0 -1
- package/dist/pipeline/spec/pipeline/line.d.ts +0 -3
- package/dist/pipeline/spec/pipeline/line.d.ts.map +0 -1
- package/dist/pipeline/spec/pipeline/pie.d.ts +0 -3
- package/dist/pipeline/spec/pipeline/pie.d.ts.map +0 -1
- package/dist/pipeline/spec/pipeline/rose.d.ts +0 -2
- package/dist/pipeline/spec/pipeline/rose.d.ts.map +0 -1
- package/dist/pipeline/spec/pipeline/roseParallel.d.ts +0 -3
- package/dist/pipeline/spec/pipeline/roseParallel.d.ts.map +0 -1
- package/dist/pipeline/spec/pipeline/scatter.d.ts +0 -3
- package/dist/pipeline/spec/pipeline/scatter.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/index.d.ts +0 -15
- package/dist/pipeline/spec/pipes/index.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/annotation/annotationArea.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/annotation/annotationAreaBand.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/annotation/annotationHorizontalLine.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/annotation/annotationPoint.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/annotation/annotationVerticalLine.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/annotation/index.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/annotation/utils.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/axes/a.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/axes/angle.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/axes/index.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/axes/radius.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/axes/xBand.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/axes/xLinear.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/axes/yBand.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/axes/yLinear.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/backgroundColor/background.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/backgroundColor/index.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/color/color.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/color/index.d.ts +0 -2
- package/dist/pipeline/spec/pipes/vchart/color/index.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/crosshair/horizontalCrosshairLine.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/crosshair/horizontalCrosshairRect.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/crosshair/index.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/crosshair/verticalCrosshairLine.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/crosshair/verticalCrosshairRect.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/dataset/dataset.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/dataset/datasetPivot.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/dataset/index.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/init/area.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/init/bar.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/init/barParallel.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/init/column.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/init/columnParallel.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/init/donut.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/init/funnel.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/init/index.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/init/line.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/init/pie.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/init/pivot.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/init/rose.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/init/roseParallel.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/init/scatter.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/label/index.d.ts +0 -2
- package/dist/pipeline/spec/pipes/vchart/label/index.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/label/label.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/legend/discreteLegend.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/legend/index.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/legend/pivotDiscreteLegend.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/markStyle/areaStyle.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/markStyle/barStyle.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/markStyle/index.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/markStyle/lineStyle.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/markStyle/pointState.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/markStyle/pointStyle.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/percent/index.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/percent/percent.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/pivotChart/index.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/pivotChart/pivotAdapter.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/pivotChart/pivotColumnDimensions.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/pivotChart/pivotGridStyle.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/pivotChart/pivotIndicators.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/pivotChart/pivotRowDimensions.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/stack/index.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/stack/stack.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/stack/stackCornerRadius.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/tooltip/index.d.ts.map +0 -1
- package/dist/pipeline/spec/pipes/vchart/tooltip/tooltip.d.ts.map +0 -1
- package/dist/pipeline/utils/chatType.d.ts.map +0 -1
- package/dist/pipeline/utils/format/createFormatter.d.ts.map +0 -1
- package/dist/pipeline/utils/format/createNumFormatter.d.ts.map +0 -1
- package/dist/pipeline/utils/format/index.d.ts.map +0 -1
- package/dist/pipeline/utils/index.d.ts.map +0 -1
- package/dist/pipeline/utils/measures/findMeasureById.d.ts +0 -4
- package/dist/pipeline/utils/measures/findMeasureById.d.ts.map +0 -1
- package/dist/pipeline/utils/measures/index.d.ts.map +0 -1
- package/dist/pipeline/utils/pipeline.d.ts.map +0 -1
- package/dist/theme/dark.d.ts.map +0 -1
- package/dist/theme/index.d.ts.map +0 -1
- package/dist/theme/light.d.ts.map +0 -1
- package/dist/types/advancedVSeed.d.ts.map +0 -1
- package/dist/types/builder/builder.d.ts.map +0 -1
- package/dist/types/builder/index.d.ts.map +0 -1
- package/dist/types/builder/spec.d.ts.map +0 -1
- package/dist/types/chartType/area/area.d.ts.map +0 -1
- package/dist/types/chartType/area/index.d.ts.map +0 -1
- package/dist/types/chartType/areaPercent/areaPercent.d.ts.map +0 -1
- package/dist/types/chartType/areaPercent/index.d.ts.map +0 -1
- package/dist/types/chartType/bar/bar.d.ts.map +0 -1
- package/dist/types/chartType/bar/index.d.ts.map +0 -1
- package/dist/types/chartType/barParallel/barParallel.d.ts.map +0 -1
- package/dist/types/chartType/barParallel/index.d.ts.map +0 -1
- package/dist/types/chartType/barPercent/barPercent.d.ts.map +0 -1
- package/dist/types/chartType/barPercent/index.d.ts.map +0 -1
- package/dist/types/chartType/column/column.d.ts.map +0 -1
- package/dist/types/chartType/column/index.d.ts.map +0 -1
- package/dist/types/chartType/columnParallel/columnParallel.d.ts.map +0 -1
- package/dist/types/chartType/columnParallel/index.d.ts.map +0 -1
- package/dist/types/chartType/columnPercent/columnPercent.d.ts.map +0 -1
- package/dist/types/chartType/columnPercent/index.d.ts.map +0 -1
- package/dist/types/chartType/donut/donut.d.ts.map +0 -1
- package/dist/types/chartType/donut/index.d.ts.map +0 -1
- package/dist/types/chartType/dualAxis/dualAxis.d.ts.map +0 -1
- package/dist/types/chartType/dualAxis/index.d.ts.map +0 -1
- package/dist/types/chartType/funnel/funnel.d.ts.map +0 -1
- package/dist/types/chartType/funnel/index.d.ts.map +0 -1
- package/dist/types/chartType/index.d.ts.map +0 -1
- package/dist/types/chartType/line/index.d.ts.map +0 -1
- package/dist/types/chartType/line/line.d.ts.map +0 -1
- package/dist/types/chartType/pie/index.d.ts.map +0 -1
- package/dist/types/chartType/pie/pie.d.ts.map +0 -1
- package/dist/types/chartType/pivotTable/index.d.ts.map +0 -1
- package/dist/types/chartType/pivotTable/pivotTable.d.ts.map +0 -1
- package/dist/types/chartType/rose/index.d.ts.map +0 -1
- package/dist/types/chartType/rose/rose.d.ts.map +0 -1
- package/dist/types/chartType/roseParallel/index.d.ts.map +0 -1
- package/dist/types/chartType/roseParallel/roseParallel.d.ts.map +0 -1
- package/dist/types/chartType/scatter/index.d.ts.map +0 -1
- package/dist/types/chartType/scatter/scatter.d.ts.map +0 -1
- package/dist/types/chartType/table/index.d.ts.map +0 -1
- package/dist/types/chartType/table/table.d.ts.map +0 -1
- package/dist/types/dataSelector/index.d.ts.map +0 -1
- package/dist/types/dataSelector/selector.d.ts.map +0 -1
- package/dist/types/i18n/i18n.d.ts.map +0 -1
- package/dist/types/i18n/index.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/pipeline/advancedVSeed/advancedVSeed.d.ts.map +0 -1
- package/dist/types/pipeline/advancedVSeed/index.d.ts.map +0 -1
- package/dist/types/pipeline/index.d.ts.map +0 -1
- package/dist/types/pipeline/pipeline.d.ts.map +0 -1
- package/dist/types/pipeline/spec/index.d.ts.map +0 -1
- package/dist/types/pipeline/spec/spec.d.ts.map +0 -1
- package/dist/types/properties/annotation/annotation.d.ts.map +0 -1
- package/dist/types/properties/annotation/annotationArea.d.ts.map +0 -1
- package/dist/types/properties/annotation/annotationHorizontalLine.d.ts.map +0 -1
- package/dist/types/properties/annotation/annotationPoint.d.ts.map +0 -1
- package/dist/types/properties/annotation/annotationVerticalLine.d.ts.map +0 -1
- package/dist/types/properties/annotation/index.d.ts.map +0 -1
- package/dist/types/properties/baseConfig/backgroundColor.d.ts.map +0 -1
- package/dist/types/properties/baseConfig/baseConfig.d.ts +0 -147
- package/dist/types/properties/baseConfig/baseConfig.d.ts.map +0 -1
- package/dist/types/properties/baseConfig/color.d.ts.map +0 -1
- package/dist/types/properties/baseConfig/index.d.ts +0 -13
- package/dist/types/properties/baseConfig/index.d.ts.map +0 -1
- package/dist/types/properties/baseConfig/label.d.ts.map +0 -1
- package/dist/types/properties/baseConfig/legend.d.ts.map +0 -1
- package/dist/types/properties/baseConfig/tooltip.d.ts.map +0 -1
- package/dist/types/properties/chartType/chartType.d.ts.map +0 -1
- package/dist/types/properties/chartType/index.d.ts.map +0 -1
- package/dist/types/properties/config/axis.d.ts.map +0 -1
- package/dist/types/properties/config/bandAxis.d.ts.map +0 -1
- package/dist/types/properties/config/config.d.ts.map +0 -1
- package/dist/types/properties/config/crosshair.d.ts.map +0 -1
- package/dist/types/properties/config/index.d.ts.map +0 -1
- package/dist/types/properties/config/linearAxis.d.ts.map +0 -1
- package/dist/types/properties/config/stackCornerRadius.d.ts.map +0 -1
- package/dist/types/properties/dataset/dataset.d.ts.map +0 -1
- package/dist/types/properties/dataset/index.d.ts.map +0 -1
- package/dist/types/properties/datasetReshapeInfo/datasetReshapeInfo.d.ts.map +0 -1
- package/dist/types/properties/datasetReshapeInfo/index.d.ts.map +0 -1
- package/dist/types/properties/dimensions/dimensions.d.ts.map +0 -1
- package/dist/types/properties/dimensions/index.d.ts.map +0 -1
- package/dist/types/properties/encoding/encoding.d.ts.map +0 -1
- package/dist/types/properties/encoding/index.d.ts.map +0 -1
- package/dist/types/properties/index.d.ts.map +0 -1
- package/dist/types/properties/markStyle/areaStyle.d.ts.map +0 -1
- package/dist/types/properties/markStyle/barStyle.d.ts.map +0 -1
- package/dist/types/properties/markStyle/index.d.ts.map +0 -1
- package/dist/types/properties/markStyle/lineStyle.d.ts.map +0 -1
- package/dist/types/properties/markStyle/markStyle.d.ts.map +0 -1
- package/dist/types/properties/markStyle/pointStyle.d.ts.map +0 -1
- package/dist/types/properties/measures/format/formatter.d.ts.map +0 -1
- package/dist/types/properties/measures/format/index.d.ts.map +0 -1
- package/dist/types/properties/measures/format/numFormat.d.ts.map +0 -1
- package/dist/types/properties/measures/index.d.ts.map +0 -1
- package/dist/types/properties/measures/measures.d.ts.map +0 -1
- package/dist/types/properties/theme/customTheme.d.ts.map +0 -1
- package/dist/types/properties/theme/index.d.ts.map +0 -1
- package/dist/types/properties/theme/theme.d.ts.map +0 -1
- package/dist/types/vseed.d.ts.map +0 -1
- package/dist/umd/999.js +0 -3574
- package/dist/umd/999.js.map +0 -1
package/dist/index.js
CHANGED
@@ -1,30 +1,34 @@
|
|
1
|
-
import { clone
|
1
|
+
import { clone, groupBy, isArray, isEmpty, isNullish, isNumber, isString, mergeDeep, omit, pick, unique } from "remeda";
|
2
2
|
import { z } from "zod";
|
3
3
|
const initAdvancedVSeed = (advancedVSeed, context)=>{
|
4
4
|
const { vseed } = context;
|
5
|
-
const { chartType } = vseed;
|
5
|
+
const { chartType, locale } = vseed;
|
6
6
|
return {
|
7
7
|
...advancedVSeed,
|
8
|
-
chartType
|
8
|
+
chartType,
|
9
|
+
locale: locale || 'zh-CN'
|
9
10
|
};
|
10
11
|
};
|
11
12
|
const execPipeline = (pipeline, context, initialValue = {})=>{
|
12
13
|
const result = pipeline.reduce((prev, cur)=>cur(prev, context), initialValue);
|
13
14
|
return result;
|
14
15
|
};
|
15
|
-
const
|
16
|
+
const isTable = (vseed)=>'table' === vseed.chartType;
|
17
|
+
const isPivotTable = (vseed)=>'pivotTable' === vseed.chartType;
|
18
|
+
const isVTable = (vseed)=>[
|
16
19
|
'table',
|
17
20
|
'pivotTable'
|
18
|
-
].includes(chartType);
|
19
|
-
const isVChart = (
|
21
|
+
].includes(vseed.chartType);
|
22
|
+
const isVChart = (vseed)=>!isVTable(vseed);
|
20
23
|
const isPivotChart = (vseed)=>{
|
21
|
-
|
24
|
+
if (isVTable(vseed)) return false;
|
25
|
+
const { measures = [], dimensions = [] } = vseed;
|
22
26
|
const hasRowOrColumnDimension = dimensions && dimensions.some((dimension)=>'rowDimension' === dimension.location || 'columnDimension' === dimension.location);
|
23
27
|
const hasMeasureGroup = measures && measures.find((measure)=>measure && measure.children);
|
24
28
|
return hasRowOrColumnDimension || hasMeasureGroup;
|
25
29
|
};
|
26
30
|
var i18n_namespaceObject = JSON.parse('{"指标名称":{"en-US":"MeasureName","zh-CN":"指标名称"},"指标Id":{"en-US":"MeasureId","zh-CN":"指标Id"},"指标值":{"en-US":"MeasureValue","zh-CN":"指标值"}}');
|
27
|
-
class
|
31
|
+
class i18n_Intl {
|
28
32
|
static instance;
|
29
33
|
translateMap = i18n_namespaceObject;
|
30
34
|
locale = 'zh-CN';
|
@@ -43,14 +47,34 @@ class Intl {
|
|
43
47
|
};
|
44
48
|
getLocale = ()=>this.locale;
|
45
49
|
static getInstance() {
|
46
|
-
if (!
|
47
|
-
return
|
50
|
+
if (!i18n_Intl.instance) i18n_Intl.instance = new i18n_Intl();
|
51
|
+
return i18n_Intl.instance;
|
48
52
|
}
|
49
53
|
}
|
50
|
-
const intl =
|
54
|
+
const intl = i18n_Intl.getInstance();
|
51
55
|
const i18n = intl.i18n;
|
52
|
-
const createNumFormatter = (format)=>{
|
53
|
-
const { type = 'number', ratio = 1, symbol = '', thousandSeparator = true,
|
56
|
+
const createNumFormatter = (format, locale = intl.getLocale())=>{
|
57
|
+
const { type = 'number', ratio = 1, symbol = '', thousandSeparator = true, prefix = '', suffix = '', fractionDigits = 2, significantDigits, roundingMode = 'halfExpand', roundingPriority = 'auto' } = format || {};
|
58
|
+
const numFormatterOptions = {
|
59
|
+
style: 'decimal',
|
60
|
+
notation: 'scientific' === type ? 'scientific' : 'standard',
|
61
|
+
roundingMode,
|
62
|
+
roundingPriority
|
63
|
+
};
|
64
|
+
console.log('debug roundingMode', roundingMode);
|
65
|
+
if (isNumber(fractionDigits)) {
|
66
|
+
if (fractionDigits >= 0) {
|
67
|
+
numFormatterOptions.minimumFractionDigits = fractionDigits;
|
68
|
+
numFormatterOptions.maximumFractionDigits = fractionDigits;
|
69
|
+
}
|
70
|
+
}
|
71
|
+
if (isNumber(significantDigits) && significantDigits > 0) {
|
72
|
+
if (significantDigits > 0) {
|
73
|
+
numFormatterOptions.minimumSignificantDigits = significantDigits;
|
74
|
+
numFormatterOptions.maximumSignificantDigits = significantDigits;
|
75
|
+
}
|
76
|
+
}
|
77
|
+
const numFormatter = new Intl.NumberFormat(locale, numFormatterOptions);
|
54
78
|
return (value)=>{
|
55
79
|
let num = Number(value);
|
56
80
|
let typeSymbol = '';
|
@@ -62,9 +86,7 @@ const createNumFormatter = (format)=>{
|
|
62
86
|
num *= 1000;
|
63
87
|
typeSymbol = "\u2030";
|
64
88
|
} else if ('number' === type) num /= ratio || 1;
|
65
|
-
|
66
|
-
num = Math[round](num * multiplier) / multiplier;
|
67
|
-
let numStr = num.toFixed(decimalPlaces);
|
89
|
+
let numStr = numFormatter.format(num);
|
68
90
|
if (thousandSeparator) {
|
69
91
|
const parts = numStr.split('.');
|
70
92
|
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
@@ -77,105 +99,105 @@ const autoNumFormatter = (value, locale = intl.getLocale())=>{
|
|
77
99
|
if (null == value) return String(value);
|
78
100
|
const num = Number(value);
|
79
101
|
if (Number.isNaN(num)) return String(value);
|
80
|
-
const
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
};
|
89
|
-
|
90
|
-
type: 'number',
|
91
|
-
decimalPlaces: countDecimalPlaces(num),
|
92
|
-
round: 'round',
|
93
|
-
thousandSeparator: true
|
94
|
-
};
|
95
|
-
const rules = NUMBER_FORMAT_RULES[locale] || NUMBER_FORMAT_RULES['default'];
|
96
|
-
for (const rule of rules)if (num >= rule.threshold) {
|
97
|
-
numFormat.ratio = rule.ratio;
|
98
|
-
numFormat.symbol = rule.symbol;
|
99
|
-
break;
|
100
|
-
}
|
101
|
-
return createNumFormatter(numFormat)(value);
|
102
|
-
};
|
103
|
-
const NUMBER_FORMAT_RULES = {
|
104
|
-
'zh-CN': [
|
105
|
-
{
|
106
|
-
threshold: 100000000,
|
107
|
-
ratio: 100000000,
|
108
|
-
symbol: "\u4EBF"
|
109
|
-
},
|
110
|
-
{
|
111
|
-
threshold: 10000,
|
112
|
-
ratio: 10000,
|
113
|
-
symbol: "\u4E07"
|
114
|
-
}
|
115
|
-
],
|
116
|
-
'en-US': [
|
117
|
-
{
|
118
|
-
threshold: 1000000000,
|
119
|
-
ratio: 1000000000,
|
120
|
-
symbol: 'B'
|
121
|
-
},
|
122
|
-
{
|
123
|
-
threshold: 1000000,
|
124
|
-
ratio: 1000000,
|
125
|
-
symbol: 'M'
|
126
|
-
},
|
127
|
-
{
|
128
|
-
threshold: 1000,
|
129
|
-
ratio: 1000,
|
130
|
-
symbol: 'K'
|
131
|
-
}
|
132
|
-
],
|
133
|
-
default: [
|
134
|
-
{
|
135
|
-
threshold: 1000000000,
|
136
|
-
ratio: 1000000000,
|
137
|
-
symbol: 'B'
|
138
|
-
},
|
139
|
-
{
|
140
|
-
threshold: 1000000,
|
141
|
-
ratio: 1000000,
|
142
|
-
symbol: 'M'
|
143
|
-
},
|
144
|
-
{
|
145
|
-
threshold: 1000,
|
146
|
-
ratio: 1000,
|
147
|
-
symbol: 'K'
|
148
|
-
}
|
149
|
-
]
|
102
|
+
const numFormatterOptions = {
|
103
|
+
style: 'decimal',
|
104
|
+
notation: 'compact'
|
105
|
+
};
|
106
|
+
numFormatterOptions.minimumFractionDigits = 0;
|
107
|
+
numFormatterOptions.maximumFractionDigits = 2;
|
108
|
+
const numFormatter = new Intl.NumberFormat(locale, {
|
109
|
+
...numFormatterOptions
|
110
|
+
});
|
111
|
+
return numFormatter.format(Number(value));
|
150
112
|
};
|
151
113
|
const createFormatter = (format)=>createNumFormatter(format);
|
152
114
|
const autoFormatter = (value, locale)=>autoNumFormatter(value, locale);
|
153
|
-
const
|
154
|
-
if (!
|
115
|
+
const preorderTraverse = (tree, callback)=>{
|
116
|
+
if (!tree || 0 === tree.length) return;
|
155
117
|
const stack = [
|
156
|
-
...
|
157
|
-
];
|
118
|
+
...tree
|
119
|
+
].reverse();
|
158
120
|
while(stack.length > 0){
|
159
|
-
const
|
160
|
-
|
161
|
-
if (
|
162
|
-
if ('children' in
|
121
|
+
const node = stack.pop();
|
122
|
+
const stop = callback(node);
|
123
|
+
if (true === stop) return;
|
124
|
+
if (!('children' in node)) continue;
|
125
|
+
const children = node.children;
|
126
|
+
if (children && children.length > 0) for(let i = children.length - 1; i >= 0; i--){
|
127
|
+
const child = children[i];
|
128
|
+
stack.push(child);
|
129
|
+
}
|
163
130
|
}
|
164
131
|
};
|
165
|
-
const
|
132
|
+
const findMeasureById = (measures = [], id)=>{
|
166
133
|
if (!measures) return;
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
if ('children' in current && current.children) {
|
175
|
-
const children = (current.children || []).reverse();
|
176
|
-
stack.push(...children);
|
134
|
+
let result;
|
135
|
+
preorderTraverse(measures, (node)=>{
|
136
|
+
if (!('children' in node)) {
|
137
|
+
if (node.id === id) {
|
138
|
+
result = node;
|
139
|
+
return true;
|
140
|
+
}
|
177
141
|
}
|
178
|
-
|
142
|
+
return false;
|
143
|
+
});
|
144
|
+
return result;
|
145
|
+
};
|
146
|
+
const findFirstMeasure = (measures = [])=>{
|
147
|
+
if (!measures) return;
|
148
|
+
let result;
|
149
|
+
preorderTraverse(measures, (node)=>{
|
150
|
+
if (!('children' in node)) {
|
151
|
+
result = node;
|
152
|
+
return true;
|
153
|
+
}
|
154
|
+
return false;
|
155
|
+
});
|
156
|
+
return result;
|
157
|
+
};
|
158
|
+
const findAllMeasures = (measures = [])=>{
|
159
|
+
if (!measures) return [];
|
160
|
+
const result = [];
|
161
|
+
preorderTraverse(measures, (node)=>{
|
162
|
+
if (!('children' in node)) result.push(node);
|
163
|
+
return false;
|
164
|
+
});
|
165
|
+
return result;
|
166
|
+
};
|
167
|
+
const findDimensionById = (dimensions = [], id)=>{
|
168
|
+
if (!dimensions) return;
|
169
|
+
let result;
|
170
|
+
preorderTraverse(dimensions, (node)=>{
|
171
|
+
if (!('children' in node)) {
|
172
|
+
if (node.id === id) {
|
173
|
+
result = node;
|
174
|
+
return true;
|
175
|
+
}
|
176
|
+
}
|
177
|
+
return false;
|
178
|
+
});
|
179
|
+
return result;
|
180
|
+
};
|
181
|
+
const findFirstDimension = (dimensions = [])=>{
|
182
|
+
if (!dimensions) return;
|
183
|
+
let result;
|
184
|
+
preorderTraverse(dimensions, (node)=>{
|
185
|
+
if (!('children' in node)) {
|
186
|
+
result = node;
|
187
|
+
return true;
|
188
|
+
}
|
189
|
+
return false;
|
190
|
+
});
|
191
|
+
return result;
|
192
|
+
};
|
193
|
+
const findAllDimensions = (dimensions = [])=>{
|
194
|
+
if (!dimensions) return [];
|
195
|
+
const result = [];
|
196
|
+
preorderTraverse(dimensions, (node)=>{
|
197
|
+
if (!('children' in node)) result.push(node);
|
198
|
+
return false;
|
199
|
+
});
|
200
|
+
return result;
|
179
201
|
};
|
180
202
|
const autoMeasures = (advancedVSeed, context)=>{
|
181
203
|
const result = {
|
@@ -254,7 +276,7 @@ const autoDimensions = (advancedVSeed, context)=>{
|
|
254
276
|
};
|
255
277
|
const { vseed } = context;
|
256
278
|
const { dimensions, dataset } = vseed;
|
257
|
-
const
|
279
|
+
const measures = findAllMeasures(advancedVSeed.measures);
|
258
280
|
if (!dataset) throw new Error('dataset is required');
|
259
281
|
if (0 === dataset.length) return result;
|
260
282
|
if (dimensions) {
|
@@ -307,7 +329,10 @@ const unfoldDimensions = (dataset, dimensions, measures, unfoldStartIndex = 0, u
|
|
307
329
|
for(let i = 0; i < dataset.length; i++){
|
308
330
|
const datum = dataset[i];
|
309
331
|
const colorName = generateDimGroupName(dimensionsToBeUnfolded, datum, dimensionsSeparator);
|
310
|
-
const colorId =
|
332
|
+
const colorId = [
|
333
|
+
colorName,
|
334
|
+
datum[foldMeasureId] || 'id'
|
335
|
+
].join(dimensionsSeparator);
|
311
336
|
datum[unfoldGroupName] = colorName;
|
312
337
|
datum[unfoldGroupId] = colorId;
|
313
338
|
colorItems.push(colorId);
|
@@ -607,7 +632,8 @@ const pivotReshapeTo1D1M = (advancedVSeed, context)=>{
|
|
607
632
|
};
|
608
633
|
const { vseed } = context;
|
609
634
|
const { dataset } = vseed;
|
610
|
-
const {
|
635
|
+
const { measures } = advancedVSeed;
|
636
|
+
const dimensions = advancedVSeed.dimensions;
|
611
637
|
if (!measures || !dimensions) return result;
|
612
638
|
const measureGroups = [];
|
613
639
|
if (measures) measures.forEach((measure)=>{
|
@@ -646,7 +672,8 @@ const pivotReshapeTo1D2M = (advancedVSeed, context)=>{
|
|
646
672
|
};
|
647
673
|
const { vseed } = context;
|
648
674
|
const { dataset } = vseed;
|
649
|
-
const {
|
675
|
+
const { measures } = advancedVSeed;
|
676
|
+
const dimensions = advancedVSeed.dimensions;
|
650
677
|
if (!measures || !dimensions) return result;
|
651
678
|
const measureGroups = [];
|
652
679
|
if (measures) measures.forEach((measure)=>{
|
@@ -685,7 +712,8 @@ const pivotReshapeTo2D1M = (advancedVSeed, context)=>{
|
|
685
712
|
};
|
686
713
|
const { vseed } = context;
|
687
714
|
const { dataset } = vseed;
|
688
|
-
const {
|
715
|
+
const { measures } = advancedVSeed;
|
716
|
+
const dimensions = advancedVSeed.dimensions;
|
689
717
|
if (!measures || !dimensions) return result;
|
690
718
|
const measureGroups = [];
|
691
719
|
if (measures) measures.forEach((measure)=>{
|
@@ -790,6 +818,42 @@ const encodingYX = (advancedVSeed)=>{
|
|
790
818
|
encoding
|
791
819
|
};
|
792
820
|
};
|
821
|
+
const encodingYY = (advancedVSeed)=>{
|
822
|
+
const result = {
|
823
|
+
...advancedVSeed
|
824
|
+
};
|
825
|
+
const { datasetReshapeInfo, measures } = advancedVSeed;
|
826
|
+
if (!datasetReshapeInfo || !measures) return result;
|
827
|
+
const firstMeasure = findFirstMeasure(measures);
|
828
|
+
const encoding = datasetReshapeInfo.reduce((prev, cur)=>{
|
829
|
+
const { foldInfo, unfoldInfo } = cur;
|
830
|
+
const x = [
|
831
|
+
firstMeasure?.id
|
832
|
+
];
|
833
|
+
const y = [
|
834
|
+
foldInfo.measureValue
|
835
|
+
];
|
836
|
+
const group = [
|
837
|
+
unfoldInfo.groupId
|
838
|
+
];
|
839
|
+
const color = [
|
840
|
+
unfoldInfo.groupId
|
841
|
+
];
|
842
|
+
return [
|
843
|
+
...prev,
|
844
|
+
{
|
845
|
+
x,
|
846
|
+
y,
|
847
|
+
group,
|
848
|
+
color
|
849
|
+
}
|
850
|
+
];
|
851
|
+
}, []);
|
852
|
+
return {
|
853
|
+
...result,
|
854
|
+
encoding
|
855
|
+
};
|
856
|
+
};
|
793
857
|
const encodingRose = (advancedVSeed)=>{
|
794
858
|
const result = {
|
795
859
|
...advancedVSeed
|
@@ -893,32 +957,18 @@ const encodingFunnel = (advancedVSeed)=>{
|
|
893
957
|
encoding
|
894
958
|
};
|
895
959
|
};
|
896
|
-
const
|
960
|
+
const lineConfig = (advancedVSeed, context)=>{
|
897
961
|
const { vseed } = context;
|
962
|
+
const { chartType } = vseed;
|
898
963
|
const result = {
|
899
964
|
...advancedVSeed
|
900
965
|
};
|
901
|
-
const config =
|
966
|
+
const config = pick(vseed, [
|
902
967
|
'backgroundColor',
|
903
968
|
'color',
|
904
969
|
'label',
|
905
970
|
'legend',
|
906
|
-
'tooltip'
|
907
|
-
]);
|
908
|
-
result.baseConfig = {
|
909
|
-
vchart: {
|
910
|
-
...config
|
911
|
-
}
|
912
|
-
};
|
913
|
-
return result;
|
914
|
-
};
|
915
|
-
const lineConfig = (advancedVSeed, context)=>{
|
916
|
-
const { vseed } = context;
|
917
|
-
const { chartType } = vseed;
|
918
|
-
const result = {
|
919
|
-
...advancedVSeed
|
920
|
-
};
|
921
|
-
const config = external_remeda_pick(vseed, [
|
971
|
+
'tooltip',
|
922
972
|
'xAxis',
|
923
973
|
'yAxis',
|
924
974
|
'crosshairLine'
|
@@ -937,7 +987,12 @@ const columnConfig = (advancedVSeed, context)=>{
|
|
937
987
|
const result = {
|
938
988
|
...advancedVSeed
|
939
989
|
};
|
940
|
-
const config =
|
990
|
+
const config = pick(vseed, [
|
991
|
+
'backgroundColor',
|
992
|
+
'color',
|
993
|
+
'label',
|
994
|
+
'legend',
|
995
|
+
'tooltip',
|
941
996
|
'xAxis',
|
942
997
|
'yAxis',
|
943
998
|
'crosshairRect',
|
@@ -957,7 +1012,13 @@ const pieConfig = (advancedVSeed, context)=>{
|
|
957
1012
|
const result = {
|
958
1013
|
...advancedVSeed
|
959
1014
|
};
|
960
|
-
const config =
|
1015
|
+
const config = pick(vseed, [
|
1016
|
+
'backgroundColor',
|
1017
|
+
'color',
|
1018
|
+
'label',
|
1019
|
+
'legend',
|
1020
|
+
'tooltip'
|
1021
|
+
]);
|
961
1022
|
result.config = {
|
962
1023
|
...result.config || {},
|
963
1024
|
[chartType]: {
|
@@ -978,29 +1039,27 @@ const donutConfig = pieConfig;
|
|
978
1039
|
const roseConfig = pieConfig;
|
979
1040
|
const roseParallelConfig = pieConfig;
|
980
1041
|
const funnelConfig = pieConfig;
|
981
|
-
const
|
1042
|
+
const theme_theme = (advancedVSeed, context)=>{
|
982
1043
|
const { customTheme, vseed } = context;
|
983
1044
|
const { theme = 'light', chartType } = vseed;
|
984
1045
|
const result = {
|
985
1046
|
...advancedVSeed
|
986
1047
|
};
|
987
1048
|
if (!customTheme || !customTheme[theme]) return result;
|
988
|
-
const baseConfigVChartTheme = customTheme?.[theme].baseConfig?.vchart;
|
989
|
-
if (baseConfigVChartTheme) {
|
990
|
-
const baseConfigVChart = result.baseConfig?.vchart || {};
|
991
|
-
const mergedConfig = external_remeda_mergeDeep(baseConfigVChartTheme, external_remeda_clone(baseConfigVChart));
|
992
|
-
result.baseConfig = {
|
993
|
-
vchart: mergedConfig
|
994
|
-
};
|
995
|
-
}
|
996
1049
|
const chartConfigTheme = customTheme?.[theme].config?.[chartType];
|
997
1050
|
if (chartConfigTheme) {
|
998
1051
|
const chartConfig = result.config?.[chartType] || {};
|
999
|
-
const mergedConfig =
|
1052
|
+
const mergedConfig = mergeDeep(chartConfigTheme, clone(chartConfig));
|
1000
1053
|
result.config = {
|
1001
1054
|
[chartType]: mergedConfig
|
1002
1055
|
};
|
1003
1056
|
}
|
1057
|
+
const chartCustomTheme = customTheme?.[theme]?.config?.[chartType];
|
1058
|
+
result.customTheme = {
|
1059
|
+
config: {
|
1060
|
+
[chartType]: chartCustomTheme
|
1061
|
+
}
|
1062
|
+
};
|
1004
1063
|
return result;
|
1005
1064
|
};
|
1006
1065
|
const pivotAdapter = (pipeline, pivotPipeline)=>(advancedVSeed, context)=>{
|
@@ -1011,7 +1070,7 @@ const pivotAdapter = (pipeline, pivotPipeline)=>(advancedVSeed, context)=>{
|
|
1011
1070
|
};
|
1012
1071
|
const markStyle_markStyle = (advancedVSeed, context)=>{
|
1013
1072
|
const { vseed } = context;
|
1014
|
-
const markStyle =
|
1073
|
+
const markStyle = pick(vseed, [
|
1015
1074
|
'barStyle',
|
1016
1075
|
'pointStyle',
|
1017
1076
|
'lineStyle',
|
@@ -1024,7 +1083,7 @@ const markStyle_markStyle = (advancedVSeed, context)=>{
|
|
1024
1083
|
};
|
1025
1084
|
const annotation_annotation = (advancedVSeed, context)=>{
|
1026
1085
|
const { vseed } = context;
|
1027
|
-
const annotation =
|
1086
|
+
const annotation = pick(vseed, [
|
1028
1087
|
'annotationPoint',
|
1029
1088
|
'annotationHorizontalLine',
|
1030
1089
|
'annotationVerticalLine',
|
@@ -1035,17 +1094,8 @@ const annotation_annotation = (advancedVSeed, context)=>{
|
|
1035
1094
|
annotation
|
1036
1095
|
};
|
1037
1096
|
};
|
1038
|
-
const locale_locale = (advancedVSeed, context)=>{
|
1039
|
-
const { vseed } = context;
|
1040
|
-
const { locale } = vseed;
|
1041
|
-
return {
|
1042
|
-
...advancedVSeed,
|
1043
|
-
locale: locale || 'zh-CN'
|
1044
|
-
};
|
1045
|
-
};
|
1046
1097
|
const lineAdvancedPipeline = [
|
1047
1098
|
initAdvancedVSeed,
|
1048
|
-
locale_locale,
|
1049
1099
|
autoMeasures,
|
1050
1100
|
autoDimensions,
|
1051
1101
|
pivotAdapter([
|
@@ -1054,15 +1104,13 @@ const lineAdvancedPipeline = [
|
|
1054
1104
|
pivotReshapeTo2D1M
|
1055
1105
|
]),
|
1056
1106
|
encodingXY,
|
1057
|
-
vchartBaseConfig,
|
1058
1107
|
lineConfig,
|
1059
|
-
|
1108
|
+
theme_theme,
|
1060
1109
|
markStyle_markStyle,
|
1061
1110
|
annotation_annotation
|
1062
1111
|
];
|
1063
1112
|
const barAdvancedPipeline = [
|
1064
1113
|
initAdvancedVSeed,
|
1065
|
-
locale_locale,
|
1066
1114
|
autoMeasures,
|
1067
1115
|
autoDimensions,
|
1068
1116
|
pivotAdapter([
|
@@ -1072,14 +1120,12 @@ const barAdvancedPipeline = [
|
|
1072
1120
|
]),
|
1073
1121
|
encodingYX,
|
1074
1122
|
barConfig,
|
1075
|
-
|
1076
|
-
vchartTheme,
|
1123
|
+
theme_theme,
|
1077
1124
|
markStyle_markStyle,
|
1078
1125
|
annotation_annotation
|
1079
1126
|
];
|
1080
1127
|
const barParallelAdvancedPipeline = [
|
1081
1128
|
initAdvancedVSeed,
|
1082
|
-
locale_locale,
|
1083
1129
|
autoMeasures,
|
1084
1130
|
autoDimensions,
|
1085
1131
|
pivotAdapter([
|
@@ -1089,14 +1135,12 @@ const barParallelAdvancedPipeline = [
|
|
1089
1135
|
]),
|
1090
1136
|
encodingYX,
|
1091
1137
|
barParallelConfig,
|
1092
|
-
|
1093
|
-
vchartTheme,
|
1138
|
+
theme_theme,
|
1094
1139
|
markStyle_markStyle,
|
1095
1140
|
annotation_annotation
|
1096
1141
|
];
|
1097
1142
|
const barPercentAdvancedPipeline = [
|
1098
1143
|
initAdvancedVSeed,
|
1099
|
-
locale_locale,
|
1100
1144
|
autoMeasures,
|
1101
1145
|
autoDimensions,
|
1102
1146
|
pivotAdapter([
|
@@ -1106,14 +1150,12 @@ const barPercentAdvancedPipeline = [
|
|
1106
1150
|
]),
|
1107
1151
|
encodingYX,
|
1108
1152
|
barPercentConfig,
|
1109
|
-
|
1110
|
-
vchartTheme,
|
1153
|
+
theme_theme,
|
1111
1154
|
markStyle_markStyle,
|
1112
1155
|
annotation_annotation
|
1113
1156
|
];
|
1114
1157
|
const columnAdvancedPipeline = [
|
1115
1158
|
initAdvancedVSeed,
|
1116
|
-
locale_locale,
|
1117
1159
|
autoMeasures,
|
1118
1160
|
autoDimensions,
|
1119
1161
|
pivotAdapter([
|
@@ -1123,14 +1165,12 @@ const columnAdvancedPipeline = [
|
|
1123
1165
|
]),
|
1124
1166
|
encodingXY,
|
1125
1167
|
columnConfig,
|
1126
|
-
|
1127
|
-
vchartTheme,
|
1168
|
+
theme_theme,
|
1128
1169
|
markStyle_markStyle,
|
1129
1170
|
annotation_annotation
|
1130
1171
|
];
|
1131
1172
|
const columnParallelAdvancedPipeline = [
|
1132
1173
|
initAdvancedVSeed,
|
1133
|
-
locale_locale,
|
1134
1174
|
autoMeasures,
|
1135
1175
|
autoDimensions,
|
1136
1176
|
pivotAdapter([
|
@@ -1140,14 +1180,12 @@ const columnParallelAdvancedPipeline = [
|
|
1140
1180
|
]),
|
1141
1181
|
encodingXY,
|
1142
1182
|
columnParallelConfig,
|
1143
|
-
|
1144
|
-
vchartTheme,
|
1183
|
+
theme_theme,
|
1145
1184
|
markStyle_markStyle,
|
1146
1185
|
annotation_annotation
|
1147
1186
|
];
|
1148
1187
|
const columnPercentAdvancedPipeline = [
|
1149
1188
|
initAdvancedVSeed,
|
1150
|
-
locale_locale,
|
1151
1189
|
autoMeasures,
|
1152
1190
|
autoDimensions,
|
1153
1191
|
pivotAdapter([
|
@@ -1157,14 +1195,12 @@ const columnPercentAdvancedPipeline = [
|
|
1157
1195
|
]),
|
1158
1196
|
encodingXY,
|
1159
1197
|
columnPercentConfig,
|
1160
|
-
|
1161
|
-
vchartTheme,
|
1198
|
+
theme_theme,
|
1162
1199
|
markStyle_markStyle,
|
1163
1200
|
annotation_annotation
|
1164
1201
|
];
|
1165
1202
|
const areaAdvancedPipeline = [
|
1166
1203
|
initAdvancedVSeed,
|
1167
|
-
locale_locale,
|
1168
1204
|
autoMeasures,
|
1169
1205
|
autoDimensions,
|
1170
1206
|
pivotAdapter([
|
@@ -1174,14 +1210,12 @@ const areaAdvancedPipeline = [
|
|
1174
1210
|
]),
|
1175
1211
|
encodingXY,
|
1176
1212
|
areaConfig,
|
1177
|
-
|
1178
|
-
vchartTheme,
|
1213
|
+
theme_theme,
|
1179
1214
|
markStyle_markStyle,
|
1180
1215
|
annotation_annotation
|
1181
1216
|
];
|
1182
1217
|
const areaPercentAdvancedPipeline = [
|
1183
1218
|
initAdvancedVSeed,
|
1184
|
-
locale_locale,
|
1185
1219
|
autoMeasures,
|
1186
1220
|
autoDimensions,
|
1187
1221
|
pivotAdapter([
|
@@ -1191,14 +1225,12 @@ const areaPercentAdvancedPipeline = [
|
|
1191
1225
|
]),
|
1192
1226
|
encodingXY,
|
1193
1227
|
areaPercentConfig,
|
1194
|
-
|
1195
|
-
vchartTheme,
|
1228
|
+
theme_theme,
|
1196
1229
|
markStyle_markStyle,
|
1197
1230
|
annotation_annotation
|
1198
1231
|
];
|
1199
1232
|
const pieAdvancedPipeline = [
|
1200
1233
|
initAdvancedVSeed,
|
1201
|
-
locale_locale,
|
1202
1234
|
autoMeasures,
|
1203
1235
|
autoDimensions,
|
1204
1236
|
pivotAdapter([
|
@@ -1208,13 +1240,11 @@ const pieAdvancedPipeline = [
|
|
1208
1240
|
]),
|
1209
1241
|
encodingPie,
|
1210
1242
|
pieConfig,
|
1211
|
-
|
1212
|
-
vchartTheme,
|
1243
|
+
theme_theme,
|
1213
1244
|
annotation_annotation
|
1214
1245
|
];
|
1215
1246
|
const donutAdvancedPipeline = [
|
1216
1247
|
initAdvancedVSeed,
|
1217
|
-
locale_locale,
|
1218
1248
|
autoMeasures,
|
1219
1249
|
autoDimensions,
|
1220
1250
|
pivotAdapter([
|
@@ -1224,13 +1254,11 @@ const donutAdvancedPipeline = [
|
|
1224
1254
|
]),
|
1225
1255
|
encodingPie,
|
1226
1256
|
donutConfig,
|
1227
|
-
|
1228
|
-
vchartTheme,
|
1257
|
+
theme_theme,
|
1229
1258
|
annotation_annotation
|
1230
1259
|
];
|
1231
1260
|
const roseAdvancedPipeline = [
|
1232
1261
|
initAdvancedVSeed,
|
1233
|
-
locale_locale,
|
1234
1262
|
autoMeasures,
|
1235
1263
|
autoDimensions,
|
1236
1264
|
pivotAdapter([
|
@@ -1240,14 +1268,12 @@ const roseAdvancedPipeline = [
|
|
1240
1268
|
]),
|
1241
1269
|
encodingRose,
|
1242
1270
|
roseConfig,
|
1243
|
-
|
1244
|
-
vchartTheme,
|
1271
|
+
theme_theme,
|
1245
1272
|
markStyle_markStyle,
|
1246
1273
|
annotation_annotation
|
1247
1274
|
];
|
1248
1275
|
const roseParallelAdvancedPipeline = [
|
1249
1276
|
initAdvancedVSeed,
|
1250
|
-
locale_locale,
|
1251
1277
|
autoMeasures,
|
1252
1278
|
autoDimensions,
|
1253
1279
|
pivotAdapter([
|
@@ -1257,14 +1283,12 @@ const roseParallelAdvancedPipeline = [
|
|
1257
1283
|
]),
|
1258
1284
|
encodingRose,
|
1259
1285
|
roseParallelConfig,
|
1260
|
-
|
1261
|
-
vchartTheme,
|
1286
|
+
theme_theme,
|
1262
1287
|
markStyle_markStyle,
|
1263
1288
|
annotation_annotation
|
1264
1289
|
];
|
1265
1290
|
const funnelAdvancedPipeline = [
|
1266
1291
|
initAdvancedVSeed,
|
1267
|
-
locale_locale,
|
1268
1292
|
autoMeasures,
|
1269
1293
|
autoDimensions,
|
1270
1294
|
pivotAdapter([
|
@@ -1274,49 +1298,11 @@ const funnelAdvancedPipeline = [
|
|
1274
1298
|
]),
|
1275
1299
|
encodingFunnel,
|
1276
1300
|
funnelConfig,
|
1277
|
-
|
1278
|
-
vchartTheme,
|
1301
|
+
theme_theme,
|
1279
1302
|
annotation_annotation
|
1280
1303
|
];
|
1281
|
-
const encodingYY = (advancedVSeed)=>{
|
1282
|
-
const result = {
|
1283
|
-
...advancedVSeed
|
1284
|
-
};
|
1285
|
-
const { datasetReshapeInfo, measures } = advancedVSeed;
|
1286
|
-
if (!datasetReshapeInfo || !measures) return result;
|
1287
|
-
const firstMeasure = findFirstMeasure(measures);
|
1288
|
-
const encoding = datasetReshapeInfo.reduce((prev, cur)=>{
|
1289
|
-
const { foldInfo, unfoldInfo } = cur;
|
1290
|
-
const x = [
|
1291
|
-
firstMeasure?.id
|
1292
|
-
];
|
1293
|
-
const y = [
|
1294
|
-
foldInfo.measureValue
|
1295
|
-
];
|
1296
|
-
const group = [
|
1297
|
-
unfoldInfo.groupId
|
1298
|
-
];
|
1299
|
-
const color = [
|
1300
|
-
unfoldInfo.groupId
|
1301
|
-
];
|
1302
|
-
return [
|
1303
|
-
...prev,
|
1304
|
-
{
|
1305
|
-
x,
|
1306
|
-
y,
|
1307
|
-
group,
|
1308
|
-
color
|
1309
|
-
}
|
1310
|
-
];
|
1311
|
-
}, []);
|
1312
|
-
return {
|
1313
|
-
...result,
|
1314
|
-
encoding
|
1315
|
-
};
|
1316
|
-
};
|
1317
1304
|
const scatterAdvancedPipeline = [
|
1318
1305
|
initAdvancedVSeed,
|
1319
|
-
locale_locale,
|
1320
1306
|
autoMeasures,
|
1321
1307
|
autoDimensions,
|
1322
1308
|
pivotAdapter([
|
@@ -1325,85 +1311,236 @@ const scatterAdvancedPipeline = [
|
|
1325
1311
|
pivotReshapeTo1D2M
|
1326
1312
|
]),
|
1327
1313
|
encodingYY,
|
1328
|
-
vchartBaseConfig,
|
1329
1314
|
scatterConfig,
|
1330
|
-
|
1315
|
+
theme_theme,
|
1331
1316
|
markStyle_markStyle,
|
1332
1317
|
annotation_annotation
|
1333
1318
|
];
|
1334
|
-
const
|
1335
|
-
const { advancedVSeed } = context;
|
1336
|
-
const { encoding } = advancedVSeed;
|
1337
|
-
const angle = encoding[0]?.angle?.[0];
|
1338
|
-
const x = encoding[0]?.x?.[0];
|
1339
|
-
const group = encoding[0]?.group?.[0];
|
1340
|
-
const fields = {};
|
1341
|
-
if (angle) fields[angle] = {
|
1342
|
-
sortIndex: 0
|
1343
|
-
};
|
1344
|
-
if (x) fields[x] = {
|
1345
|
-
sortIndex: 0
|
1346
|
-
};
|
1347
|
-
if (group) fields[group] = {
|
1348
|
-
sortIndex: 1
|
1349
|
-
};
|
1350
|
-
return {
|
1351
|
-
...spec,
|
1352
|
-
data: {
|
1353
|
-
values: advancedVSeed.dataset,
|
1354
|
-
fields: fields
|
1355
|
-
}
|
1356
|
-
};
|
1357
|
-
};
|
1358
|
-
const datasetPivot = (spec, context)=>{
|
1319
|
+
const autoMeasures_autoMeasures = (advancedVSeed, context)=>{
|
1359
1320
|
const result = {
|
1360
|
-
...
|
1361
|
-
};
|
1362
|
-
const { advancedVSeed } = context;
|
1363
|
-
const { dataset, datasetReshapeInfo } = advancedVSeed;
|
1364
|
-
const records = dataset.reduce((pre, cur, index)=>{
|
1365
|
-
const id = datasetReshapeInfo[index].id;
|
1366
|
-
pre[id] = cur;
|
1367
|
-
return pre;
|
1368
|
-
}, {});
|
1369
|
-
return {
|
1370
|
-
...result,
|
1371
|
-
records: records
|
1372
|
-
};
|
1373
|
-
};
|
1374
|
-
const datasetPivotPlaceholder = (spec)=>({
|
1375
|
-
...spec,
|
1376
|
-
data: {
|
1377
|
-
id: 'placeholderDataId'
|
1378
|
-
}
|
1379
|
-
});
|
1380
|
-
const initColumn = (spec, context)=>{
|
1381
|
-
const result = {
|
1382
|
-
...spec
|
1321
|
+
...advancedVSeed
|
1383
1322
|
};
|
1384
|
-
const {
|
1385
|
-
const {
|
1386
|
-
if (!
|
1387
|
-
|
1388
|
-
|
1389
|
-
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1393
|
-
|
1394
|
-
|
1395
|
-
|
1396
|
-
}
|
1397
|
-
]
|
1398
|
-
|
1323
|
+
const { vseed } = context;
|
1324
|
+
const { measures, dataset } = vseed;
|
1325
|
+
if (!dataset) throw new Error('dataset is required');
|
1326
|
+
if (0 === dataset.length) return result;
|
1327
|
+
if (measures && measures.length > 0) {
|
1328
|
+
result.measures = measures;
|
1329
|
+
return result;
|
1330
|
+
}
|
1331
|
+
const top100dataset = dataset.slice(0, 100);
|
1332
|
+
const sample = top100dataset.reduce((prev, cur)=>({
|
1333
|
+
...prev,
|
1334
|
+
...cur
|
1335
|
+
}), {});
|
1336
|
+
result.measures = Object.keys(sample).filter((key)=>top100dataset.some((item)=>'number' == typeof item[key]) && ![
|
1337
|
+
'',
|
1338
|
+
null,
|
1339
|
+
void 0
|
1340
|
+
].includes(key)).map((measure)=>({
|
1341
|
+
id: measure,
|
1342
|
+
alias: measure
|
1343
|
+
}));
|
1399
1344
|
return result;
|
1400
1345
|
};
|
1401
|
-
const
|
1346
|
+
const autoDimensions_autoDimensions = (advancedVSeed, context)=>{
|
1402
1347
|
const result = {
|
1403
|
-
...
|
1348
|
+
...advancedVSeed
|
1404
1349
|
};
|
1405
|
-
const {
|
1406
|
-
const {
|
1350
|
+
const { vseed } = context;
|
1351
|
+
const { dimensions, dataset } = vseed;
|
1352
|
+
const measures = findAllMeasures(advancedVSeed.measures);
|
1353
|
+
if (!dataset) throw new Error('dataset is required');
|
1354
|
+
if (0 === dataset.length) return result;
|
1355
|
+
if (dimensions && dimensions.length > 0) {
|
1356
|
+
result.dimensions = dimensions;
|
1357
|
+
return result;
|
1358
|
+
}
|
1359
|
+
const top100dataset = dataset.slice(0, 100);
|
1360
|
+
const sample = top100dataset.reduce((prev, cur)=>({
|
1361
|
+
...prev,
|
1362
|
+
...cur
|
1363
|
+
}), {});
|
1364
|
+
result.dimensions = Object.keys(sample).filter((key)=>top100dataset.some((item)=>'string' == typeof item[key]) && ![
|
1365
|
+
'',
|
1366
|
+
null,
|
1367
|
+
void 0
|
1368
|
+
].includes(key) && !measures.some((measure)=>measure.id === key)).map((dim)=>({
|
1369
|
+
id: dim,
|
1370
|
+
alias: dim,
|
1371
|
+
location: 'dimension'
|
1372
|
+
}));
|
1373
|
+
return result;
|
1374
|
+
};
|
1375
|
+
const autoPivotDimensions = (advancedVSeed, context)=>{
|
1376
|
+
const result = {
|
1377
|
+
...advancedVSeed
|
1378
|
+
};
|
1379
|
+
const { vseed } = context;
|
1380
|
+
const { dimensions, dataset } = vseed;
|
1381
|
+
const measures = findAllMeasures(advancedVSeed.measures);
|
1382
|
+
if (!dataset) throw new Error('dataset is required');
|
1383
|
+
if (0 === dataset.length) return result;
|
1384
|
+
if (dimensions && dimensions.length > 0) {
|
1385
|
+
const newDimensions = findAllDimensions(dimensions);
|
1386
|
+
result.dimensions = newDimensions.map((item, index)=>{
|
1387
|
+
if ('rowDimension' === item.location || 'columnDimension' === item.location) return item;
|
1388
|
+
return {
|
1389
|
+
...item,
|
1390
|
+
location: index % 2 === 0 ? 'columnDimension' : 'rowDimension'
|
1391
|
+
};
|
1392
|
+
});
|
1393
|
+
return result;
|
1394
|
+
}
|
1395
|
+
const top100dataset = dataset.slice(0, 100);
|
1396
|
+
const sample = top100dataset.reduce((prev, cur)=>({
|
1397
|
+
...prev,
|
1398
|
+
...cur
|
1399
|
+
}), {});
|
1400
|
+
let i = 0;
|
1401
|
+
result.dimensions = Object.keys(sample).filter((key)=>top100dataset.some((item)=>'string' == typeof item[key]) && ![
|
1402
|
+
'',
|
1403
|
+
null,
|
1404
|
+
void 0
|
1405
|
+
].includes(key) && !measures.some((measure)=>measure.id === key)).map((dim)=>({
|
1406
|
+
id: dim,
|
1407
|
+
alias: dim,
|
1408
|
+
location: i++ % 2 === 0 ? 'columnDimension' : 'rowDimension'
|
1409
|
+
}));
|
1410
|
+
return result;
|
1411
|
+
};
|
1412
|
+
const autoPivotMeasures = (advancedVSeed, context)=>{
|
1413
|
+
const result = {
|
1414
|
+
...advancedVSeed
|
1415
|
+
};
|
1416
|
+
const { vseed } = context;
|
1417
|
+
const { dataset } = vseed;
|
1418
|
+
const measures = findAllMeasures(vseed.measures);
|
1419
|
+
if (!dataset) throw new Error('dataset is required');
|
1420
|
+
if (0 === dataset.length) return result;
|
1421
|
+
if (measures && measures.length > 0) {
|
1422
|
+
result.measures = findAllMeasures(measures);
|
1423
|
+
return result;
|
1424
|
+
}
|
1425
|
+
const top100dataset = dataset.slice(0, 100);
|
1426
|
+
const sample = top100dataset.reduce((prev, cur)=>({
|
1427
|
+
...prev,
|
1428
|
+
...cur
|
1429
|
+
}), {});
|
1430
|
+
result.measures = Object.keys(sample).filter((key)=>top100dataset.some((item)=>'number' == typeof item[key]) && ![
|
1431
|
+
'',
|
1432
|
+
null,
|
1433
|
+
void 0
|
1434
|
+
].includes(key)).map((measure)=>({
|
1435
|
+
id: measure,
|
1436
|
+
alias: measure
|
1437
|
+
}));
|
1438
|
+
return result;
|
1439
|
+
};
|
1440
|
+
const initAdvancedVSeed_initAdvancedVSeed = (advancedVSeed, context)=>{
|
1441
|
+
const { vseed } = context;
|
1442
|
+
const { chartType, locale } = vseed;
|
1443
|
+
return {
|
1444
|
+
...advancedVSeed,
|
1445
|
+
chartType,
|
1446
|
+
locale: locale || 'zh-CN'
|
1447
|
+
};
|
1448
|
+
};
|
1449
|
+
const records_records = (advancedVSeed, context)=>{
|
1450
|
+
const { vseed } = context;
|
1451
|
+
const { dataset } = vseed;
|
1452
|
+
return {
|
1453
|
+
...advancedVSeed,
|
1454
|
+
dataset
|
1455
|
+
};
|
1456
|
+
};
|
1457
|
+
const pivotTableAdvancedPipeline = [
|
1458
|
+
initAdvancedVSeed_initAdvancedVSeed,
|
1459
|
+
autoPivotMeasures,
|
1460
|
+
autoPivotDimensions,
|
1461
|
+
records_records,
|
1462
|
+
theme_theme
|
1463
|
+
];
|
1464
|
+
const tableAdvancedPipeline = [
|
1465
|
+
initAdvancedVSeed_initAdvancedVSeed,
|
1466
|
+
autoMeasures_autoMeasures,
|
1467
|
+
autoDimensions_autoDimensions,
|
1468
|
+
records_records,
|
1469
|
+
theme_theme
|
1470
|
+
];
|
1471
|
+
const dataset_dataset = (spec, context)=>{
|
1472
|
+
const { advancedVSeed } = context;
|
1473
|
+
const { encoding } = advancedVSeed;
|
1474
|
+
const angle = encoding[0]?.angle?.[0];
|
1475
|
+
const x = encoding[0]?.x?.[0];
|
1476
|
+
const group = encoding[0]?.group?.[0];
|
1477
|
+
const fields = {};
|
1478
|
+
if (angle) fields[angle] = {
|
1479
|
+
sortIndex: 0
|
1480
|
+
};
|
1481
|
+
if (x) fields[x] = {
|
1482
|
+
sortIndex: 0
|
1483
|
+
};
|
1484
|
+
if (group) fields[group] = {
|
1485
|
+
sortIndex: 1
|
1486
|
+
};
|
1487
|
+
return {
|
1488
|
+
...spec,
|
1489
|
+
data: {
|
1490
|
+
values: advancedVSeed.dataset,
|
1491
|
+
fields: fields
|
1492
|
+
}
|
1493
|
+
};
|
1494
|
+
};
|
1495
|
+
const datasetPivot = (spec, context)=>{
|
1496
|
+
const result = {
|
1497
|
+
...spec
|
1498
|
+
};
|
1499
|
+
const { advancedVSeed } = context;
|
1500
|
+
const { dataset, datasetReshapeInfo } = advancedVSeed;
|
1501
|
+
const records = dataset.reduce((pre, cur, index)=>{
|
1502
|
+
const id = datasetReshapeInfo[index].id;
|
1503
|
+
pre[id] = cur;
|
1504
|
+
return pre;
|
1505
|
+
}, {});
|
1506
|
+
return {
|
1507
|
+
...result,
|
1508
|
+
records: records
|
1509
|
+
};
|
1510
|
+
};
|
1511
|
+
const datasetPivotPlaceholder = (spec)=>({
|
1512
|
+
...spec,
|
1513
|
+
data: {
|
1514
|
+
id: 'placeholderDataId'
|
1515
|
+
}
|
1516
|
+
});
|
1517
|
+
const initColumn = (spec, context)=>{
|
1518
|
+
const result = {
|
1519
|
+
...spec
|
1520
|
+
};
|
1521
|
+
const { advancedVSeed } = context;
|
1522
|
+
const { encoding } = advancedVSeed;
|
1523
|
+
if (!encoding[0].y || !encoding[0].x || !encoding[0].group) return result;
|
1524
|
+
result.type = 'bar';
|
1525
|
+
result.direction = 'vertical';
|
1526
|
+
result.xField = encoding[0].x[0];
|
1527
|
+
result.yField = encoding[0].y[0];
|
1528
|
+
result.seriesField = encoding[0].group[0];
|
1529
|
+
result.padding = 0;
|
1530
|
+
result.region = [
|
1531
|
+
{
|
1532
|
+
clip: true
|
1533
|
+
}
|
1534
|
+
];
|
1535
|
+
result.animation = true;
|
1536
|
+
return result;
|
1537
|
+
};
|
1538
|
+
const initBar = (spec, context)=>{
|
1539
|
+
const result = {
|
1540
|
+
...spec
|
1541
|
+
};
|
1542
|
+
const { advancedVSeed } = context;
|
1543
|
+
const { encoding } = advancedVSeed;
|
1407
1544
|
if (!encoding[0].y || !encoding[0].x || !encoding[0].group) return result;
|
1408
1545
|
result.type = 'bar';
|
1409
1546
|
result.direction = 'horizontal';
|
@@ -1708,6 +1845,27 @@ const initFunnel = (spec, context)=>{
|
|
1708
1845
|
result.animation = true;
|
1709
1846
|
return result;
|
1710
1847
|
};
|
1848
|
+
const initScatter = (spec, context)=>{
|
1849
|
+
const result = {
|
1850
|
+
...spec
|
1851
|
+
};
|
1852
|
+
const { advancedVSeed } = context;
|
1853
|
+
const { encoding } = advancedVSeed;
|
1854
|
+
if (!encoding[0].y || !encoding[0].x || !encoding[0].group) return result;
|
1855
|
+
result.type = 'scatter';
|
1856
|
+
result.direction = 'vertical';
|
1857
|
+
result.xField = encoding[0].x[0];
|
1858
|
+
result.yField = encoding[0].y[0];
|
1859
|
+
result.seriesField = encoding[0].group[0];
|
1860
|
+
result.padding = 0;
|
1861
|
+
result.region = [
|
1862
|
+
{
|
1863
|
+
clip: true
|
1864
|
+
}
|
1865
|
+
];
|
1866
|
+
result.animation = true;
|
1867
|
+
return result;
|
1868
|
+
};
|
1711
1869
|
const xBand = (spec, context)=>{
|
1712
1870
|
const result = {
|
1713
1871
|
...spec
|
@@ -1824,13 +1982,14 @@ const xLinear = (spec, context)=>{
|
|
1824
1982
|
];
|
1825
1983
|
return result;
|
1826
1984
|
}
|
1827
|
-
const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min } = config;
|
1985
|
+
const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min, log, logBase = 10 } = config;
|
1828
1986
|
const linearAxis = {
|
1829
1987
|
visible,
|
1830
|
-
type: 'linear',
|
1988
|
+
type: log ? 'log' : 'linear',
|
1989
|
+
base: logBase,
|
1831
1990
|
orient: 'bottom',
|
1832
1991
|
nice,
|
1833
|
-
zero,
|
1992
|
+
zero: log ? false : zero,
|
1834
1993
|
inverse,
|
1835
1994
|
max,
|
1836
1995
|
min,
|
@@ -2000,13 +2159,14 @@ const yLinear = (spec, context)=>{
|
|
2000
2159
|
];
|
2001
2160
|
return result;
|
2002
2161
|
}
|
2003
|
-
const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min } = config;
|
2162
|
+
const { visible = true, label, tick, title, grid, line, zero, nice, inverse, max, min, log, logBase = 10 } = config;
|
2004
2163
|
const linearAxis = {
|
2005
2164
|
visible,
|
2006
|
-
type: 'linear',
|
2165
|
+
type: log ? 'log' : 'linear',
|
2166
|
+
base: logBase,
|
2007
2167
|
orient: 'left',
|
2008
2168
|
nice,
|
2009
|
-
zero,
|
2169
|
+
zero: log ? false : zero,
|
2010
2170
|
inverse,
|
2011
2171
|
max,
|
2012
2172
|
min,
|
@@ -2162,25 +2322,22 @@ const background_backgroundColor = (spec, context)=>{
|
|
2162
2322
|
...spec
|
2163
2323
|
};
|
2164
2324
|
const { advancedVSeed } = context;
|
2165
|
-
const {
|
2166
|
-
|
2167
|
-
const { backgroundColor } = baseConfig
|
2325
|
+
const { chartType } = advancedVSeed;
|
2326
|
+
const baseConfig = advancedVSeed.config[chartType];
|
2327
|
+
const { backgroundColor } = baseConfig;
|
2168
2328
|
return {
|
2169
2329
|
...result,
|
2170
2330
|
background: backgroundColor
|
2171
2331
|
};
|
2172
2332
|
};
|
2173
|
-
const defaultTooltip = {
|
2174
|
-
enable: true
|
2175
|
-
};
|
2176
2333
|
const tooltip_tooltip = (spec, context)=>{
|
2177
2334
|
const result = {
|
2178
2335
|
...spec
|
2179
2336
|
};
|
2180
2337
|
const { advancedVSeed } = context;
|
2181
|
-
const { measures, datasetReshapeInfo } = advancedVSeed;
|
2182
|
-
const baseConfig = advancedVSeed.
|
2183
|
-
const { tooltip
|
2338
|
+
const { measures, datasetReshapeInfo, chartType } = advancedVSeed;
|
2339
|
+
const baseConfig = advancedVSeed.config[chartType];
|
2340
|
+
const { tooltip } = baseConfig;
|
2184
2341
|
const { enable } = tooltip;
|
2185
2342
|
const { measureId, measureValue } = datasetReshapeInfo[0].foldInfo;
|
2186
2343
|
const { groupName } = datasetReshapeInfo[0].unfoldInfo;
|
@@ -2242,7 +2399,8 @@ const label_label = (spec, context)=>{
|
|
2242
2399
|
};
|
2243
2400
|
const { advancedVSeed } = context;
|
2244
2401
|
const { measures, datasetReshapeInfo, locale } = advancedVSeed;
|
2245
|
-
const
|
2402
|
+
const { chartType } = advancedVSeed;
|
2403
|
+
const baseConfig = advancedVSeed.config[chartType];
|
2246
2404
|
if (!baseConfig || !baseConfig.label) return result;
|
2247
2405
|
const { measureId, measureValue } = datasetReshapeInfo[0].foldInfo;
|
2248
2406
|
const { label } = baseConfig;
|
@@ -2274,9 +2432,9 @@ const discreteLegend = (spec, context)=>{
|
|
2274
2432
|
...spec
|
2275
2433
|
};
|
2276
2434
|
const { advancedVSeed } = context;
|
2277
|
-
const { datasetReshapeInfo } = advancedVSeed;
|
2435
|
+
const { datasetReshapeInfo, chartType } = advancedVSeed;
|
2278
2436
|
const { unfoldInfo } = datasetReshapeInfo[0];
|
2279
|
-
const baseConfig = advancedVSeed.
|
2437
|
+
const baseConfig = advancedVSeed.config[chartType];
|
2280
2438
|
if (!baseConfig || !baseConfig.legend) return result;
|
2281
2439
|
const { legend } = baseConfig;
|
2282
2440
|
const { enable, position = 'bottom', labelFontColor, labelFontSize = 12, labelFontWeight, maxSize, border, shapeType = 'rectRound' } = legend || {};
|
@@ -2373,7 +2531,8 @@ const pivotDiscreteLegend = (spec, context)=>{
|
|
2373
2531
|
...spec
|
2374
2532
|
};
|
2375
2533
|
const { advancedVSeed } = context;
|
2376
|
-
const
|
2534
|
+
const { chartType } = advancedVSeed;
|
2535
|
+
const baseConfig = advancedVSeed.config[chartType];
|
2377
2536
|
if (!baseConfig || !baseConfig.legend) return result;
|
2378
2537
|
const { datasetReshapeInfo } = advancedVSeed;
|
2379
2538
|
const colorItems = unique(datasetReshapeInfo.flatMap((d)=>d.unfoldInfo.colorItems));
|
@@ -2482,9 +2641,9 @@ const color_color = (spec, context)=>{
|
|
2482
2641
|
...spec
|
2483
2642
|
};
|
2484
2643
|
const { advancedVSeed } = context;
|
2485
|
-
const { datasetReshapeInfo } = advancedVSeed;
|
2644
|
+
const { datasetReshapeInfo, chartType } = advancedVSeed;
|
2486
2645
|
const { unfoldInfo } = datasetReshapeInfo[0];
|
2487
|
-
const baseConfig = advancedVSeed.
|
2646
|
+
const baseConfig = advancedVSeed.config[chartType];
|
2488
2647
|
if (!baseConfig || !baseConfig.color) return result;
|
2489
2648
|
const { color } = baseConfig;
|
2490
2649
|
const { colorScheme, colorMapping } = color;
|
@@ -2702,7 +2861,7 @@ const pivotColumnDimensions = (spec, context)=>{
|
|
2702
2861
|
...spec
|
2703
2862
|
};
|
2704
2863
|
const { advancedVSeed } = context;
|
2705
|
-
const
|
2864
|
+
const dimensions = advancedVSeed.dimensions;
|
2706
2865
|
if (!dimensions) return result;
|
2707
2866
|
const columnDimensions = dimensions.filter((dim)=>'columnDimension' === dim.location);
|
2708
2867
|
const columns = columnDimensions.map((dim)=>({
|
@@ -2719,7 +2878,7 @@ const pivotRowDimensions = (spec, context)=>{
|
|
2719
2878
|
...spec
|
2720
2879
|
};
|
2721
2880
|
const { advancedVSeed } = context;
|
2722
|
-
const
|
2881
|
+
const dimensions = advancedVSeed.dimensions;
|
2723
2882
|
if (!dimensions) return result;
|
2724
2883
|
const rowDimensions = dimensions.filter((dim)=>'rowDimension' === dim.location);
|
2725
2884
|
const rows = rowDimensions.map((dim)=>({
|
@@ -2886,8 +3045,7 @@ const pointStyle_pointStyle = (spec, context)=>{
|
|
2886
3045
|
const { markStyle } = advancedVSeed;
|
2887
3046
|
const { pointStyle } = markStyle;
|
2888
3047
|
const result = {
|
2889
|
-
...spec
|
2890
|
-
point: {}
|
3048
|
+
...spec
|
2891
3049
|
};
|
2892
3050
|
if (!pointStyle) return result;
|
2893
3051
|
const pointStyles = Array.isArray(pointStyle) ? pointStyle : [
|
@@ -2940,6 +3098,7 @@ const pointStateDimensionHover = (spec)=>{
|
|
2940
3098
|
point: {
|
2941
3099
|
...point,
|
2942
3100
|
state: {
|
3101
|
+
...point.state || {},
|
2943
3102
|
dimension_hover: {
|
2944
3103
|
scaleX: 1.4,
|
2945
3104
|
scaleY: 1.4
|
@@ -2958,6 +3117,7 @@ const pointStateHover = (spec, context)=>{
|
|
2958
3117
|
point: {
|
2959
3118
|
...point,
|
2960
3119
|
state: {
|
3120
|
+
...point.state || {},
|
2961
3121
|
hover: {
|
2962
3122
|
scaleX: 1.4,
|
2963
3123
|
scaleY: 1.4,
|
@@ -4355,27 +4515,6 @@ const pivotFunnel = [
|
|
4355
4515
|
const funnelSpecPipeline = [
|
4356
4516
|
pivotAdapter_pivotAdapter(funnel, pivotFunnel)
|
4357
4517
|
];
|
4358
|
-
const initScatter = (spec, context)=>{
|
4359
|
-
const result = {
|
4360
|
-
...spec
|
4361
|
-
};
|
4362
|
-
const { advancedVSeed } = context;
|
4363
|
-
const { encoding } = advancedVSeed;
|
4364
|
-
if (!encoding[0].y || !encoding[0].x || !encoding[0].group) return result;
|
4365
|
-
result.type = 'scatter';
|
4366
|
-
result.direction = 'vertical';
|
4367
|
-
result.xField = encoding[0].x[0];
|
4368
|
-
result.yField = encoding[0].y[0];
|
4369
|
-
result.seriesField = encoding[0].group[0];
|
4370
|
-
result.padding = 0;
|
4371
|
-
result.region = [
|
4372
|
-
{
|
4373
|
-
clip: true
|
4374
|
-
}
|
4375
|
-
];
|
4376
|
-
result.animation = true;
|
4377
|
-
return result;
|
4378
|
-
};
|
4379
4518
|
const scatter = [
|
4380
4519
|
initScatter,
|
4381
4520
|
color_color,
|
@@ -4425,52 +4564,185 @@ const pivotScatter = [
|
|
4425
4564
|
const scatterSpecPipeline = [
|
4426
4565
|
pivotAdapter_pivotAdapter(scatter, pivotScatter)
|
4427
4566
|
];
|
4428
|
-
const
|
4429
|
-
const {
|
4430
|
-
|
4431
|
-
|
4432
|
-
|
4433
|
-
|
4434
|
-
|
4435
|
-
|
4567
|
+
const initTable = (spec, context)=>{
|
4568
|
+
const { advancedVSeed } = context;
|
4569
|
+
const { dataset } = advancedVSeed;
|
4570
|
+
return {
|
4571
|
+
...spec,
|
4572
|
+
records: dataset,
|
4573
|
+
widthMode: 'standard',
|
4574
|
+
heightMode: 'autoHeight',
|
4575
|
+
autoWrapText: true,
|
4576
|
+
columnResizeMode: 'all',
|
4577
|
+
showHeader: true
|
4436
4578
|
};
|
4437
|
-
try {
|
4438
|
-
return execPipeline(pipeline, context);
|
4439
|
-
} catch (e) {
|
4440
|
-
console.error(e);
|
4441
|
-
throw new Error("buildAdvanced error, see error info in console");
|
4442
|
-
}
|
4443
4579
|
};
|
4444
|
-
const
|
4445
|
-
const {
|
4446
|
-
|
4447
|
-
|
4448
|
-
|
4449
|
-
|
4450
|
-
|
4451
|
-
|
4580
|
+
const initPivotTable = (spec, context)=>{
|
4581
|
+
const { advancedVSeed } = context;
|
4582
|
+
const { dataset } = advancedVSeed;
|
4583
|
+
return {
|
4584
|
+
...spec,
|
4585
|
+
records: dataset,
|
4586
|
+
widthMode: 'standard',
|
4587
|
+
heightMode: 'autoHeight',
|
4588
|
+
autoWrapText: true,
|
4589
|
+
columnResizeMode: 'all'
|
4452
4590
|
};
|
4453
|
-
try {
|
4454
|
-
return execPipeline(pipeline, context);
|
4455
|
-
} catch (e) {
|
4456
|
-
console.error(e);
|
4457
|
-
throw new Error("buildSpec error, see error info in console");
|
4458
|
-
}
|
4459
|
-
};
|
4460
|
-
const build = (builder)=>{
|
4461
|
-
const advancedVSeed = builder.buildAdvanced();
|
4462
|
-
builder.advancedVSeed = advancedVSeed;
|
4463
|
-
if (!advancedVSeed) throw new Error('advancedVSeed is null');
|
4464
|
-
const spec = builder.buildSpec(advancedVSeed);
|
4465
|
-
builder.spec = spec;
|
4466
|
-
return spec;
|
4467
4591
|
};
|
4468
|
-
|
4469
|
-
|
4470
|
-
|
4471
|
-
|
4472
|
-
|
4473
|
-
|
4592
|
+
const measureTreeToColumns = (spec, context)=>{
|
4593
|
+
const { advancedVSeed } = context;
|
4594
|
+
const measures = advancedVSeed.measures;
|
4595
|
+
const result = {
|
4596
|
+
...spec
|
4597
|
+
};
|
4598
|
+
const columns = treeTreeToColumns(measures);
|
4599
|
+
return {
|
4600
|
+
...result,
|
4601
|
+
columns: [
|
4602
|
+
...result.columns || [],
|
4603
|
+
...columns
|
4604
|
+
]
|
4605
|
+
};
|
4606
|
+
};
|
4607
|
+
const dimensionTreeToColumns = (spec, context)=>{
|
4608
|
+
const { advancedVSeed } = context;
|
4609
|
+
const dimensions = advancedVSeed.dimensions;
|
4610
|
+
const result = {
|
4611
|
+
...spec
|
4612
|
+
};
|
4613
|
+
const columns = treeTreeToColumns(dimensions);
|
4614
|
+
return {
|
4615
|
+
...result,
|
4616
|
+
columns: [
|
4617
|
+
...result.columns || [],
|
4618
|
+
...columns
|
4619
|
+
]
|
4620
|
+
};
|
4621
|
+
};
|
4622
|
+
const treeTreeToColumns = (tree = [])=>{
|
4623
|
+
const result = tree.map((item)=>{
|
4624
|
+
const field = item.id;
|
4625
|
+
const title = item.alias ?? item.id;
|
4626
|
+
if ('children' in item && Array.isArray(item.children)) return {
|
4627
|
+
field,
|
4628
|
+
title,
|
4629
|
+
columns: treeTreeToColumns(item.children)
|
4630
|
+
};
|
4631
|
+
return {
|
4632
|
+
field,
|
4633
|
+
title
|
4634
|
+
};
|
4635
|
+
});
|
4636
|
+
return result || [];
|
4637
|
+
};
|
4638
|
+
const pivotColumns = (spec, context)=>{
|
4639
|
+
const { advancedVSeed } = context;
|
4640
|
+
const dimensions = advancedVSeed.dimensions;
|
4641
|
+
const columns = dimensions.filter((item)=>'columnDimension' === item['location']);
|
4642
|
+
return {
|
4643
|
+
...spec,
|
4644
|
+
columns: columns.map((item)=>({
|
4645
|
+
dimensionKey: item.id,
|
4646
|
+
title: item.alias || item.id,
|
4647
|
+
width: 'auto'
|
4648
|
+
}))
|
4649
|
+
};
|
4650
|
+
};
|
4651
|
+
const pivotRows = (spec, context)=>{
|
4652
|
+
const { advancedVSeed } = context;
|
4653
|
+
const dimensions = advancedVSeed.dimensions;
|
4654
|
+
const rows = dimensions.filter((item)=>'rowDimension' === item['location']);
|
4655
|
+
return {
|
4656
|
+
...spec,
|
4657
|
+
rows: rows.map((item)=>({
|
4658
|
+
dimensionKey: item.id,
|
4659
|
+
title: item.alias || item.id,
|
4660
|
+
width: 'auto'
|
4661
|
+
}))
|
4662
|
+
};
|
4663
|
+
};
|
4664
|
+
const pivotIndicators_pivotIndicators = (spec, context)=>{
|
4665
|
+
const { advancedVSeed } = context;
|
4666
|
+
const measures = advancedVSeed.measures;
|
4667
|
+
return {
|
4668
|
+
...spec,
|
4669
|
+
indicatorsAsCol: true,
|
4670
|
+
indicators: measures.map((item)=>({
|
4671
|
+
cellType: 'text',
|
4672
|
+
indicatorKey: item.id,
|
4673
|
+
title: item.alias || item.id,
|
4674
|
+
width: 'auto'
|
4675
|
+
}))
|
4676
|
+
};
|
4677
|
+
};
|
4678
|
+
const tableSpecPipeline = [
|
4679
|
+
initTable,
|
4680
|
+
dimensionTreeToColumns,
|
4681
|
+
measureTreeToColumns
|
4682
|
+
];
|
4683
|
+
const pivotTableSpecPipeline = [
|
4684
|
+
initPivotTable,
|
4685
|
+
pivotColumns,
|
4686
|
+
pivotRows,
|
4687
|
+
pivotIndicators_pivotIndicators
|
4688
|
+
];
|
4689
|
+
const buildAdvanced = (builder)=>{
|
4690
|
+
const { chartType } = builder.vseed;
|
4691
|
+
if (!chartType) throw new Error('chartType is nil in buildAdvanced');
|
4692
|
+
const pipeline = builder.getAdvancedPipeline(chartType);
|
4693
|
+
if (!pipeline) throw new Error(`no advanced pipeline for chartType ${chartType}`);
|
4694
|
+
const context = {
|
4695
|
+
vseed: builder.vseed,
|
4696
|
+
customTheme: builder.getThemeMap()
|
4697
|
+
};
|
4698
|
+
try {
|
4699
|
+
return execPipeline(pipeline, context);
|
4700
|
+
} catch (e) {
|
4701
|
+
console.error(e);
|
4702
|
+
throw new Error("buildAdvanced error, see error info in console");
|
4703
|
+
}
|
4704
|
+
};
|
4705
|
+
const buildSpec = (builder, advancedVSeed)=>{
|
4706
|
+
const { chartType } = builder.vseed;
|
4707
|
+
if (!chartType) throw new Error('chartType is nil in buildSpec');
|
4708
|
+
const pipeline = builder.getSpecPipeline(chartType);
|
4709
|
+
if (!pipeline) throw new Error(`no spec pipeline for chartType ${chartType}`);
|
4710
|
+
const context = {
|
4711
|
+
vseed: builder.vseed,
|
4712
|
+
advancedVSeed
|
4713
|
+
};
|
4714
|
+
try {
|
4715
|
+
return execPipeline(pipeline, context);
|
4716
|
+
} catch (e) {
|
4717
|
+
console.error(e);
|
4718
|
+
throw new Error("buildSpec error, see error info in console");
|
4719
|
+
}
|
4720
|
+
};
|
4721
|
+
const build = (builder)=>{
|
4722
|
+
const advancedVSeed = builder.buildAdvanced();
|
4723
|
+
builder.advancedVSeed = advancedVSeed;
|
4724
|
+
if (!advancedVSeed) throw new Error('advancedVSeed is null');
|
4725
|
+
const spec = builder.buildSpec(advancedVSeed);
|
4726
|
+
builder.spec = spec;
|
4727
|
+
return spec;
|
4728
|
+
};
|
4729
|
+
const getColorItems = (builder)=>{
|
4730
|
+
const advancedVSeed = builder.advancedVSeed;
|
4731
|
+
if (!advancedVSeed) return [];
|
4732
|
+
const { datasetReshapeInfo } = advancedVSeed;
|
4733
|
+
const colorItems = unique(datasetReshapeInfo.flatMap((d)=>d.unfoldInfo.colorItems));
|
4734
|
+
const colorIdMap = datasetReshapeInfo.reduce((prev, cur)=>({
|
4735
|
+
...prev,
|
4736
|
+
...cur.unfoldInfo.colorIdMap
|
4737
|
+
}), {});
|
4738
|
+
return colorItems.map((d)=>colorIdMap[d]);
|
4739
|
+
};
|
4740
|
+
class Builder {
|
4741
|
+
_vseed;
|
4742
|
+
_advancedVSeed = null;
|
4743
|
+
_spec = null;
|
4744
|
+
constructor(vseed){
|
4745
|
+
this._vseed = vseed;
|
4474
4746
|
this._vseed.locale = vseed.locale || intl.getLocale();
|
4475
4747
|
}
|
4476
4748
|
build = ()=>build(this);
|
@@ -4480,6 +4752,7 @@ class Builder {
|
|
4480
4752
|
getSpecPipeline = (chartType)=>Builder._specPipelineMap[chartType];
|
4481
4753
|
getTheme = (themeKey)=>Builder._themeMap[themeKey];
|
4482
4754
|
getThemeMap = ()=>Builder._themeMap;
|
4755
|
+
getColorItems = ()=>getColorItems(this);
|
4483
4756
|
get vseed() {
|
4484
4757
|
return this._vseed;
|
4485
4758
|
}
|
@@ -4563,6 +4836,14 @@ const registerScatter = ()=>{
|
|
4563
4836
|
Builder._advancedPipelineMap.scatter = scatterAdvancedPipeline;
|
4564
4837
|
Builder._specPipelineMap.scatter = scatterSpecPipeline;
|
4565
4838
|
};
|
4839
|
+
const registerTable = ()=>{
|
4840
|
+
Builder._advancedPipelineMap.table = tableAdvancedPipeline;
|
4841
|
+
Builder._specPipelineMap.table = tableSpecPipeline;
|
4842
|
+
};
|
4843
|
+
const registerPivotTable = ()=>{
|
4844
|
+
Builder._advancedPipelineMap.pivotTable = pivotTableAdvancedPipeline;
|
4845
|
+
Builder._specPipelineMap.pivotTable = pivotTableSpecPipeline;
|
4846
|
+
};
|
4566
4847
|
const darkTheme = ()=>{
|
4567
4848
|
const linearAxis = {
|
4568
4849
|
nice: true,
|
@@ -4667,52 +4948,49 @@ const darkTheme = ()=>{
|
|
4667
4948
|
labelColor: '#4B4F54',
|
4668
4949
|
labelBackgroundColor: '#ffffff'
|
4669
4950
|
};
|
4670
|
-
|
4671
|
-
|
4672
|
-
|
4673
|
-
|
4674
|
-
|
4675
|
-
|
4676
|
-
|
4677
|
-
|
4678
|
-
|
4679
|
-
|
4680
|
-
|
4681
|
-
|
4682
|
-
|
4683
|
-
|
4684
|
-
|
4685
|
-
'#003A8C',
|
4686
|
-
'#B08AE2',
|
4687
|
-
'#FF6341',
|
4688
|
-
'#98DD62'
|
4689
|
-
]
|
4690
|
-
},
|
4691
|
-
label: {
|
4692
|
-
enable: true
|
4693
|
-
},
|
4694
|
-
tooltip: {
|
4695
|
-
enable: true
|
4696
|
-
},
|
4697
|
-
legend: {
|
4698
|
-
enable: true,
|
4699
|
-
border: true,
|
4700
|
-
maxSize: 1,
|
4701
|
-
position: 'rt',
|
4702
|
-
shapeType: 'rectRound',
|
4703
|
-
labelFontColor: '#FDFDFD',
|
4704
|
-
labelFontSize: 12,
|
4705
|
-
labelFontWeight: 400
|
4706
|
-
}
|
4707
|
-
}
|
4951
|
+
const baseConfig = {
|
4952
|
+
backgroundColor: 'transparent',
|
4953
|
+
color: {
|
4954
|
+
colorScheme: [
|
4955
|
+
'#2E62F1',
|
4956
|
+
'#4DC36A',
|
4957
|
+
'#FF8406',
|
4958
|
+
'#FFCC00',
|
4959
|
+
'#4F44CF',
|
4960
|
+
'#5AC8FA',
|
4961
|
+
'#003A8C',
|
4962
|
+
'#B08AE2',
|
4963
|
+
'#FF6341',
|
4964
|
+
'#98DD62'
|
4965
|
+
]
|
4708
4966
|
},
|
4967
|
+
label: {
|
4968
|
+
enable: true
|
4969
|
+
},
|
4970
|
+
tooltip: {
|
4971
|
+
enable: true
|
4972
|
+
},
|
4973
|
+
legend: {
|
4974
|
+
enable: true,
|
4975
|
+
border: true,
|
4976
|
+
maxSize: 1,
|
4977
|
+
position: 'rt',
|
4978
|
+
shapeType: 'rectRound',
|
4979
|
+
labelFontColor: '#FDFDFD',
|
4980
|
+
labelFontSize: 12,
|
4981
|
+
labelFontWeight: 400
|
4982
|
+
}
|
4983
|
+
};
|
4984
|
+
return {
|
4709
4985
|
config: {
|
4710
4986
|
line: {
|
4987
|
+
...baseConfig,
|
4711
4988
|
xAxis: bandAxis,
|
4712
4989
|
yAxis: linearAxis,
|
4713
4990
|
crosshairLine: crosshairLine
|
4714
4991
|
},
|
4715
4992
|
column: {
|
4993
|
+
...baseConfig,
|
4716
4994
|
xAxis: bandAxis,
|
4717
4995
|
yAxis: linearAxis,
|
4718
4996
|
crosshairRect: crosshairRect,
|
@@ -4724,6 +5002,7 @@ const darkTheme = ()=>{
|
|
4724
5002
|
]
|
4725
5003
|
},
|
4726
5004
|
columnParallel: {
|
5005
|
+
...baseConfig,
|
4727
5006
|
xAxis: bandAxis,
|
4728
5007
|
yAxis: linearAxis,
|
4729
5008
|
crosshairRect: crosshairRect,
|
@@ -4735,6 +5014,7 @@ const darkTheme = ()=>{
|
|
4735
5014
|
]
|
4736
5015
|
},
|
4737
5016
|
columnPercent: {
|
5017
|
+
...baseConfig,
|
4738
5018
|
xAxis: bandAxis,
|
4739
5019
|
yAxis: linearAxis,
|
4740
5020
|
crosshairRect: crosshairRect,
|
@@ -4746,6 +5026,7 @@ const darkTheme = ()=>{
|
|
4746
5026
|
]
|
4747
5027
|
},
|
4748
5028
|
bar: {
|
5029
|
+
...baseConfig,
|
4749
5030
|
xAxis: linearAxis,
|
4750
5031
|
yAxis: barBandAxis,
|
4751
5032
|
crosshairRect: crosshairRect,
|
@@ -4757,6 +5038,7 @@ const darkTheme = ()=>{
|
|
4757
5038
|
]
|
4758
5039
|
},
|
4759
5040
|
barParallel: {
|
5041
|
+
...baseConfig,
|
4760
5042
|
xAxis: linearAxis,
|
4761
5043
|
yAxis: barBandAxis,
|
4762
5044
|
crosshairRect: crosshairRect,
|
@@ -4768,6 +5050,7 @@ const darkTheme = ()=>{
|
|
4768
5050
|
]
|
4769
5051
|
},
|
4770
5052
|
barPercent: {
|
5053
|
+
...baseConfig,
|
4771
5054
|
xAxis: linearAxis,
|
4772
5055
|
yAxis: barBandAxis,
|
4773
5056
|
crosshairRect: crosshairRect,
|
@@ -4779,16 +5062,19 @@ const darkTheme = ()=>{
|
|
4779
5062
|
]
|
4780
5063
|
},
|
4781
5064
|
area: {
|
5065
|
+
...baseConfig,
|
4782
5066
|
xAxis: bandAxis,
|
4783
5067
|
yAxis: linearAxis,
|
4784
5068
|
crosshairLine: crosshairLine
|
4785
5069
|
},
|
4786
5070
|
areaPercent: {
|
5071
|
+
...baseConfig,
|
4787
5072
|
xAxis: bandAxis,
|
4788
5073
|
yAxis: linearAxis,
|
4789
5074
|
crosshairLine: crosshairLine
|
4790
5075
|
},
|
4791
5076
|
scatter: {
|
5077
|
+
...baseConfig,
|
4792
5078
|
xAxis: {
|
4793
5079
|
...linearAxis,
|
4794
5080
|
line: {
|
@@ -4804,6 +5090,35 @@ const darkTheme = ()=>{
|
|
4804
5090
|
}
|
4805
5091
|
},
|
4806
5092
|
crosshairLine
|
5093
|
+
},
|
5094
|
+
pie: {
|
5095
|
+
...baseConfig
|
5096
|
+
},
|
5097
|
+
donut: {
|
5098
|
+
...baseConfig
|
5099
|
+
},
|
5100
|
+
rose: {
|
5101
|
+
...baseConfig
|
5102
|
+
},
|
5103
|
+
roseParallel: {
|
5104
|
+
...baseConfig
|
5105
|
+
},
|
5106
|
+
funnel: {
|
5107
|
+
...baseConfig,
|
5108
|
+
color: {
|
5109
|
+
colorScheme: [
|
5110
|
+
'#2E62F1',
|
5111
|
+
'#3A6EF6',
|
5112
|
+
'#4780FA',
|
5113
|
+
'#548CFE',
|
5114
|
+
'#6198FF',
|
5115
|
+
'#6FA3FF',
|
5116
|
+
'#7CACFF',
|
5117
|
+
'#88B7FF',
|
5118
|
+
'#94C2FF',
|
5119
|
+
'#A0CEFF'
|
5120
|
+
]
|
5121
|
+
}
|
4807
5122
|
}
|
4808
5123
|
}
|
4809
5124
|
};
|
@@ -4913,52 +5228,49 @@ const lightTheme = ()=>{
|
|
4913
5228
|
labelColor: '#ffffff',
|
4914
5229
|
labelBackgroundColor: '#364159'
|
4915
5230
|
};
|
4916
|
-
|
4917
|
-
|
4918
|
-
|
4919
|
-
|
4920
|
-
|
4921
|
-
|
4922
|
-
|
4923
|
-
|
4924
|
-
|
4925
|
-
|
4926
|
-
|
4927
|
-
|
4928
|
-
|
4929
|
-
|
4930
|
-
|
4931
|
-
|
4932
|
-
|
4933
|
-
|
4934
|
-
|
4935
|
-
|
4936
|
-
|
4937
|
-
label: {
|
4938
|
-
enable: true
|
4939
|
-
},
|
4940
|
-
tooltip: {
|
4941
|
-
enable: true
|
4942
|
-
},
|
4943
|
-
legend: {
|
4944
|
-
enable: true,
|
4945
|
-
border: true,
|
4946
|
-
maxSize: 1,
|
4947
|
-
shapeType: 'rectRound',
|
4948
|
-
position: 'rt',
|
4949
|
-
labelFontColor: '#646A73',
|
4950
|
-
labelFontSize: 12,
|
4951
|
-
labelFontWeight: 400
|
4952
|
-
}
|
4953
|
-
}
|
5231
|
+
const baseConfig = {
|
5232
|
+
backgroundColor: 'transparent',
|
5233
|
+
color: {
|
5234
|
+
colorScheme: [
|
5235
|
+
'#8D72F6',
|
5236
|
+
'#5766EC',
|
5237
|
+
'#66A3FE',
|
5238
|
+
'#51D5E6',
|
5239
|
+
'#4EC0B3',
|
5240
|
+
'#F9DF90',
|
5241
|
+
'#F9AD71',
|
5242
|
+
'#ED8888',
|
5243
|
+
'#E9A0C3',
|
5244
|
+
'#D77DD3'
|
5245
|
+
]
|
5246
|
+
},
|
5247
|
+
label: {
|
5248
|
+
enable: true
|
5249
|
+
},
|
5250
|
+
tooltip: {
|
5251
|
+
enable: true
|
4954
5252
|
},
|
5253
|
+
legend: {
|
5254
|
+
enable: true,
|
5255
|
+
border: true,
|
5256
|
+
maxSize: 1,
|
5257
|
+
shapeType: 'rectRound',
|
5258
|
+
position: 'rt',
|
5259
|
+
labelFontColor: '#646A73',
|
5260
|
+
labelFontSize: 12,
|
5261
|
+
labelFontWeight: 400
|
5262
|
+
}
|
5263
|
+
};
|
5264
|
+
return {
|
4955
5265
|
config: {
|
4956
5266
|
line: {
|
5267
|
+
...baseConfig,
|
4957
5268
|
xAxis: bandAxis,
|
4958
5269
|
yAxis: linearAxis,
|
4959
5270
|
crosshairLine
|
4960
5271
|
},
|
4961
5272
|
column: {
|
5273
|
+
...baseConfig,
|
4962
5274
|
xAxis: bandAxis,
|
4963
5275
|
yAxis: linearAxis,
|
4964
5276
|
crosshairRect,
|
@@ -4970,6 +5282,7 @@ const lightTheme = ()=>{
|
|
4970
5282
|
]
|
4971
5283
|
},
|
4972
5284
|
columnParallel: {
|
5285
|
+
...baseConfig,
|
4973
5286
|
xAxis: bandAxis,
|
4974
5287
|
yAxis: linearAxis,
|
4975
5288
|
crosshairRect,
|
@@ -4981,6 +5294,7 @@ const lightTheme = ()=>{
|
|
4981
5294
|
]
|
4982
5295
|
},
|
4983
5296
|
columnPercent: {
|
5297
|
+
...baseConfig,
|
4984
5298
|
xAxis: bandAxis,
|
4985
5299
|
yAxis: linearAxis,
|
4986
5300
|
crosshairRect,
|
@@ -4992,6 +5306,7 @@ const lightTheme = ()=>{
|
|
4992
5306
|
]
|
4993
5307
|
},
|
4994
5308
|
bar: {
|
5309
|
+
...baseConfig,
|
4995
5310
|
xAxis: linearAxis,
|
4996
5311
|
yAxis: barBandAxis,
|
4997
5312
|
crosshairRect,
|
@@ -5003,6 +5318,7 @@ const lightTheme = ()=>{
|
|
5003
5318
|
]
|
5004
5319
|
},
|
5005
5320
|
barParallel: {
|
5321
|
+
...baseConfig,
|
5006
5322
|
xAxis: linearAxis,
|
5007
5323
|
yAxis: barBandAxis,
|
5008
5324
|
crosshairRect,
|
@@ -5014,6 +5330,7 @@ const lightTheme = ()=>{
|
|
5014
5330
|
]
|
5015
5331
|
},
|
5016
5332
|
barPercent: {
|
5333
|
+
...baseConfig,
|
5017
5334
|
xAxis: linearAxis,
|
5018
5335
|
yAxis: barBandAxis,
|
5019
5336
|
crosshairRect,
|
@@ -5025,16 +5342,19 @@ const lightTheme = ()=>{
|
|
5025
5342
|
]
|
5026
5343
|
},
|
5027
5344
|
area: {
|
5345
|
+
...baseConfig,
|
5028
5346
|
xAxis: bandAxis,
|
5029
5347
|
yAxis: linearAxis,
|
5030
5348
|
crosshairLine
|
5031
5349
|
},
|
5032
5350
|
areaPercent: {
|
5351
|
+
...baseConfig,
|
5033
5352
|
xAxis: bandAxis,
|
5034
5353
|
yAxis: linearAxis,
|
5035
5354
|
crosshairLine
|
5036
5355
|
},
|
5037
5356
|
scatter: {
|
5357
|
+
...baseConfig,
|
5038
5358
|
xAxis: {
|
5039
5359
|
...linearAxis,
|
5040
5360
|
line: {
|
@@ -5050,6 +5370,35 @@ const lightTheme = ()=>{
|
|
5050
5370
|
}
|
5051
5371
|
},
|
5052
5372
|
crosshairLine
|
5373
|
+
},
|
5374
|
+
pie: {
|
5375
|
+
...baseConfig
|
5376
|
+
},
|
5377
|
+
donut: {
|
5378
|
+
...baseConfig
|
5379
|
+
},
|
5380
|
+
rose: {
|
5381
|
+
...baseConfig
|
5382
|
+
},
|
5383
|
+
roseParallel: {
|
5384
|
+
...baseConfig
|
5385
|
+
},
|
5386
|
+
funnel: {
|
5387
|
+
...baseConfig,
|
5388
|
+
color: {
|
5389
|
+
colorScheme: [
|
5390
|
+
'#5766EC',
|
5391
|
+
'#6372F0',
|
5392
|
+
'#7080F4',
|
5393
|
+
'#7C8CFA',
|
5394
|
+
'#8998FF',
|
5395
|
+
'#95A3FF',
|
5396
|
+
'#A0AEFF',
|
5397
|
+
'#ACB9FF',
|
5398
|
+
'#B7C4FF',
|
5399
|
+
'#C2CEFF'
|
5400
|
+
]
|
5401
|
+
}
|
5053
5402
|
}
|
5054
5403
|
}
|
5055
5404
|
};
|
@@ -5083,6 +5432,8 @@ const registerAll = ()=>{
|
|
5083
5432
|
registerRoseParallel();
|
5084
5433
|
registerFunnel();
|
5085
5434
|
registerScatter();
|
5435
|
+
registerTable();
|
5436
|
+
registerPivotTable();
|
5086
5437
|
registerLightTheme();
|
5087
5438
|
registerDarkTheme();
|
5088
5439
|
};
|
@@ -5111,48 +5462,66 @@ const zDataset = z.array(zDatum);
|
|
5111
5462
|
const zDimension = z.object({
|
5112
5463
|
id: z.string(),
|
5113
5464
|
alias: z.string().optional(),
|
5114
|
-
visible: z.boolean().default(true).optional(),
|
5115
5465
|
location: z["enum"]([
|
5116
5466
|
'dimension',
|
5117
5467
|
'rowDimension',
|
5118
5468
|
'columnDimension'
|
5119
5469
|
]).default('dimension').optional()
|
5120
5470
|
});
|
5121
|
-
const
|
5471
|
+
const zDimensionGroup = z.object({
|
5472
|
+
id: z.string(),
|
5473
|
+
alias: z.string().optional(),
|
5474
|
+
get children () {
|
5475
|
+
return z.array(zDimensionGroup.or(zDimension)).optional();
|
5476
|
+
}
|
5477
|
+
});
|
5478
|
+
const zDimensions = z.array(zDimension);
|
5479
|
+
const zDimensionTree = z.array(zDimensionGroup.or(zDimension));
|
5122
5480
|
const zNumFormat = z.object({
|
5123
5481
|
type: z["enum"]([
|
5124
5482
|
'number',
|
5125
5483
|
'percent',
|
5126
|
-
'permille'
|
5484
|
+
'permille',
|
5485
|
+
'scientific'
|
5127
5486
|
]).default('number').optional(),
|
5128
5487
|
ratio: z.number().default(1).optional(),
|
5129
5488
|
symbol: z.string().default('').optional(),
|
5130
5489
|
thousandSeparator: z.boolean().default(false).optional(),
|
5131
|
-
decimalPlaces: z.number().default(2).optional(),
|
5132
|
-
round: z["enum"]([
|
5133
|
-
'round',
|
5134
|
-
'floor',
|
5135
|
-
'ceil'
|
5136
|
-
]).default('round').optional(),
|
5137
5490
|
prefix: z.string().default('').optional(),
|
5138
|
-
suffix: z.string().default('').optional()
|
5491
|
+
suffix: z.string().default('').optional(),
|
5492
|
+
fractionDigits: z.number().default(2).optional(),
|
5493
|
+
significantDigits: z.number().default(0).optional(),
|
5494
|
+
roundingPriority: z["enum"]([
|
5495
|
+
'morePrecision',
|
5496
|
+
'lessPrecision'
|
5497
|
+
]).default('morePrecision').optional(),
|
5498
|
+
roundingMode: z["enum"]([
|
5499
|
+
'floor',
|
5500
|
+
'ceil',
|
5501
|
+
'halfEven',
|
5502
|
+
'expand',
|
5503
|
+
'trunc',
|
5504
|
+
'halfFloor',
|
5505
|
+
'halfCeil',
|
5506
|
+
'halfExpand',
|
5507
|
+
'halfTrunc'
|
5508
|
+
]).default('halfCeil').optional()
|
5139
5509
|
}).optional();
|
5140
5510
|
const zMeasure = z.object({
|
5141
5511
|
id: z.string(),
|
5142
5512
|
alias: z.string().optional(),
|
5143
|
-
visible: z.boolean().default(true).optional(),
|
5144
5513
|
autoFormat: z.boolean().default(true).optional(),
|
5145
5514
|
format: zNumFormat["default"]({}).optional()
|
5146
5515
|
});
|
5147
5516
|
const zMeasureGroup = z.object({
|
5148
5517
|
id: z.string(),
|
5149
5518
|
alias: z.string().optional(),
|
5150
|
-
visible: z.boolean().default(true).optional(),
|
5151
5519
|
get children () {
|
5152
5520
|
return z.array(zMeasureGroup.or(zMeasure)).optional();
|
5153
5521
|
}
|
5154
5522
|
});
|
5155
|
-
const zMeasures = z.array(
|
5523
|
+
const zMeasures = z.array(zMeasure);
|
5524
|
+
const zMeasureTree = z.array(zMeasureGroup.or(zMeasure));
|
5156
5525
|
const zFoldInfo = z.object({
|
5157
5526
|
foldMap: z.record(z.string(), z.string().or(z.undefined())),
|
5158
5527
|
measureId: z.string(),
|
@@ -5180,94 +5549,10 @@ const zEncoding = z.array(z.object({
|
|
5180
5549
|
tooltip: z.array(z.string()).optional(),
|
5181
5550
|
size: z.array(z.string()).optional()
|
5182
5551
|
}));
|
5183
|
-
const
|
5184
|
-
const zLabel = z.object({
|
5185
|
-
enable: z.boolean().default(true).optional()
|
5186
|
-
});
|
5187
|
-
const zColor = z.object({
|
5188
|
-
colorScheme: z.array(z.string()).optional(),
|
5189
|
-
colorMapping: z.record(z.string(), z.string()).optional()
|
5190
|
-
});
|
5191
|
-
const zTooltip = z.object({
|
5192
|
-
enable: z.boolean().default(true).optional()
|
5193
|
-
});
|
5194
|
-
const zLegend = z.object({
|
5195
|
-
enable: z.boolean().default(true).optional(),
|
5196
|
-
border: z.boolean().default(true).optional(),
|
5197
|
-
maxSize: z.number().default(1).optional(),
|
5198
|
-
shapeType: z["enum"]([
|
5199
|
-
'circle',
|
5200
|
-
'cross',
|
5201
|
-
'diamond',
|
5202
|
-
'square',
|
5203
|
-
'arrow',
|
5204
|
-
'arrow2Left',
|
5205
|
-
'arrow2Right',
|
5206
|
-
'wedge',
|
5207
|
-
'thinTriangle',
|
5208
|
-
'triangle',
|
5209
|
-
'triangleUp',
|
5210
|
-
'triangleDown',
|
5211
|
-
'triangleRight',
|
5212
|
-
'triangleLeft',
|
5213
|
-
'stroke',
|
5214
|
-
'star',
|
5215
|
-
'wye',
|
5216
|
-
'rect',
|
5217
|
-
'arrowLeft',
|
5218
|
-
'arrowRight',
|
5219
|
-
'rectRound',
|
5220
|
-
'roundLine'
|
5221
|
-
]).default('rectRound').optional(),
|
5222
|
-
position: z["enum"]([
|
5223
|
-
'left',
|
5224
|
-
'leftTop',
|
5225
|
-
'leftBottom',
|
5226
|
-
'lt',
|
5227
|
-
'lb',
|
5228
|
-
'top',
|
5229
|
-
'topLeft',
|
5230
|
-
'topRight',
|
5231
|
-
'tl',
|
5232
|
-
'tr',
|
5233
|
-
'right',
|
5234
|
-
'rightTop',
|
5235
|
-
'rightBottom',
|
5236
|
-
'rt',
|
5237
|
-
'rb',
|
5238
|
-
'bottom',
|
5239
|
-
'bottomLeft',
|
5240
|
-
'bottomRight',
|
5241
|
-
'bl',
|
5242
|
-
'br'
|
5243
|
-
]).default('bottom').optional(),
|
5244
|
-
labelFontSize: z.number().default(12).optional(),
|
5245
|
-
labelFontColor: z.string().default('#fff').optional(),
|
5246
|
-
labelFontWeight: z.number().or(z.string()).default(400).optional()
|
5247
|
-
});
|
5248
|
-
const zVChartBaseConfig = z.object({
|
5249
|
-
backgroundColor: zBackgroundColor,
|
5250
|
-
label: zLabel.optional(),
|
5251
|
-
color: zColor.optional(),
|
5252
|
-
tooltip: zTooltip.optional(),
|
5253
|
-
legend: zLegend.optional()
|
5254
|
-
});
|
5255
|
-
const zVTableBaseConfig = z.object({
|
5256
|
-
backgroundColor: zBackgroundColor
|
5257
|
-
});
|
5258
|
-
const zBaseConfig = z.object({
|
5259
|
-
vchart: zVChartBaseConfig.optional(),
|
5260
|
-
vtable: zVTableBaseConfig.optional()
|
5261
|
-
});
|
5262
|
-
const zAxis = z.object({
|
5552
|
+
const zXBandAxis = z.object({
|
5263
5553
|
visible: z.boolean().default(true).optional(),
|
5264
|
-
min: z.number().optional(),
|
5265
|
-
max: z.number().optional(),
|
5266
|
-
nice: z.boolean().default(true).optional(),
|
5267
|
-
zero: z.boolean().default(true).optional(),
|
5268
|
-
inverse: z.boolean().default(false).optional(),
|
5269
5554
|
labelAutoHide: z.boolean().default(true).optional(),
|
5270
|
-
labelAutoHideGap: z.number().default(
|
5555
|
+
labelAutoHideGap: z.number().default(0).optional(),
|
5271
5556
|
labelAutoRotate: z.boolean().default(true).optional(),
|
5272
5557
|
labelAutoRotateAngleRange: z.array(z.number()).default([
|
5273
5558
|
0,
|
@@ -5307,18 +5592,16 @@ const zAxis = z.object({
|
|
5307
5592
|
gridWidth: z.number().default(0.5).optional()
|
5308
5593
|
}).optional()
|
5309
5594
|
});
|
5310
|
-
const
|
5595
|
+
const zYBandAxis = zXBandAxis;
|
5596
|
+
const zXLinearAxis = z.object({
|
5311
5597
|
visible: z.boolean().default(true).optional(),
|
5312
|
-
|
5313
|
-
|
5314
|
-
|
5315
|
-
|
5316
|
-
|
5317
|
-
|
5318
|
-
|
5319
|
-
]).optional(),
|
5320
|
-
labelAutoLimit: z.boolean().default(true).optional(),
|
5321
|
-
labelAutoLimitLength: z.number().default(100).optional(),
|
5598
|
+
min: z.number().optional(),
|
5599
|
+
max: z.number().optional(),
|
5600
|
+
nice: z.boolean().default(true).optional(),
|
5601
|
+
zero: z.boolean().default(true).optional(),
|
5602
|
+
log: z.boolean().default(false).optional(),
|
5603
|
+
logBase: z.number().default(10).optional(),
|
5604
|
+
inverse: z.boolean().default(false).optional(),
|
5322
5605
|
label: z.object({
|
5323
5606
|
visible: z.boolean().default(true).optional(),
|
5324
5607
|
labelColor: z.string().default('#797B85').optional(),
|
@@ -5350,14 +5633,218 @@ const zXBandAxis = z.object({
|
|
5350
5633
|
gridWidth: z.number().default(0.5).optional()
|
5351
5634
|
}).optional()
|
5352
5635
|
});
|
5353
|
-
const
|
5354
|
-
const
|
5636
|
+
const zYLinearAxis = zXLinearAxis;
|
5637
|
+
const zCrosshairLine = z.object({
|
5638
|
+
visible: z.boolean().optional(),
|
5639
|
+
lineColor: z.string().optional(),
|
5640
|
+
labelColor: z.string().optional(),
|
5641
|
+
labelVisible: z.boolean().optional(),
|
5642
|
+
labelBackgroundColor: z.string().optional()
|
5643
|
+
});
|
5644
|
+
const zCrosshairRect = z.object({
|
5645
|
+
visible: z.boolean().optional(),
|
5646
|
+
rectColor: z.string().optional(),
|
5647
|
+
labelColor: z.string().optional(),
|
5648
|
+
labelVisible: z.boolean().optional(),
|
5649
|
+
labelBackgroundColor: z.string().optional()
|
5650
|
+
});
|
5651
|
+
const zStackCornerRadius = z.number().or(z.array(z.number())).default([
|
5652
|
+
3,
|
5653
|
+
3,
|
5654
|
+
0,
|
5655
|
+
0
|
5656
|
+
]);
|
5657
|
+
const zBackgroundColor = z.string().default('transparent').optional();
|
5658
|
+
const zColor = z.object({
|
5659
|
+
colorScheme: z.array(z.string()).optional(),
|
5660
|
+
colorMapping: z.record(z.string(), z.string()).optional()
|
5661
|
+
});
|
5662
|
+
const zLabel = z.object({
|
5663
|
+
enable: z.boolean().default(true).optional()
|
5664
|
+
});
|
5665
|
+
const zLegend = z.object({
|
5666
|
+
enable: z.boolean().default(true).optional(),
|
5667
|
+
border: z.boolean().default(true).optional(),
|
5668
|
+
maxSize: z.number().default(1).optional(),
|
5669
|
+
shapeType: z["enum"]([
|
5670
|
+
'circle',
|
5671
|
+
'cross',
|
5672
|
+
'diamond',
|
5673
|
+
'square',
|
5674
|
+
'arrow',
|
5675
|
+
'arrow2Left',
|
5676
|
+
'arrow2Right',
|
5677
|
+
'wedge',
|
5678
|
+
'thinTriangle',
|
5679
|
+
'triangle',
|
5680
|
+
'triangleUp',
|
5681
|
+
'triangleDown',
|
5682
|
+
'triangleRight',
|
5683
|
+
'triangleLeft',
|
5684
|
+
'stroke',
|
5685
|
+
'star',
|
5686
|
+
'wye',
|
5687
|
+
'rect',
|
5688
|
+
'arrowLeft',
|
5689
|
+
'arrowRight',
|
5690
|
+
'rectRound',
|
5691
|
+
'roundLine'
|
5692
|
+
]).default('rectRound').optional(),
|
5693
|
+
position: z["enum"]([
|
5694
|
+
'left',
|
5695
|
+
'leftTop',
|
5696
|
+
'leftBottom',
|
5697
|
+
'lt',
|
5698
|
+
'lb',
|
5699
|
+
'top',
|
5700
|
+
'topLeft',
|
5701
|
+
'topRight',
|
5702
|
+
'tl',
|
5703
|
+
'tr',
|
5704
|
+
'right',
|
5705
|
+
'rightTop',
|
5706
|
+
'rightBottom',
|
5707
|
+
'rt',
|
5708
|
+
'rb',
|
5709
|
+
'bottom',
|
5710
|
+
'bottomLeft',
|
5711
|
+
'bottomRight',
|
5712
|
+
'bl',
|
5713
|
+
'br'
|
5714
|
+
]).default('bottom').optional(),
|
5715
|
+
labelFontSize: z.number().default(12).optional(),
|
5716
|
+
labelFontColor: z.string().default('#fff').optional(),
|
5717
|
+
labelFontWeight: z.number().or(z.string()).default(400).optional()
|
5718
|
+
});
|
5719
|
+
const zTooltip = z.object({
|
5720
|
+
enable: z.boolean().default(true).optional()
|
5721
|
+
});
|
5722
|
+
const zLineConfig = z.object({
|
5723
|
+
backgroundColor: zBackgroundColor.optional(),
|
5724
|
+
label: zLabel.optional(),
|
5725
|
+
color: zColor.optional(),
|
5726
|
+
tooltip: zTooltip.optional(),
|
5727
|
+
legend: zLegend.optional(),
|
5728
|
+
xAxis: zXBandAxis.optional(),
|
5729
|
+
yAxis: zYLinearAxis.optional(),
|
5730
|
+
crosshairLine: zCrosshairLine.optional()
|
5731
|
+
});
|
5732
|
+
const zColumnConfig = z.object({
|
5733
|
+
backgroundColor: zBackgroundColor.optional(),
|
5734
|
+
label: zLabel.optional(),
|
5735
|
+
color: zColor.optional(),
|
5736
|
+
tooltip: zTooltip.optional(),
|
5737
|
+
legend: zLegend.optional(),
|
5738
|
+
xAxis: zXBandAxis.optional(),
|
5739
|
+
yAxis: zYLinearAxis.optional(),
|
5740
|
+
crosshairRect: zCrosshairRect.optional(),
|
5741
|
+
stackCornerRadius: zStackCornerRadius.optional()
|
5742
|
+
});
|
5743
|
+
const zColumnParallelConfig = zColumnConfig;
|
5744
|
+
const zColumnPercentConfig = zColumnConfig;
|
5745
|
+
const zBarConfig = z.object({
|
5746
|
+
backgroundColor: zBackgroundColor.optional(),
|
5747
|
+
label: zLabel.optional(),
|
5748
|
+
color: zColor.optional(),
|
5749
|
+
tooltip: zTooltip.optional(),
|
5750
|
+
legend: zLegend.optional(),
|
5751
|
+
xAxis: zXLinearAxis.optional(),
|
5752
|
+
yAxis: zYBandAxis.optional(),
|
5753
|
+
crosshairRect: zCrosshairRect.optional(),
|
5754
|
+
stackCornerRadius: zStackCornerRadius.optional()
|
5755
|
+
});
|
5756
|
+
const zBarParallelConfig = zBarConfig;
|
5757
|
+
const zBarPercentConfig = zBarConfig;
|
5758
|
+
const zAreaConfig = z.object({
|
5759
|
+
backgroundColor: zBackgroundColor.optional(),
|
5760
|
+
label: zLabel.optional(),
|
5761
|
+
color: zColor.optional(),
|
5762
|
+
tooltip: zTooltip.optional(),
|
5763
|
+
legend: zLegend.optional(),
|
5764
|
+
xAxis: zXBandAxis.optional(),
|
5765
|
+
yAxis: zYLinearAxis.optional(),
|
5766
|
+
crosshairLine: zCrosshairLine.optional()
|
5767
|
+
});
|
5768
|
+
const zAreaPercentConfig = zAreaConfig;
|
5769
|
+
const zRoseConfig = z.object({
|
5770
|
+
backgroundColor: zBackgroundColor.optional(),
|
5771
|
+
label: zLabel.optional(),
|
5772
|
+
color: zColor.optional(),
|
5773
|
+
tooltip: zTooltip.optional(),
|
5774
|
+
legend: zLegend.optional()
|
5775
|
+
});
|
5776
|
+
const zRoseParallelConfig = zRoseConfig;
|
5777
|
+
const zPieConfig = z.object({
|
5778
|
+
backgroundColor: zBackgroundColor.optional(),
|
5779
|
+
label: zLabel.optional(),
|
5780
|
+
color: zColor.optional(),
|
5781
|
+
tooltip: zTooltip.optional(),
|
5782
|
+
legend: zLegend.optional()
|
5783
|
+
});
|
5784
|
+
const zDonutConfig = zPieConfig;
|
5785
|
+
const zDualAxisConfig = z.object({
|
5786
|
+
backgroundColor: zBackgroundColor.optional(),
|
5787
|
+
label: zLabel.optional(),
|
5788
|
+
color: zColor.optional(),
|
5789
|
+
tooltip: zTooltip.optional(),
|
5790
|
+
legend: zLegend.optional()
|
5791
|
+
});
|
5792
|
+
const zScatterConfig = z.object({
|
5793
|
+
backgroundColor: zBackgroundColor.optional(),
|
5794
|
+
label: zLabel.optional(),
|
5795
|
+
color: zColor.optional(),
|
5796
|
+
tooltip: zTooltip.optional(),
|
5797
|
+
legend: zLegend.optional(),
|
5798
|
+
xAxis: zXLinearAxis.optional(),
|
5799
|
+
yAxis: zYLinearAxis.optional(),
|
5800
|
+
crosshairLine: zCrosshairLine.optional()
|
5801
|
+
});
|
5802
|
+
const zFunnelConfig = z.object({
|
5803
|
+
backgroundColor: zBackgroundColor.optional(),
|
5804
|
+
color: zColor.optional(),
|
5805
|
+
tooltip: zTooltip.optional(),
|
5806
|
+
label: zLabel.optional(),
|
5807
|
+
legend: zLegend.optional()
|
5808
|
+
});
|
5809
|
+
const zConfig = z.object({
|
5810
|
+
table: z.object({}).optional(),
|
5811
|
+
pivotTable: z.object({}).optional(),
|
5812
|
+
line: zLineConfig.optional(),
|
5813
|
+
column: zColumnConfig.optional(),
|
5814
|
+
columnParallel: zColumnParallelConfig.optional(),
|
5815
|
+
columnPercent: zColumnPercentConfig.optional(),
|
5816
|
+
bar: zBarConfig.optional(),
|
5817
|
+
barParallel: zBarParallelConfig.optional(),
|
5818
|
+
barPercent: zBarPercentConfig.optional(),
|
5819
|
+
area: zAreaConfig.optional(),
|
5820
|
+
areaPercent: zAreaPercentConfig.optional(),
|
5821
|
+
rose: zRoseConfig.optional(),
|
5822
|
+
roseParallel: zRoseParallelConfig.optional(),
|
5823
|
+
pie: zPieConfig.optional(),
|
5824
|
+
donut: zDonutConfig.optional(),
|
5825
|
+
dualAxis: zDualAxisConfig.optional(),
|
5826
|
+
scatter: zScatterConfig.optional(),
|
5827
|
+
funnel: zFunnelConfig.optional()
|
5828
|
+
});
|
5829
|
+
const zAxis = z.object({
|
5355
5830
|
visible: z.boolean().default(true).optional(),
|
5356
5831
|
min: z.number().optional(),
|
5357
5832
|
max: z.number().optional(),
|
5358
5833
|
nice: z.boolean().default(true).optional(),
|
5359
5834
|
zero: z.boolean().default(true).optional(),
|
5360
5835
|
inverse: z.boolean().default(false).optional(),
|
5836
|
+
log: z.boolean().default(false).optional(),
|
5837
|
+
logBase: z.number().default(10).optional(),
|
5838
|
+
labelAutoHide: z.boolean().default(true).optional(),
|
5839
|
+
labelAutoHideGap: z.number().default(4).optional(),
|
5840
|
+
labelAutoRotate: z.boolean().default(true).optional(),
|
5841
|
+
labelAutoRotateAngleRange: z.array(z.number()).default([
|
5842
|
+
0,
|
5843
|
+
-45,
|
5844
|
+
-90
|
5845
|
+
]).optional(),
|
5846
|
+
labelAutoLimit: z.boolean().default(true).optional(),
|
5847
|
+
labelAutoLimitLength: z.number().default(100).optional(),
|
5361
5848
|
label: z.object({
|
5362
5849
|
visible: z.boolean().default(true).optional(),
|
5363
5850
|
labelColor: z.string().default('#797B85').optional(),
|
@@ -5389,93 +5876,11 @@ const zXLinearAxis = z.object({
|
|
5389
5876
|
gridWidth: z.number().default(0.5).optional()
|
5390
5877
|
}).optional()
|
5391
5878
|
});
|
5392
|
-
const
|
5393
|
-
|
5394
|
-
visible: z.boolean().optional(),
|
5395
|
-
lineColor: z.string().optional(),
|
5396
|
-
labelColor: z.string().optional(),
|
5397
|
-
labelVisible: z.boolean().optional(),
|
5398
|
-
labelBackgroundColor: z.string().optional()
|
5399
|
-
});
|
5400
|
-
const zCrosshairRect = z.object({
|
5401
|
-
visible: z.boolean().optional(),
|
5402
|
-
rectColor: z.string().optional(),
|
5403
|
-
labelColor: z.string().optional(),
|
5404
|
-
labelVisible: z.boolean().optional(),
|
5405
|
-
labelBackgroundColor: z.string().optional()
|
5406
|
-
});
|
5407
|
-
const zStackCornerRadius = z.number().or(z.array(z.number())).default([
|
5408
|
-
3,
|
5409
|
-
3,
|
5410
|
-
0,
|
5411
|
-
0
|
5412
|
-
]);
|
5413
|
-
const zConfig = z.object({
|
5414
|
-
table: z.object({}).optional(),
|
5415
|
-
pivotTable: z.object({}).optional(),
|
5416
|
-
line: z.object({
|
5417
|
-
xAxis: zXBandAxis.optional(),
|
5418
|
-
yAxis: zYLinearAxis.optional(),
|
5419
|
-
crosshairLine: zCrosshairLine.optional()
|
5420
|
-
}).optional(),
|
5421
|
-
column: z.object({
|
5422
|
-
xAxis: zXBandAxis.optional(),
|
5423
|
-
yAxis: zYLinearAxis.optional(),
|
5424
|
-
crosshairRect: zCrosshairRect.optional(),
|
5425
|
-
stackCornerRadius: zStackCornerRadius.optional()
|
5426
|
-
}).optional(),
|
5427
|
-
columnParallel: z.object({
|
5428
|
-
xAxis: zXBandAxis.optional(),
|
5429
|
-
yAxis: zYLinearAxis.optional(),
|
5430
|
-
crosshairRect: zCrosshairRect.optional(),
|
5431
|
-
stackCornerRadius: zStackCornerRadius.optional()
|
5432
|
-
}).optional(),
|
5433
|
-
columnPercent: z.object({
|
5434
|
-
xAxis: zXBandAxis.optional(),
|
5435
|
-
yAxis: zYLinearAxis.optional(),
|
5436
|
-
crosshairRect: zCrosshairRect.optional(),
|
5437
|
-
stackCornerRadius: zStackCornerRadius.optional()
|
5438
|
-
}).optional(),
|
5439
|
-
bar: z.object({
|
5440
|
-
xAxis: zXLinearAxis.optional(),
|
5441
|
-
yAxis: zYBandAxis.optional(),
|
5442
|
-
crosshairRect: zCrosshairRect.optional(),
|
5443
|
-
stackCornerRadius: zStackCornerRadius.optional()
|
5444
|
-
}).optional(),
|
5445
|
-
barParallel: z.object({
|
5446
|
-
xAxis: zXLinearAxis.optional(),
|
5447
|
-
yAxis: zYBandAxis.optional(),
|
5448
|
-
crosshairRect: zCrosshairRect.optional(),
|
5449
|
-
stackCornerRadius: zStackCornerRadius.optional()
|
5450
|
-
}).optional(),
|
5451
|
-
barPercent: z.object({
|
5452
|
-
xAxis: zXLinearAxis.optional(),
|
5453
|
-
yAxis: zYBandAxis.optional(),
|
5454
|
-
crosshairRect: zCrosshairRect.optional(),
|
5455
|
-
stackCornerRadius: zStackCornerRadius.optional()
|
5456
|
-
}).optional(),
|
5457
|
-
area: z.object({
|
5458
|
-
xAxis: zXBandAxis.optional(),
|
5459
|
-
yAxis: zYLinearAxis.optional(),
|
5460
|
-
crosshairLine: zCrosshairLine.optional()
|
5461
|
-
}).optional(),
|
5462
|
-
areaPercent: z.object({
|
5463
|
-
xAxis: zXBandAxis.optional(),
|
5464
|
-
yAxis: zYLinearAxis.optional(),
|
5465
|
-
crosshairLine: zCrosshairLine.optional()
|
5466
|
-
}).optional(),
|
5467
|
-
rose: z.object({}).optional(),
|
5468
|
-
roseParallel: z.object({}).optional(),
|
5469
|
-
pie: z.object({}).optional(),
|
5470
|
-
donut: z.object({}).optional(),
|
5471
|
-
dualAxis: z.object({}).optional(),
|
5472
|
-
scatter: z.object({
|
5473
|
-
xAxis: zXLinearAxis.optional(),
|
5474
|
-
yAxis: zYLinearAxis.optional(),
|
5475
|
-
crosshairLine: zCrosshairLine.optional()
|
5476
|
-
}).optional(),
|
5477
|
-
funnel: z.object({}).optional()
|
5879
|
+
const zCustomThemeConfig = z.object({
|
5880
|
+
config: zConfig.optional()
|
5478
5881
|
});
|
5882
|
+
const zCustomTheme = z.record(z.string(), zCustomThemeConfig).optional();
|
5883
|
+
const zTheme = z.string();
|
5479
5884
|
const zSelector = z.union([
|
5480
5885
|
z.string(),
|
5481
5886
|
z.number(),
|
@@ -5531,6 +5936,74 @@ const zSelector = z.union([
|
|
5531
5936
|
})
|
5532
5937
|
]);
|
5533
5938
|
const zSelectors = z.array(zSelector);
|
5939
|
+
const zBarStyle = z.object({
|
5940
|
+
selector: z.union([
|
5941
|
+
zSelector,
|
5942
|
+
zSelectors
|
5943
|
+
]).optional(),
|
5944
|
+
barColor: z.string().optional(),
|
5945
|
+
barColorOpacity: z.number().optional(),
|
5946
|
+
barBorderColor: z.string().optional(),
|
5947
|
+
barBorderWidth: z.number().optional(),
|
5948
|
+
barBorderStyle: z.union([
|
5949
|
+
z.literal('solid'),
|
5950
|
+
z.literal('dashed'),
|
5951
|
+
z.literal('dotted')
|
5952
|
+
]).optional(),
|
5953
|
+
barRadius: z.union([
|
5954
|
+
z.number(),
|
5955
|
+
z.array(z.number())
|
5956
|
+
]).optional()
|
5957
|
+
});
|
5958
|
+
const zPointStyle = z.object({
|
5959
|
+
selector: z.union([
|
5960
|
+
zSelector,
|
5961
|
+
zSelectors
|
5962
|
+
]).optional(),
|
5963
|
+
pointSize: z.number().optional(),
|
5964
|
+
pointColor: z.string().optional(),
|
5965
|
+
pointColorOpacity: z.number().optional(),
|
5966
|
+
pointBorderColor: z.string().optional(),
|
5967
|
+
pointBorderWidth: z.number().optional(),
|
5968
|
+
pointBorderStyle: z.union([
|
5969
|
+
z["enum"]([
|
5970
|
+
'solid',
|
5971
|
+
'dashed',
|
5972
|
+
'dotted'
|
5973
|
+
])
|
5974
|
+
]).optional()
|
5975
|
+
});
|
5976
|
+
const zLineStyle = z.object({
|
5977
|
+
selector: z.union([
|
5978
|
+
zSelector,
|
5979
|
+
zSelectors
|
5980
|
+
]).optional(),
|
5981
|
+
lineSmooth: z.boolean().default(true).optional(),
|
5982
|
+
lineColor: z.string().optional(),
|
5983
|
+
lineColorOpacity: z.number().optional(),
|
5984
|
+
lineWidth: z.number().optional(),
|
5985
|
+
lineStyle: z.union([
|
5986
|
+
z["enum"]([
|
5987
|
+
'solid',
|
5988
|
+
'dashed',
|
5989
|
+
'dotted'
|
5990
|
+
])
|
5991
|
+
]).optional()
|
5992
|
+
});
|
5993
|
+
const zAreaStyle = z.object({
|
5994
|
+
selector: z.union([
|
5995
|
+
zSelector,
|
5996
|
+
zSelectors
|
5997
|
+
]).optional(),
|
5998
|
+
areaColor: z.string().optional(),
|
5999
|
+
areaColorOpacity: z.number().optional()
|
6000
|
+
});
|
6001
|
+
const zMarkStyle = z.object({
|
6002
|
+
barStyle: zBarStyle.or(z.array(zBarStyle)).optional(),
|
6003
|
+
pointStyle: zPointStyle.or(z.array(zPointStyle)).optional(),
|
6004
|
+
lineStyle: zLineStyle.or(z.array(zLineStyle)).optional(),
|
6005
|
+
areaStyle: zAreaStyle.or(z.array(zAreaStyle)).optional()
|
6006
|
+
});
|
5534
6007
|
const zAnnotationPoint = z.object({
|
5535
6008
|
selector: z.union([
|
5536
6009
|
zSelector,
|
@@ -5707,91 +6180,33 @@ const zAnnotation = z.object({
|
|
5707
6180
|
annotationHorizontalLine: zAnnotationHorizontalLine.or(z.array(zAnnotationHorizontalLine)).optional(),
|
5708
6181
|
annotationArea: zAnnotationArea.or(z.array(zAnnotationArea)).optional()
|
5709
6182
|
});
|
5710
|
-
const zBarStyle = z.object({
|
5711
|
-
selector: z.union([
|
5712
|
-
zSelector,
|
5713
|
-
zSelectors
|
5714
|
-
]).optional(),
|
5715
|
-
barColor: z.string().optional(),
|
5716
|
-
barColorOpacity: z.number().optional(),
|
5717
|
-
barBorderColor: z.string().optional(),
|
5718
|
-
barBorderWidth: z.number().optional(),
|
5719
|
-
barBorderStyle: z.union([
|
5720
|
-
z.literal('solid'),
|
5721
|
-
z.literal('dashed'),
|
5722
|
-
z.literal('dotted')
|
5723
|
-
]).optional(),
|
5724
|
-
barRadius: z.union([
|
5725
|
-
z.number(),
|
5726
|
-
z.array(z.number())
|
5727
|
-
]).optional()
|
5728
|
-
});
|
5729
|
-
const zPointStyle = z.object({
|
5730
|
-
selector: z.union([
|
5731
|
-
zSelector,
|
5732
|
-
zSelectors
|
5733
|
-
]).optional(),
|
5734
|
-
pointSize: z.number().optional(),
|
5735
|
-
pointColor: z.string().optional(),
|
5736
|
-
pointColorOpacity: z.number().optional(),
|
5737
|
-
pointBorderColor: z.string().optional(),
|
5738
|
-
pointBorderWidth: z.number().optional(),
|
5739
|
-
pointBorderStyle: z.union([
|
5740
|
-
z["enum"]([
|
5741
|
-
'solid',
|
5742
|
-
'dashed',
|
5743
|
-
'dotted'
|
5744
|
-
])
|
5745
|
-
]).optional()
|
5746
|
-
});
|
5747
|
-
const zLineStyle = z.object({
|
5748
|
-
selector: z.union([
|
5749
|
-
zSelector,
|
5750
|
-
zSelectors
|
5751
|
-
]).optional(),
|
5752
|
-
lineSmooth: z.boolean().default(true).optional(),
|
5753
|
-
lineColor: z.string().optional(),
|
5754
|
-
lineColorOpacity: z.number().optional(),
|
5755
|
-
lineWidth: z.number().optional(),
|
5756
|
-
lineStyle: z.union([
|
5757
|
-
z["enum"]([
|
5758
|
-
'solid',
|
5759
|
-
'dashed',
|
5760
|
-
'dotted'
|
5761
|
-
])
|
5762
|
-
]).optional()
|
5763
|
-
});
|
5764
|
-
const zAreaStyle = z.object({
|
5765
|
-
selector: z.union([
|
5766
|
-
zSelector,
|
5767
|
-
zSelectors
|
5768
|
-
]).optional(),
|
5769
|
-
areaColor: z.string().optional(),
|
5770
|
-
areaColorOpacity: z.number().optional()
|
5771
|
-
});
|
5772
|
-
const zMarkStyle = z.object({
|
5773
|
-
barStyle: zBarStyle.or(z.array(zBarStyle)).optional(),
|
5774
|
-
pointStyle: zPointStyle.or(z.array(zPointStyle)).optional(),
|
5775
|
-
lineStyle: zLineStyle.or(z.array(zLineStyle)).optional(),
|
5776
|
-
areaStyle: zAreaStyle.or(z.array(zAreaStyle)).optional()
|
5777
|
-
});
|
5778
|
-
const zCustomThemeConfig = z.object({
|
5779
|
-
baseConfig: zBaseConfig.optional(),
|
5780
|
-
config: zConfig.optional(),
|
5781
|
-
annotation: zAnnotation.optional(),
|
5782
|
-
markStyle: zMarkStyle.optional()
|
5783
|
-
});
|
5784
|
-
const zCustomTheme = z.record(z.string(), zCustomThemeConfig).optional();
|
5785
|
-
const zTheme = z.string();
|
5786
6183
|
const zLocale = z["enum"]([
|
5787
6184
|
'zh-CN',
|
5788
6185
|
'en-US'
|
5789
6186
|
]).default('zh-CN');
|
6187
|
+
const zTable = z.object({
|
6188
|
+
chartType: z.literal('table'),
|
6189
|
+
dataset: zDataset.optional(),
|
6190
|
+
dimensions: zDimensions.optional(),
|
6191
|
+
measures: zMeasureTree.optional(),
|
6192
|
+
backgroundColor: zBackgroundColor.optional(),
|
6193
|
+
theme: zTheme.optional(),
|
6194
|
+
locale: zLocale.optional()
|
6195
|
+
});
|
6196
|
+
const zPivotTable = z.object({
|
6197
|
+
chartType: z.literal('pivotTable'),
|
6198
|
+
dataset: zDataset.optional(),
|
6199
|
+
dimensions: zDimensions.optional(),
|
6200
|
+
measures: zMeasures.optional(),
|
6201
|
+
backgroundColor: zBackgroundColor.optional(),
|
6202
|
+
theme: zTheme.optional(),
|
6203
|
+
locale: zLocale.optional()
|
6204
|
+
});
|
5790
6205
|
const zLine = z.object({
|
5791
6206
|
chartType: z.literal('line'),
|
5792
6207
|
dataset: zDataset.optional(),
|
5793
6208
|
dimensions: zDimensions.optional(),
|
5794
|
-
measures:
|
6209
|
+
measures: zMeasureTree.optional(),
|
5795
6210
|
backgroundColor: zBackgroundColor.optional(),
|
5796
6211
|
color: zColor.optional(),
|
5797
6212
|
label: zLabel.optional(),
|
@@ -5813,7 +6228,7 @@ const zColumn = z.object({
|
|
5813
6228
|
chartType: z.literal('column'),
|
5814
6229
|
dataset: zDataset.optional(),
|
5815
6230
|
dimensions: zDimensions.optional(),
|
5816
|
-
measures:
|
6231
|
+
measures: zMeasureTree.optional(),
|
5817
6232
|
backgroundColor: zBackgroundColor.optional(),
|
5818
6233
|
color: zColor.optional(),
|
5819
6234
|
label: zLabel.optional(),
|
@@ -5835,7 +6250,7 @@ const zColumnParallel = z.object({
|
|
5835
6250
|
chartType: z.literal('columnParallel'),
|
5836
6251
|
dataset: zDataset.optional(),
|
5837
6252
|
dimensions: zDimensions.optional(),
|
5838
|
-
measures:
|
6253
|
+
measures: zMeasureTree.optional(),
|
5839
6254
|
backgroundColor: zBackgroundColor.optional(),
|
5840
6255
|
color: zColor.optional(),
|
5841
6256
|
label: zLabel.optional(),
|
@@ -5857,7 +6272,7 @@ const zColumnPercent = z.object({
|
|
5857
6272
|
chartType: z.literal('columnPercent'),
|
5858
6273
|
dataset: zDataset.optional(),
|
5859
6274
|
dimensions: zDimensions.optional(),
|
5860
|
-
measures:
|
6275
|
+
measures: zMeasureTree.optional(),
|
5861
6276
|
backgroundColor: zBackgroundColor.optional(),
|
5862
6277
|
color: zColor.optional(),
|
5863
6278
|
label: zLabel.optional(),
|
@@ -5879,7 +6294,7 @@ const zBar = z.object({
|
|
5879
6294
|
chartType: z.literal('bar'),
|
5880
6295
|
dataset: zDataset.optional(),
|
5881
6296
|
dimensions: zDimensions.optional(),
|
5882
|
-
measures:
|
6297
|
+
measures: zMeasureTree.optional(),
|
5883
6298
|
backgroundColor: zBackgroundColor.optional(),
|
5884
6299
|
color: zColor.optional(),
|
5885
6300
|
label: zLabel.optional(),
|
@@ -5901,7 +6316,7 @@ const zBarParallel = z.object({
|
|
5901
6316
|
chartType: z.literal('barParallel'),
|
5902
6317
|
dataset: zDataset.optional(),
|
5903
6318
|
dimensions: zDimensions.optional(),
|
5904
|
-
measures:
|
6319
|
+
measures: zMeasureTree.optional(),
|
5905
6320
|
backgroundColor: zBackgroundColor.optional(),
|
5906
6321
|
color: zColor.optional(),
|
5907
6322
|
label: zLabel.optional(),
|
@@ -5923,7 +6338,7 @@ const zBarPercent = z.object({
|
|
5923
6338
|
chartType: z.literal('barPercent'),
|
5924
6339
|
dataset: zDataset.optional(),
|
5925
6340
|
dimensions: zDimensions.optional(),
|
5926
|
-
measures:
|
6341
|
+
measures: zMeasureTree.optional(),
|
5927
6342
|
backgroundColor: zBackgroundColor.optional(),
|
5928
6343
|
color: zColor.optional(),
|
5929
6344
|
label: zLabel.optional(),
|
@@ -5945,7 +6360,7 @@ const zArea = z.object({
|
|
5945
6360
|
chartType: z.literal('area'),
|
5946
6361
|
dataset: zDataset.optional(),
|
5947
6362
|
dimensions: zDimensions.optional(),
|
5948
|
-
measures:
|
6363
|
+
measures: zMeasureTree.optional(),
|
5949
6364
|
backgroundColor: zBackgroundColor.optional(),
|
5950
6365
|
color: zColor.optional(),
|
5951
6366
|
label: zLabel.optional(),
|
@@ -5968,7 +6383,7 @@ const zAreaPercent = z.object({
|
|
5968
6383
|
chartType: z.literal('areaPercent'),
|
5969
6384
|
dataset: zDataset.optional(),
|
5970
6385
|
dimensions: zDimensions.optional(),
|
5971
|
-
measures:
|
6386
|
+
measures: zMeasureTree.optional(),
|
5972
6387
|
backgroundColor: zBackgroundColor.optional(),
|
5973
6388
|
color: zColor.optional(),
|
5974
6389
|
label: zLabel.optional(),
|
@@ -5991,7 +6406,7 @@ const zRose = z.object({
|
|
5991
6406
|
chartType: z.literal('rose'),
|
5992
6407
|
dataset: zDataset.optional(),
|
5993
6408
|
dimensions: zDimensions.optional(),
|
5994
|
-
measures:
|
6409
|
+
measures: zMeasureTree.optional(),
|
5995
6410
|
backgroundColor: zBackgroundColor.optional(),
|
5996
6411
|
color: zColor.optional(),
|
5997
6412
|
label: zLabel.optional(),
|
@@ -6004,7 +6419,7 @@ const zRoseParallel = z.object({
|
|
6004
6419
|
chartType: z.literal('roseParallel'),
|
6005
6420
|
dataset: zDataset.optional(),
|
6006
6421
|
dimensions: zDimensions.optional(),
|
6007
|
-
measures:
|
6422
|
+
measures: zMeasureTree.optional(),
|
6008
6423
|
backgroundColor: zBackgroundColor.optional(),
|
6009
6424
|
color: zColor.optional(),
|
6010
6425
|
label: zLabel.optional(),
|
@@ -6017,7 +6432,7 @@ const zPie = z.object({
|
|
6017
6432
|
chartType: z.literal('pie'),
|
6018
6433
|
dataset: zDataset.optional(),
|
6019
6434
|
dimensions: zDimensions.optional(),
|
6020
|
-
measures:
|
6435
|
+
measures: zMeasureTree.optional(),
|
6021
6436
|
backgroundColor: zBackgroundColor.optional(),
|
6022
6437
|
color: zColor.optional(),
|
6023
6438
|
label: zLabel.optional(),
|
@@ -6030,7 +6445,7 @@ const zDonut = z.object({
|
|
6030
6445
|
chartType: z.literal('donut'),
|
6031
6446
|
dataset: zDataset.optional(),
|
6032
6447
|
dimensions: zDimensions.optional(),
|
6033
|
-
measures:
|
6448
|
+
measures: zMeasureTree.optional(),
|
6034
6449
|
backgroundColor: zBackgroundColor.optional(),
|
6035
6450
|
color: zColor.optional(),
|
6036
6451
|
label: zLabel.optional(),
|
@@ -6043,7 +6458,7 @@ const zScatter = z.object({
|
|
6043
6458
|
chartType: z.literal('scatter'),
|
6044
6459
|
dataset: zDataset.optional(),
|
6045
6460
|
dimensions: zDimensions.optional(),
|
6046
|
-
measures:
|
6461
|
+
measures: zMeasureTree.optional(),
|
6047
6462
|
backgroundColor: zBackgroundColor.optional(),
|
6048
6463
|
color: zColor.optional(),
|
6049
6464
|
label: zLabel.optional(),
|
@@ -6064,7 +6479,7 @@ const zFunnel = z.object({
|
|
6064
6479
|
chartType: z.literal('funnel'),
|
6065
6480
|
dataset: zDataset.optional(),
|
6066
6481
|
dimensions: zDimensions.optional(),
|
6067
|
-
measures:
|
6482
|
+
measures: zMeasureTree.optional(),
|
6068
6483
|
backgroundColor: zBackgroundColor.optional(),
|
6069
6484
|
color: zColor.optional(),
|
6070
6485
|
label: zLabel.optional(),
|
@@ -6074,6 +6489,8 @@ const zFunnel = z.object({
|
|
6074
6489
|
locale: zLocale.optional()
|
6075
6490
|
});
|
6076
6491
|
const zVSeed = z.discriminatedUnion('chartType', [
|
6492
|
+
zTable,
|
6493
|
+
zPivotTable,
|
6077
6494
|
zLine,
|
6078
6495
|
zColumn,
|
6079
6496
|
zColumnParallel,
|
@@ -6094,17 +6511,16 @@ const zAdvancedVSeed = z.object({
|
|
6094
6511
|
chartType: zChartType,
|
6095
6512
|
dataset: zDataset,
|
6096
6513
|
datasetReshapeInfo: zDatasetReshapeInfo,
|
6097
|
-
dimensions:
|
6098
|
-
measures:
|
6514
|
+
dimensions: zDimensionTree,
|
6515
|
+
measures: zMeasureTree,
|
6099
6516
|
encoding: zEncoding,
|
6100
|
-
baseConfig: zBaseConfig,
|
6101
6517
|
config: zConfig,
|
6102
6518
|
theme: zTheme,
|
6103
6519
|
markStyle: zMarkStyle,
|
6104
|
-
customTheme:
|
6520
|
+
customTheme: zCustomThemeConfig,
|
6105
6521
|
annotation: zAnnotation,
|
6106
6522
|
locale: zLocale
|
6107
6523
|
});
|
6108
|
-
export { Builder, FoldMeasureId, FoldMeasureName, FoldMeasureValue, ORIGINAL_DATA, Separator, UnfoldDimensionGroup, UnfoldDimensionGroupId, areaAdvancedPipeline, areaPercentAdvancedPipeline, areaPercentSpecPipeline, areaSpecPipeline, autoFormatter, autoNumFormatter, barAdvancedPipeline, barParallelAdvancedPipeline, barParallelSpecPipeline, barPercentAdvancedPipeline, barPercentSpecPipeline, barSpecPipeline, columnAdvancedPipeline, columnParallelAdvancedPipeline, columnParallelSpecPipeline, columnPercentAdvancedPipeline, columnPercentSpecPipeline, columnSpecPipeline, createFormatter, createNumFormatter, darkTheme, dataReshapeFor1D1M, dataReshapeFor1D2M, dataReshapeFor2D1M, donutAdvancedPipeline, donutSpecPipeline, execPipeline, findFirstMeasure, findMeasureById, foldMeasures, funnelAdvancedPipeline, funnelSpecPipeline, i18n, intl, isPivotChart, isVChart, isVTable, lightTheme, lineAdvancedPipeline, lineSpecPipeline, pieAdvancedPipeline, pieSpecPipeline, registerAll, registerArea, registerAreaPercent, registerBar, registerBarParallel, registerBarPercent, registerColumn, registerColumnParallel, registerColumnPercent, registerCustomTheme, registerDarkTheme, registerLightTheme, registerLine, roseAdvancedPipeline, roseParallelAdvancedPipeline, roseParallelSpecPipeline, roseSpecPipeline, scatterAdvancedPipeline, scatterSpecPipeline, unfoldDimensions, zAdvancedVSeed, zAnnotation, zAnnotationArea, zAnnotationHorizontalLine, zAnnotationPoint, zAnnotationVerticalLine, zArea, zAreaPercent, zAreaStyle, zAxis, zBackgroundColor, zBar, zBarParallel, zBarPercent,
|
6524
|
+
export { Builder, FoldMeasureId, FoldMeasureName, FoldMeasureValue, ORIGINAL_DATA, Separator, UnfoldDimensionGroup, UnfoldDimensionGroupId, areaAdvancedPipeline, areaPercentAdvancedPipeline, areaPercentSpecPipeline, areaSpecPipeline, autoFormatter, autoNumFormatter, barAdvancedPipeline, barParallelAdvancedPipeline, barParallelSpecPipeline, barPercentAdvancedPipeline, barPercentSpecPipeline, barSpecPipeline, columnAdvancedPipeline, columnParallelAdvancedPipeline, columnParallelSpecPipeline, columnPercentAdvancedPipeline, columnPercentSpecPipeline, columnSpecPipeline, createFormatter, createNumFormatter, darkTheme, dataReshapeFor1D1M, dataReshapeFor1D2M, dataReshapeFor2D1M, donutAdvancedPipeline, donutSpecPipeline, execPipeline, findAllDimensions, findAllMeasures, findDimensionById, findFirstDimension, findFirstMeasure, findMeasureById, foldMeasures, funnelAdvancedPipeline, funnelSpecPipeline, i18n, intl, isPivotChart, isPivotTable, isTable, isVChart, isVTable, lightTheme, lineAdvancedPipeline, lineSpecPipeline, pieAdvancedPipeline, pieSpecPipeline, pivotTableAdvancedPipeline, pivotTableSpecPipeline, preorderTraverse, registerAll, registerArea, registerAreaPercent, registerBar, registerBarParallel, registerBarPercent, registerColumn, registerColumnParallel, registerColumnPercent, registerCustomTheme, registerDarkTheme, registerDonut, registerFunnel, registerLightTheme, registerLine, registerPie, registerPivotTable, registerRose, registerRoseParallel, registerScatter, registerTable, roseAdvancedPipeline, roseParallelAdvancedPipeline, roseParallelSpecPipeline, roseSpecPipeline, scatterAdvancedPipeline, scatterSpecPipeline, tableAdvancedPipeline, tableSpecPipeline, unfoldDimensions, zAdvancedVSeed, zAnnotation, zAnnotationArea, zAnnotationHorizontalLine, zAnnotationPoint, zAnnotationVerticalLine, zArea, zAreaConfig, zAreaPercent, zAreaPercentConfig, zAreaStyle, zAxis, zBackgroundColor, zBar, zBarConfig, zBarParallel, zBarParallelConfig, zBarPercent, zBarPercentConfig, zBarStyle, zChartType, zColor, zColumn, zColumnConfig, zColumnParallel, zColumnParallelConfig, zColumnPercent, zColumnPercentConfig, zConfig, zCrosshairLine, zCrosshairRect, zCustomTheme, zCustomThemeConfig, zDataset, zDatasetReshapeInfo, zDatum, zDimension, zDimensionGroup, zDimensionTree, zDimensions, zDonut, zDonutConfig, zDualAxisConfig, zEncoding, zFoldInfo, zFunnel, zFunnelConfig, zLabel, zLegend, zLine, zLineConfig, zLineStyle, zLocale, zMarkStyle, zMeasure, zMeasureGroup, zMeasureTree, zMeasures, zNumFormat, zPie, zPieConfig, zPivotTable, zPointStyle, zRose, zRoseConfig, zRoseParallel, zRoseParallelConfig, zScatter, zScatterConfig, zStackCornerRadius, zTable, zTheme, zTooltip, zUnfoldInfo, zVSeed, zXBandAxis, zXLinearAxis, zYBandAxis, zYLinearAxis };
|
6109
6525
|
|
6110
6526
|
//# sourceMappingURL=index.js.map
|