@visactor/vseed 0.1.50 → 0.2.0
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/cjs/index.cjs +3 -3
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/builder/builder/buildAdvanced.js +1 -1
- package/dist/esm/builder/builder/buildAdvanced.js.map +1 -1
- package/dist/esm/builder/builder/buildSpec.js +1 -1
- package/dist/esm/builder/builder/buildSpec.js.map +1 -1
- package/dist/esm/builder/builder/builder.d.ts +817 -1
- package/dist/esm/builder/builder/builder.js +5 -1
- package/dist/esm/builder/builder/builder.js.map +1 -1
- package/dist/esm/dataSelector/selector.d.ts +5 -0
- package/dist/esm/dataSelector/selector.js +92 -50
- package/dist/esm/dataSelector/selector.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/donut.js +3 -3
- package/dist/esm/pipeline/advanced/chart/pipeline/donut.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/histogram.js +1 -2
- package/dist/esm/pipeline/advanced/chart/pipeline/histogram.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/pie.js +3 -3
- package/dist/esm/pipeline/advanced/chart/pipeline/pie.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/boxplot.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/boxplot.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/column.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/column.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/dualAxis.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/dualAxis.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/line.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/line.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/scatter.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/scatter.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/pie.js +8 -6
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/pie.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/markStyle/markStyle.js +3 -1
- package/dist/esm/pipeline/advanced/chart/pipes/markStyle/markStyle.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/measures/buildMeasures.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipes/measures/buildMeasures.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.js +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithEncoding.js +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithEncoding.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/area.js +3 -2
- package/dist/esm/pipeline/spec/chart/pipeline/area.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/areaPercent.js +3 -2
- package/dist/esm/pipeline/spec/chart/pipeline/areaPercent.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/bar.js +3 -2
- package/dist/esm/pipeline/spec/chart/pipeline/bar.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/barParallel.js +3 -2
- package/dist/esm/pipeline/spec/chart/pipeline/barParallel.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/barPercent.js +3 -2
- package/dist/esm/pipeline/spec/chart/pipeline/barPercent.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/boxplot.js +8 -6
- package/dist/esm/pipeline/spec/chart/pipeline/boxplot.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/column.js +3 -2
- package/dist/esm/pipeline/spec/chart/pipeline/column.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/columnParallel.js +3 -2
- package/dist/esm/pipeline/spec/chart/pipeline/columnParallel.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/columnPercent.js +3 -2
- package/dist/esm/pipeline/spec/chart/pipeline/columnPercent.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/dualAxis.js +19 -16
- package/dist/esm/pipeline/spec/chart/pipeline/dualAxis.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/histogram.js +3 -2
- package/dist/esm/pipeline/spec/chart/pipeline/histogram.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/line.js +3 -2
- package/dist/esm/pipeline/spec/chart/pipeline/line.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/scatter.js +6 -3
- package/dist/esm/pipeline/spec/chart/pipeline/scatter.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointOfDualAxis.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointOfDualAxis.js +94 -0
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointOfDualAxis.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/annotation/index.d.ts +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/annotation/index.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/utils.d.ts +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/utils.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/utils.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/xBand.js +12 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/xBand.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/yBand.js +12 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/yBand.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/color/colorBoxPlotStyleFill.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/color/colorBoxPlotStyleFill.js +17 -0
- package/dist/esm/pipeline/spec/chart/pipes/color/colorBoxPlotStyleFill.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/color/index.d.ts +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/color/index.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipes/crosshair/horizontalCrosshairLine.js +3 -0
- package/dist/esm/pipeline/spec/chart/pipes/crosshair/horizontalCrosshairLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/crosshair/horizontalCrosshairRect.js +4 -1
- package/dist/esm/pipeline/spec/chart/pipes/crosshair/horizontalCrosshairRect.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/crosshair/verticalCrosshairLine.js +3 -0
- package/dist/esm/pipeline/spec/chart/pipes/crosshair/verticalCrosshairLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/crosshair/verticalCrosshairRect.js +4 -1
- package/dist/esm/pipeline/spec/chart/pipes/crosshair/verticalCrosshairRect.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/index.d.ts +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/index.js +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/pivot.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/init/pivot.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/boxPlotStyle.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/boxPlotStyle.js +52 -0
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/boxPlotStyle.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/index.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/index.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/outlierStyle.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/outlierStyle.js +67 -0
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/outlierStyle.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/areaStyleFilter.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/areaStyleFilter.js +7 -0
- package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/areaStyleFilter.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/barStyleFilter.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/barStyleFilter.js +7 -0
- package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/barStyleFilter.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/index.d.ts +4 -0
- package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/index.js +4 -0
- package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/lineStyleFilter.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/lineStyleFilter.js +7 -0
- package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/lineStyleFilter.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/pointStyleFilter.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/pointStyleFilter.js +7 -0
- package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/pointStyleFilter.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/dimensionLinkage.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/dimensionLinkage.js +47 -0
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/dimensionLinkage.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/index.d.ts +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/index.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotAxisStyle.js +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotAxisStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js +16 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotIndicators.js +3 -2
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotIndicators.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/columnRegressionLine.js +18 -12
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/columnRegressionLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/common.d.ts +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/common.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/common.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/ecdfRegressionLine.js +9 -5
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/ecdfRegressionLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/kdeRegressionLine.js +14 -6
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/kdeRegressionLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/linearRegressionLine.js +69 -32
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/linearRegressionLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/stack/stackCornerRadius.js +2 -3
- package/dist/esm/pipeline/spec/chart/pipes/stack/stackCornerRadius.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/index.d.ts +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/index.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.js +8 -8
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.d.ts +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.js +16 -2
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.js.map +1 -1
- package/dist/esm/pipeline/utils/measures/find.d.ts +1 -0
- package/dist/esm/pipeline/utils/measures/find.js +13 -1
- package/dist/esm/pipeline/utils/measures/find.js.map +1 -1
- package/dist/esm/theme/common/axes.js +4 -4
- package/dist/esm/theme/common/axes.js.map +1 -1
- package/dist/esm/theme/common/boxPlot.d.ts +5 -0
- package/dist/esm/theme/common/boxPlot.js +15 -0
- package/dist/esm/theme/common/boxPlot.js.map +1 -0
- package/dist/esm/theme/common/crosshair.js +4 -4
- package/dist/esm/theme/common/crosshair.js.map +1 -1
- package/dist/esm/theme/common/table.js +2 -0
- package/dist/esm/theme/common/table.js.map +1 -1
- package/dist/esm/theme/dark/dark.js +4 -1
- package/dist/esm/theme/dark/dark.js.map +1 -1
- package/dist/esm/theme/light/light.js +4 -1
- package/dist/esm/theme/light/light.js.map +1 -1
- package/dist/esm/types/advancedVSeed.d.ts +533 -0
- package/dist/esm/types/advancedVSeed.js +1 -0
- package/dist/esm/types/advancedVSeed.js.map +1 -1
- package/dist/esm/types/chartType/area/area.d.ts +6 -1
- package/dist/esm/types/chartType/area/zArea.d.ts +5 -0
- package/dist/esm/types/chartType/area/zArea.js +2 -1
- package/dist/esm/types/chartType/area/zArea.js.map +1 -1
- package/dist/esm/types/chartType/areaPercent/areaPercent.d.ts +6 -1
- package/dist/esm/types/chartType/areaPercent/zAreaPercent.d.ts +5 -0
- package/dist/esm/types/chartType/areaPercent/zAreaPercent.js +2 -1
- package/dist/esm/types/chartType/areaPercent/zAreaPercent.js.map +1 -1
- package/dist/esm/types/chartType/bar/bar.d.ts +6 -1
- package/dist/esm/types/chartType/bar/zBar.d.ts +5 -0
- package/dist/esm/types/chartType/bar/zBar.js +2 -1
- package/dist/esm/types/chartType/bar/zBar.js.map +1 -1
- package/dist/esm/types/chartType/barParallel/barParallel.d.ts +6 -1
- package/dist/esm/types/chartType/barParallel/zBarParallel.d.ts +5 -0
- package/dist/esm/types/chartType/barParallel/zBarParallel.js +2 -1
- package/dist/esm/types/chartType/barParallel/zBarParallel.js.map +1 -1
- package/dist/esm/types/chartType/barPercent/barPercent.d.ts +6 -1
- package/dist/esm/types/chartType/barPercent/zBarPercent.d.ts +5 -0
- package/dist/esm/types/chartType/barPercent/zBarPercent.js +2 -1
- package/dist/esm/types/chartType/barPercent/zBarPercent.js.map +1 -1
- package/dist/esm/types/chartType/boxplot/boxplot.d.ts +14 -1
- package/dist/esm/types/chartType/boxplot/zBoxplot.d.ts +321 -0
- package/dist/esm/types/chartType/boxplot/zBoxplot.js +4 -1
- package/dist/esm/types/chartType/boxplot/zBoxplot.js.map +1 -1
- package/dist/esm/types/chartType/column/column.d.ts +6 -1
- package/dist/esm/types/chartType/column/zColumn.d.ts +5 -0
- package/dist/esm/types/chartType/column/zColumn.js +2 -1
- package/dist/esm/types/chartType/column/zColumn.js.map +1 -1
- package/dist/esm/types/chartType/columnParallel/columnParallel.d.ts +6 -1
- package/dist/esm/types/chartType/columnParallel/zColumnParallel.d.ts +5 -0
- package/dist/esm/types/chartType/columnParallel/zColumnParallel.js +2 -1
- package/dist/esm/types/chartType/columnParallel/zColumnParallel.js.map +1 -1
- package/dist/esm/types/chartType/columnPercent/columnPercent.d.ts +6 -1
- package/dist/esm/types/chartType/columnPercent/zColumnPercent.d.ts +5 -0
- package/dist/esm/types/chartType/columnPercent/zColumnPercent.js +2 -1
- package/dist/esm/types/chartType/columnPercent/zColumnPercent.js.map +1 -1
- package/dist/esm/types/chartType/dualAxis/dualAxis.d.ts +6 -1
- package/dist/esm/types/chartType/dualAxis/zDualAxis.d.ts +5 -0
- package/dist/esm/types/chartType/dualAxis/zDualAxis.js +2 -1
- package/dist/esm/types/chartType/dualAxis/zDualAxis.js.map +1 -1
- package/dist/esm/types/chartType/histogram/histogram.d.ts +6 -1
- package/dist/esm/types/chartType/histogram/zHistogram.d.ts +5 -0
- package/dist/esm/types/chartType/histogram/zHistogram.js +2 -1
- package/dist/esm/types/chartType/histogram/zHistogram.js.map +1 -1
- package/dist/esm/types/chartType/line/line.d.ts +6 -1
- package/dist/esm/types/chartType/line/zLine.d.ts +5 -0
- package/dist/esm/types/chartType/line/zLine.js +2 -1
- package/dist/esm/types/chartType/line/zLine.js.map +1 -1
- package/dist/esm/types/chartType/scatter/scatter.d.ts +6 -1
- package/dist/esm/types/chartType/scatter/zScatter.d.ts +5 -0
- package/dist/esm/types/chartType/scatter/zScatter.js +2 -1
- package/dist/esm/types/chartType/scatter/zScatter.js.map +1 -1
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/esm/types/index.js +1 -0
- package/dist/esm/types/properties/config/area.d.ts +10 -0
- package/dist/esm/types/properties/config/area.js +3 -1
- package/dist/esm/types/properties/config/area.js.map +1 -1
- package/dist/esm/types/properties/config/bar.d.ts +15 -0
- package/dist/esm/types/properties/config/bar.js +3 -1
- package/dist/esm/types/properties/config/bar.js.map +1 -1
- package/dist/esm/types/properties/config/boxplot.d.ts +26 -0
- package/dist/esm/types/properties/config/boxplot.js +10 -1
- package/dist/esm/types/properties/config/boxplot.js.map +1 -1
- package/dist/esm/types/properties/config/column.d.ts +15 -0
- package/dist/esm/types/properties/config/column.js +3 -1
- package/dist/esm/types/properties/config/column.js.map +1 -1
- package/dist/esm/types/properties/config/config.d.ts +86 -0
- package/dist/esm/types/properties/config/dimensionLinkage/dimensionLinkage.d.ts +23 -0
- package/dist/esm/types/properties/config/dimensionLinkage/dimensionLinkage.js +9 -0
- package/dist/esm/types/properties/config/dimensionLinkage/dimensionLinkage.js.map +1 -0
- package/dist/esm/types/properties/config/dimensionLinkage/index.d.ts +1 -0
- package/dist/esm/types/properties/config/dimensionLinkage/index.js +1 -0
- package/dist/esm/types/properties/config/dualAxis.d.ts +5 -0
- package/dist/esm/types/properties/config/dualAxis.js +3 -1
- package/dist/esm/types/properties/config/dualAxis.js.map +1 -1
- package/dist/esm/types/properties/config/histogram.d.ts +5 -0
- package/dist/esm/types/properties/config/histogram.js +3 -1
- package/dist/esm/types/properties/config/histogram.js.map +1 -1
- package/dist/esm/types/properties/config/index.d.ts +1 -0
- package/dist/esm/types/properties/config/index.js +1 -0
- package/dist/esm/types/properties/config/label/pieLabel.d.ts +2 -2
- package/dist/esm/types/properties/config/line.d.ts +5 -0
- package/dist/esm/types/properties/config/line.js +3 -1
- package/dist/esm/types/properties/config/line.js.map +1 -1
- package/dist/esm/types/properties/config/scatter.d.ts +5 -0
- package/dist/esm/types/properties/config/scatter.js +3 -1
- package/dist/esm/types/properties/config/scatter.js.map +1 -1
- package/dist/esm/types/properties/markStyle/boxPlotStyle.d.ts +148 -0
- package/dist/esm/types/properties/markStyle/boxPlotStyle.js +14 -0
- package/dist/esm/types/properties/markStyle/boxPlotStyle.js.map +1 -0
- package/dist/esm/types/properties/markStyle/index.d.ts +2 -0
- package/dist/esm/types/properties/markStyle/index.js +2 -0
- package/dist/esm/types/properties/markStyle/markStyle.d.ts +316 -0
- package/dist/esm/types/properties/markStyle/markStyle.js +5 -1
- package/dist/esm/types/properties/markStyle/markStyle.js.map +1 -1
- package/dist/esm/types/properties/markStyle/outlierStyle.d.ts +161 -0
- package/dist/esm/types/properties/markStyle/outlierStyle.js +22 -0
- package/dist/esm/types/properties/markStyle/outlierStyle.js.map +1 -0
- package/dist/esm/types/properties/regressionLine/ecdfRegressionLine.d.ts +2 -2
- package/dist/esm/types/properties/regressionLine/kdeRegressionLine.d.ts +2 -2
- package/dist/esm/types/properties/regressionLine/linearRegressionLine.d.ts +2 -2
- package/dist/esm/types/properties/regressionLine/logisticRegressionLine.d.ts +2 -2
- package/dist/esm/types/properties/regressionLine/lowessRegressionLine.d.ts +2 -2
- package/dist/esm/types/properties/regressionLine/polynomialRegressionLine.d.ts +2 -2
- package/dist/esm/types/properties/theme/customTheme.d.ts +172 -0
- package/dist/esm/types/zVseed.d.ts +381 -0
- package/dist/umd/index.js +845 -279
- package/dist/umd/index.js.map +1 -1
- package/package.json +5 -5
package/dist/umd/index.js
CHANGED
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
zCrosshairRect: ()=>zCrosshairRect,
|
|
41
41
|
scatterSpecPipeline: ()=>scatterSpecPipeline,
|
|
42
42
|
intl: ()=>intl,
|
|
43
|
+
selectByValue: ()=>selectByValue,
|
|
43
44
|
zAnnotationPointConfig: ()=>zAnnotationPointConfig,
|
|
44
45
|
columnPercentAdvancedPipeline: ()=>columnPercentAdvancedPipeline,
|
|
45
46
|
zColumnConfig: ()=>zColumnConfig,
|
|
@@ -50,9 +51,10 @@
|
|
|
50
51
|
pivotTableAdvancedPipeline: ()=>pivotTableAdvancedPipeline,
|
|
51
52
|
zLogisticRegressionLine: ()=>zLogisticRegressionLine,
|
|
52
53
|
zAnnotationHorizontalLine: ()=>zAnnotationHorizontalLine,
|
|
53
|
-
|
|
54
|
+
zOutlierStyle: ()=>zOutlierStyle,
|
|
54
55
|
zMarkStyle: ()=>zMarkStyle,
|
|
55
56
|
registerFunnel: ()=>registerFunnel,
|
|
57
|
+
zYLinearAxis: ()=>zYLinearAxis,
|
|
56
58
|
columnAdvancedPipeline: ()=>columnAdvancedPipeline,
|
|
57
59
|
zLabel: ()=>zLabel,
|
|
58
60
|
registerColumn: ()=>registerColumn,
|
|
@@ -70,12 +72,14 @@
|
|
|
70
72
|
zColumnParallel: ()=>zColumnParallel,
|
|
71
73
|
zDimensions: ()=>zDimensions,
|
|
72
74
|
zLegend: ()=>zLegend,
|
|
75
|
+
zSelector: ()=>zSelector,
|
|
73
76
|
LINEAR_AXIS_INNER_OFFSET_TOP: ()=>12,
|
|
74
77
|
replaceNullToUndefined: ()=>replaceNullToUndefined,
|
|
75
78
|
zHeatmap: ()=>zHeatmap,
|
|
76
79
|
FoldXMeasureId: ()=>FoldXMeasureId,
|
|
77
80
|
zAnnotationAreaConfig: ()=>zAnnotationAreaConfig,
|
|
78
81
|
zAnnotationVerticalLineConfig: ()=>zAnnotationVerticalLineConfig,
|
|
82
|
+
zBoxPlotStyle: ()=>zBoxPlotStyle,
|
|
79
83
|
zHistogram: ()=>zHistogram,
|
|
80
84
|
zAnnotationConfig: ()=>zAnnotationConfig,
|
|
81
85
|
registerBarPercent: ()=>registerBarPercent,
|
|
@@ -123,11 +127,13 @@
|
|
|
123
127
|
FoldSecondaryMeasureValue: ()=>FoldSecondaryMeasureValue,
|
|
124
128
|
zSort: ()=>zSort,
|
|
125
129
|
isPivotChart: ()=>isPivotChart,
|
|
126
|
-
|
|
130
|
+
selectByMeasure: ()=>selectByMeasure,
|
|
127
131
|
Q1MeasureValue: ()=>"__Q1__",
|
|
132
|
+
zDualAxisConfig: ()=>zDualAxisConfig,
|
|
128
133
|
zLineConfig: ()=>zLineConfig,
|
|
129
134
|
FoldPrimaryMeasureValue: ()=>FoldPrimaryMeasureValue,
|
|
130
135
|
zXBandAxis: ()=>zXBandAxis,
|
|
136
|
+
zSelectors: ()=>zSelectors,
|
|
131
137
|
FoldYMeasureId: ()=>FoldYMeasureId,
|
|
132
138
|
findMeasureById: ()=>findMeasureById,
|
|
133
139
|
AngleEncoding: ()=>AngleEncoding,
|
|
@@ -154,26 +160,27 @@
|
|
|
154
160
|
columnParallelAdvancedPipeline: ()=>columnParallelAdvancedPipeline,
|
|
155
161
|
zColumnPercent: ()=>zColumnPercent,
|
|
156
162
|
foldMeasures: ()=>foldMeasures,
|
|
157
|
-
zFunnel: ()=>zFunnel,
|
|
158
|
-
zDimensionEncoding: ()=>zDimensionEncoding,
|
|
159
163
|
isPivotTable: ()=>isPivotTable,
|
|
164
|
+
zDimensionEncoding: ()=>zDimensionEncoding,
|
|
160
165
|
registerPie: ()=>registerPie,
|
|
166
|
+
LowerWhisker: ()=>LowerWhisker,
|
|
161
167
|
zEcdfRegressionLine: ()=>zEcdfRegressionLine,
|
|
162
168
|
zBarParallelConfig: ()=>zBarParallelConfig,
|
|
163
|
-
LowerWhisker: ()=>LowerWhisker,
|
|
164
169
|
lineAdvancedPipeline: ()=>lineAdvancedPipeline,
|
|
165
170
|
AXIS_LABEL_SPACE: ()=>8,
|
|
166
171
|
FoldMeasureValue: ()=>FoldMeasureValue,
|
|
172
|
+
zFunnel: ()=>zFunnel,
|
|
167
173
|
ANNOTATION_Z_INDEX: ()=>1000,
|
|
168
174
|
Q3MeasureValue: ()=>"__Q3__",
|
|
169
175
|
createFormatter: ()=>createFormatter,
|
|
170
176
|
columnPercentSpecPipeline: ()=>columnPercentSpecPipeline,
|
|
171
|
-
|
|
177
|
+
selectByPartial: ()=>selectByPartial,
|
|
172
178
|
isMeasureSelector: ()=>isMeasureSelector,
|
|
173
179
|
areaAdvancedPipeline: ()=>areaAdvancedPipeline,
|
|
174
180
|
zBarConfig: ()=>zBarConfig,
|
|
175
181
|
areaPercentSpecPipeline: ()=>areaPercentSpecPipeline,
|
|
176
182
|
barParallelSpecPipeline: ()=>barParallelSpecPipeline,
|
|
183
|
+
BAND_AXIS_INNER_OFFSET_IN_PIVOT: ()=>2,
|
|
177
184
|
zPie: ()=>zPie,
|
|
178
185
|
zBar: ()=>zBar,
|
|
179
186
|
pieAdvancedPipeline: ()=>pieAdvancedPipeline,
|
|
@@ -196,6 +203,7 @@
|
|
|
196
203
|
zYBandAxis: ()=>zYBandAxis,
|
|
197
204
|
BinPercentageMeasureId: ()=>BinPercentageMeasureId,
|
|
198
205
|
Separator: ()=>"-",
|
|
206
|
+
zDimensionLinkage: ()=>zDimensionLinkage,
|
|
199
207
|
findAllMeasures: ()=>findAllMeasures,
|
|
200
208
|
zColorLegend: ()=>zColorLegend,
|
|
201
209
|
UpperWhisker: ()=>UpperWhisker,
|
|
@@ -205,6 +213,8 @@
|
|
|
205
213
|
registerHistogram: ()=>registerHistogram,
|
|
206
214
|
zRoseParallel: ()=>zRoseParallel,
|
|
207
215
|
MeasureName: ()=>MeasureName,
|
|
216
|
+
hasMultipleMeasureInSingleView: ()=>hasMultipleMeasureInSingleView,
|
|
217
|
+
selectorDatum: ()=>selectorDatum,
|
|
208
218
|
zRegressionLine: ()=>zRegressionLine,
|
|
209
219
|
zNumFormat: ()=>zNumFormat,
|
|
210
220
|
FoldYMeasureValue: ()=>FoldYMeasureValue,
|
|
@@ -227,6 +237,7 @@
|
|
|
227
237
|
checkVSeed: ()=>checkVSeed,
|
|
228
238
|
zPivotTable: ()=>zPivotTable,
|
|
229
239
|
registerLightTheme: ()=>registerLightTheme,
|
|
240
|
+
selectByDmension: ()=>selectByDmension,
|
|
230
241
|
isPartialDatumSelector: ()=>isPartialDatumSelector,
|
|
231
242
|
isDimensionGroup: ()=>isDimensionGroup,
|
|
232
243
|
registerPivotTable: ()=>registerPivotTable,
|
|
@@ -287,8 +298,8 @@
|
|
|
287
298
|
MeasureEncodingEnum: ()=>MeasureEncodingEnum,
|
|
288
299
|
FoldXMeasureValue: ()=>FoldXMeasureValue,
|
|
289
300
|
boxplotAdvancedPipeline: ()=>boxplotAdvancedPipeline,
|
|
290
|
-
zEncoding: ()=>zEncoding,
|
|
291
301
|
dualAxisAdvancedPipeline: ()=>dualAxisAdvancedPipeline,
|
|
302
|
+
zEncoding: ()=>zEncoding,
|
|
292
303
|
ColorEncoding: ()=>ColorEncoding,
|
|
293
304
|
measureDepth: ()=>measureDepth,
|
|
294
305
|
BinCountMeasureId: ()=>BinCountMeasureId,
|
|
@@ -387,7 +398,7 @@
|
|
|
387
398
|
vseed: builder.vseed,
|
|
388
399
|
customTheme: Builder.getThemeMap()
|
|
389
400
|
};
|
|
390
|
-
if (builder.
|
|
401
|
+
if (builder.locale) intl.setLocale(builder.locale);
|
|
391
402
|
try {
|
|
392
403
|
const advancedVSeed = execPipeline(pipeline, context);
|
|
393
404
|
builder.advancedVSeed = advancedVSeed;
|
|
@@ -409,7 +420,7 @@
|
|
|
409
420
|
vseed: builder.vseed,
|
|
410
421
|
advancedVSeed
|
|
411
422
|
};
|
|
412
|
-
if (builder.
|
|
423
|
+
if (builder.locale) intl.setLocale(builder.locale);
|
|
413
424
|
try {
|
|
414
425
|
const spec = execPipeline(pipeline, context);
|
|
415
426
|
builder.spec = spec;
|
|
@@ -687,9 +698,13 @@
|
|
|
687
698
|
_advancedVSeed = null;
|
|
688
699
|
_spec = null;
|
|
689
700
|
_performance = {};
|
|
701
|
+
_locale;
|
|
690
702
|
constructor(vseed){
|
|
691
703
|
this._vseed = vseed;
|
|
692
|
-
this.
|
|
704
|
+
this._locale = vseed.locale || intl.getLocale();
|
|
705
|
+
}
|
|
706
|
+
get locale() {
|
|
707
|
+
return this._locale;
|
|
693
708
|
}
|
|
694
709
|
build = ()=>build(this);
|
|
695
710
|
buildSpec = (advanced)=>buildSpec(this, advanced);
|
|
@@ -869,6 +884,18 @@
|
|
|
869
884
|
});
|
|
870
885
|
return result;
|
|
871
886
|
};
|
|
887
|
+
const hasMultipleMeasureInSingleView = (measures = [])=>{
|
|
888
|
+
if (measures.every((m)=>!('children' in m))) return measures.length > 1;
|
|
889
|
+
let found = false;
|
|
890
|
+
preorderTraverse(measures, (node)=>{
|
|
891
|
+
if (node.children && node.children.length > 1) {
|
|
892
|
+
found = true;
|
|
893
|
+
return true;
|
|
894
|
+
}
|
|
895
|
+
return false;
|
|
896
|
+
});
|
|
897
|
+
return found;
|
|
898
|
+
};
|
|
872
899
|
const defaultDimensions = (advancedVSeed, context)=>{
|
|
873
900
|
const result = {
|
|
874
901
|
...advancedVSeed
|
|
@@ -1418,6 +1445,12 @@
|
|
|
1418
1445
|
for (let r of e)delete o[r];
|
|
1419
1446
|
return o;
|
|
1420
1447
|
}
|
|
1448
|
+
function nearlyEqual(a, b, epsilon = 1e-8) {
|
|
1449
|
+
if (Number.isNaN(a) || Number.isNaN(b)) return false;
|
|
1450
|
+
if (a === b) return true;
|
|
1451
|
+
const diff = Math.abs(a - b);
|
|
1452
|
+
return diff <= epsilon;
|
|
1453
|
+
}
|
|
1421
1454
|
const selector_selector = (vchartDatum, selector, selectorMode = 'And')=>{
|
|
1422
1455
|
if (!selector) return true;
|
|
1423
1456
|
const vchartKeys = Object.keys(vchartDatum).filter((k)=>k.toLocaleLowerCase().startsWith('__vchart'));
|
|
@@ -1426,58 +1459,44 @@
|
|
|
1426
1459
|
selector
|
|
1427
1460
|
];
|
|
1428
1461
|
return selectors['And' === selectorMode ? 'every' : 'some']((selector)=>{
|
|
1429
|
-
if (isValueSelector(selector))
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
const selectorValueArr = Array.isArray(selector.value) ? selector.value : [
|
|
1434
|
-
selector.value
|
|
1435
|
-
];
|
|
1436
|
-
switch(op){
|
|
1437
|
-
case '=':
|
|
1438
|
-
if (String(datum[selector.field]) === String(selectorValueArr[0])) return true;
|
|
1439
|
-
break;
|
|
1440
|
-
case '==':
|
|
1441
|
-
if (datum[selector.field] === selectorValueArr[0]) return true;
|
|
1442
|
-
break;
|
|
1443
|
-
case '!=':
|
|
1444
|
-
if (datum[selector.field] !== selectorValueArr[0]) return true;
|
|
1445
|
-
break;
|
|
1446
|
-
case '>':
|
|
1447
|
-
if (datum[selector.field] > selectorValueArr[0]) return true;
|
|
1448
|
-
break;
|
|
1449
|
-
case '<':
|
|
1450
|
-
if (datum[selector.field] < selectorValueArr[0]) return true;
|
|
1451
|
-
break;
|
|
1452
|
-
case '>=':
|
|
1453
|
-
if (datum[selector.field] >= selectorValueArr[0]) return true;
|
|
1454
|
-
break;
|
|
1455
|
-
case '<=':
|
|
1456
|
-
if (datum[selector.field] <= selectorValueArr[0]) return true;
|
|
1457
|
-
break;
|
|
1458
|
-
case 'between':
|
|
1459
|
-
if (Array.isArray(selector.value) && datum[selector.field] >= selectorValueArr[0] && datum[selector.field] <= selectorValueArr[1]) return true;
|
|
1460
|
-
break;
|
|
1461
|
-
}
|
|
1462
|
-
} else if (isDimensionSelector(selector)) {
|
|
1463
|
-
const op = selector.operator || selector.op;
|
|
1464
|
-
const selectorValueArr = Array.isArray(selector.value) ? selector.value : [
|
|
1465
|
-
selector.value
|
|
1466
|
-
];
|
|
1467
|
-
switch(op){
|
|
1468
|
-
case 'in':
|
|
1469
|
-
if (selectorValueArr.includes(datum[selector.field])) return true;
|
|
1470
|
-
break;
|
|
1471
|
-
case 'not in':
|
|
1472
|
-
if (!selectorValueArr.includes(datum[selector.field])) return true;
|
|
1473
|
-
break;
|
|
1474
|
-
}
|
|
1475
|
-
} else if (isPartialDatumSelector(selector)) {
|
|
1476
|
-
if (Object.keys(selector).every((key)=>datum[key] === selector[key])) return true;
|
|
1477
|
-
}
|
|
1462
|
+
if (isValueSelector(selector)) return selectByValue(selector, datum);
|
|
1463
|
+
if (isMeasureSelector(selector)) return selectByMeasure(selector, datum);
|
|
1464
|
+
if (isDimensionSelector(selector)) return selectByDmension(selector, datum);
|
|
1465
|
+
if (isPartialDatumSelector(selector)) return selectByPartial(selector, datum);
|
|
1478
1466
|
return false;
|
|
1479
1467
|
});
|
|
1480
1468
|
};
|
|
1469
|
+
const selectorDatum = (datum, selector)=>{
|
|
1470
|
+
if (!selector) return [];
|
|
1471
|
+
const selectors = Array.isArray(selector) ? selector : [
|
|
1472
|
+
selector
|
|
1473
|
+
];
|
|
1474
|
+
let finalResult = [];
|
|
1475
|
+
for (const selector of selectors){
|
|
1476
|
+
const results = [];
|
|
1477
|
+
if (isValueSelector(selector)) Object.entries(datum).forEach(([key, value])=>{
|
|
1478
|
+
if (value === selector) results.push({
|
|
1479
|
+
[key]: value
|
|
1480
|
+
});
|
|
1481
|
+
});
|
|
1482
|
+
else if (isMeasureSelector(selector) && selectByMeasure(selector, datum)) results.push({
|
|
1483
|
+
[selector.field]: datum[selector.field]
|
|
1484
|
+
});
|
|
1485
|
+
else if (isDimensionSelector(selector) && selectByDmension(selector, datum)) results.push({
|
|
1486
|
+
[selector.field]: datum[selector.field]
|
|
1487
|
+
});
|
|
1488
|
+
else if (isPartialDatumSelector(selector) && selectByPartial(selector, datum)) results.push(selector);
|
|
1489
|
+
if (results.length) finalResult = finalResult.length ? finalResult.flatMap((prev)=>results.map((r)=>({
|
|
1490
|
+
...prev,
|
|
1491
|
+
...r
|
|
1492
|
+
}))) : results;
|
|
1493
|
+
else {
|
|
1494
|
+
finalResult = [];
|
|
1495
|
+
break;
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
return finalResult;
|
|
1499
|
+
};
|
|
1481
1500
|
const isValueSelector = (selector)=>'string' == typeof selector || 'number' == typeof selector;
|
|
1482
1501
|
const isPartialDatumSelector = (selector)=>'object' == typeof selector && null !== selector;
|
|
1483
1502
|
const isMeasureSelector = (selector)=>'object' == typeof selector && null !== selector && 'field' in selector && ('operator' in selector || 'op' in selector) && 'value' in selector && ([
|
|
@@ -1506,6 +1525,56 @@
|
|
|
1506
1525
|
'in',
|
|
1507
1526
|
'not in'
|
|
1508
1527
|
].includes(selector.op));
|
|
1528
|
+
const selectByMeasure = (selector, datum)=>{
|
|
1529
|
+
const op = selector.operator || selector.op;
|
|
1530
|
+
const selectorValueArr = Array.isArray(selector.value) ? selector.value : [
|
|
1531
|
+
selector.value
|
|
1532
|
+
];
|
|
1533
|
+
switch(op){
|
|
1534
|
+
case '=':
|
|
1535
|
+
if (String(datum[selector.field]) === String(selectorValueArr[0]) || nearlyEqual(Number(datum[selector.field]), Number(selectorValueArr[0]))) return true;
|
|
1536
|
+
break;
|
|
1537
|
+
case '==':
|
|
1538
|
+
if (datum[selector.field] === selectorValueArr[0]) return true;
|
|
1539
|
+
break;
|
|
1540
|
+
case '!=':
|
|
1541
|
+
if (datum[selector.field] !== selectorValueArr[0]) return true;
|
|
1542
|
+
break;
|
|
1543
|
+
case '>':
|
|
1544
|
+
if (datum[selector.field] > selectorValueArr[0] && !nearlyEqual(Number(datum[selector.field]), Number(selectorValueArr[0]))) return true;
|
|
1545
|
+
break;
|
|
1546
|
+
case '<':
|
|
1547
|
+
if (datum[selector.field] < selectorValueArr[0] && !nearlyEqual(Number(datum[selector.field]), Number(selectorValueArr[0]))) return true;
|
|
1548
|
+
break;
|
|
1549
|
+
case '>=':
|
|
1550
|
+
if (datum[selector.field] >= selectorValueArr[0] || nearlyEqual(Number(datum[selector.field]), Number(selectorValueArr[0]))) return true;
|
|
1551
|
+
break;
|
|
1552
|
+
case '<=':
|
|
1553
|
+
if (datum[selector.field] <= selectorValueArr[0] || nearlyEqual(Number(datum[selector.field]), Number(selectorValueArr[0]))) return true;
|
|
1554
|
+
break;
|
|
1555
|
+
case 'between':
|
|
1556
|
+
if (Array.isArray(selector.value) && (datum[selector.field] >= selectorValueArr[0] || nearlyEqual(Number(datum[selector.field]), Number(selectorValueArr[0]))) && (datum[selector.field] <= selectorValueArr[1] || nearlyEqual(Number(datum[selector.field]), Number(selectorValueArr[1])))) return true;
|
|
1557
|
+
break;
|
|
1558
|
+
}
|
|
1559
|
+
return false;
|
|
1560
|
+
};
|
|
1561
|
+
const selectByDmension = (selector, datum)=>{
|
|
1562
|
+
const op = selector.operator || selector.op;
|
|
1563
|
+
const selectorValueArr = Array.isArray(selector.value) ? selector.value : [
|
|
1564
|
+
selector.value
|
|
1565
|
+
];
|
|
1566
|
+
switch(op){
|
|
1567
|
+
case 'in':
|
|
1568
|
+
if (selectorValueArr.includes(datum[selector.field])) return true;
|
|
1569
|
+
break;
|
|
1570
|
+
case 'not in':
|
|
1571
|
+
if (!selectorValueArr.includes(datum[selector.field])) return true;
|
|
1572
|
+
break;
|
|
1573
|
+
}
|
|
1574
|
+
return false;
|
|
1575
|
+
};
|
|
1576
|
+
const selectByPartial = (selector, datum)=>Object.keys(selector).every((key)=>datum[key] === selector[key]);
|
|
1577
|
+
const selectByValue = (selector, datum)=>Object.values(datum).some((v)=>v === selector);
|
|
1509
1578
|
const tableStyleMap = {
|
|
1510
1579
|
backgroundColor: 'bgColor',
|
|
1511
1580
|
textColor: 'color',
|
|
@@ -2255,7 +2324,7 @@
|
|
|
2255
2324
|
if (parent && 'children' in parent) {
|
|
2256
2325
|
parent.children = parent.children || [];
|
|
2257
2326
|
parent.children.push(measure);
|
|
2258
|
-
} else if (measure.parentId) measureTree.push({
|
|
2327
|
+
} else if (common_isValid(measure.parentId)) measureTree.push({
|
|
2259
2328
|
id: measure.parentId,
|
|
2260
2329
|
children: [
|
|
2261
2330
|
measure
|
|
@@ -2497,7 +2566,7 @@
|
|
|
2497
2566
|
const { dataset, chartType } = vseed;
|
|
2498
2567
|
const { encoding } = advancedVSeed;
|
|
2499
2568
|
const colorMeasureId = getColorMeasureId(advancedVSeed, vseed);
|
|
2500
|
-
const { dataset: newDatasets, foldInfo, unfoldInfo } = dataReshapeByEncoding(dataset, T(advancedVSeed.reshapeDimensions ?? advancedVSeed.dimensions ?? [], (item)=>item.id), T(advancedVSeed.reshapeMeasures ??
|
|
2569
|
+
const { dataset: newDatasets, foldInfo, unfoldInfo } = dataReshapeByEncoding(dataset, T(advancedVSeed.reshapeDimensions ?? advancedVSeed.dimensions ?? [], (item)=>item.id), T(findAllMeasures(advancedVSeed.reshapeMeasures ?? advancedVSeed.measures), (item)=>item.id), encoding, {
|
|
2501
2570
|
colorItemAsId: false,
|
|
2502
2571
|
colorMeasureId
|
|
2503
2572
|
});
|
|
@@ -2541,7 +2610,7 @@
|
|
|
2541
2610
|
omitIds: allMeasures.map((item)=>item.id)
|
|
2542
2611
|
});
|
|
2543
2612
|
const reshapeInfo = {
|
|
2544
|
-
id: groupId
|
|
2613
|
+
id: `${groupId}`,
|
|
2545
2614
|
index,
|
|
2546
2615
|
foldInfo,
|
|
2547
2616
|
unfoldInfo
|
|
@@ -2635,7 +2704,8 @@
|
|
|
2635
2704
|
'tooltip',
|
|
2636
2705
|
'xAxis',
|
|
2637
2706
|
'yAxis',
|
|
2638
|
-
'crosshairLine'
|
|
2707
|
+
'crosshairLine',
|
|
2708
|
+
'dimensionLinkage'
|
|
2639
2709
|
]);
|
|
2640
2710
|
const config = replaceNullToUndefined(pickedConfig);
|
|
2641
2711
|
result.config = {
|
|
@@ -2652,7 +2722,9 @@
|
|
|
2652
2722
|
'barStyle',
|
|
2653
2723
|
'pointStyle',
|
|
2654
2724
|
'lineStyle',
|
|
2655
|
-
'areaStyle'
|
|
2725
|
+
'areaStyle',
|
|
2726
|
+
'boxPlotStyle',
|
|
2727
|
+
'outlierStyle'
|
|
2656
2728
|
]);
|
|
2657
2729
|
const markStyle = replaceNullToUndefined(pickedMarkStyle);
|
|
2658
2730
|
return {
|
|
@@ -2883,11 +2955,12 @@
|
|
|
2883
2955
|
};
|
|
2884
2956
|
const { advancedVSeed, vseed } = context;
|
|
2885
2957
|
const { chartType } = vseed;
|
|
2886
|
-
const { measures, dimensions, encoding } = advancedVSeed;
|
|
2958
|
+
const { measures, dimensions, encoding, datasetReshapeInfo, pivotAllDatasetReshapeInfo } = advancedVSeed;
|
|
2887
2959
|
const config = advancedVSeed.config?.[chartType]?.xAxis ?? {};
|
|
2888
2960
|
if (!result.axes) result.axes = [];
|
|
2889
2961
|
const { visible = true, label, tick, title, grid, line, labelAutoHide, labelAutoHideGap, labelAutoLimit, labelAutoLimitLength = 80, labelAutoRotate, labelAutoRotateAngleRange } = config;
|
|
2890
2962
|
const sampling = !(labelAutoHide || labelAutoRotate || labelAutoLimit);
|
|
2963
|
+
const onlyMeasureId = 0 === (encoding.x || []).filter((v)=>v !== MeasureId).length;
|
|
2891
2964
|
const bandAxis = {
|
|
2892
2965
|
visible,
|
|
2893
2966
|
type: 'band',
|
|
@@ -2956,6 +3029,14 @@
|
|
|
2956
3029
|
0.1
|
|
2957
3030
|
]
|
|
2958
3031
|
};
|
|
3032
|
+
if (onlyMeasureId && bandAxis.label) {
|
|
3033
|
+
const allDatasetReshapeInfo = pivotAllDatasetReshapeInfo || datasetReshapeInfo;
|
|
3034
|
+
const colorIdMap = allDatasetReshapeInfo.reduce((prev, cur)=>({
|
|
3035
|
+
...prev,
|
|
3036
|
+
...cur.unfoldInfo.colorIdMap
|
|
3037
|
+
}), {});
|
|
3038
|
+
bandAxis.label.formatMethod = (text)=>common_isArray(text) ? text : colorIdMap[String(text)]?.alias ?? text;
|
|
3039
|
+
}
|
|
2959
3040
|
result.axes = [
|
|
2960
3041
|
...result.axes,
|
|
2961
3042
|
bandAxis
|
|
@@ -3104,6 +3185,9 @@
|
|
|
3104
3185
|
}
|
|
3105
3186
|
}
|
|
3106
3187
|
};
|
|
3188
|
+
const xAxisConfig = result.axes?.find((v)=>'bottom' === v.orient);
|
|
3189
|
+
const xAxisFormatter = xAxisConfig?.label?.formatMethod;
|
|
3190
|
+
if (xAxisFormatter) crosshair.xField.label.formatMethod = (text)=>xAxisFormatter(text);
|
|
3107
3191
|
return result;
|
|
3108
3192
|
};
|
|
3109
3193
|
const discreteLegend = (spec, context)=>{
|
|
@@ -3745,7 +3829,8 @@
|
|
|
3745
3829
|
...meaContent
|
|
3746
3830
|
];
|
|
3747
3831
|
};
|
|
3748
|
-
const isSubset = (sub, obj)=>Object.entries(sub).every(([key, value])=>{
|
|
3832
|
+
const isSubset = (sub, obj, excludeMeasuresIds)=>Object.entries(sub).every(([key, value])=>{
|
|
3833
|
+
if (excludeMeasuresIds && excludeMeasuresIds.includes(key)) return false;
|
|
3749
3834
|
if ('string' == typeof value) return obj[key] === value;
|
|
3750
3835
|
if ('number' == typeof value) return obj[key] === value;
|
|
3751
3836
|
return true;
|
|
@@ -4781,10 +4866,10 @@
|
|
|
4781
4866
|
widthMode: 'standard',
|
|
4782
4867
|
autoFillWidth: true,
|
|
4783
4868
|
defaultHeaderColWidth: 'auto',
|
|
4784
|
-
defaultColWidth:
|
|
4869
|
+
defaultColWidth: 240,
|
|
4785
4870
|
heightMode: 'standard',
|
|
4786
4871
|
autoFillHeight: true,
|
|
4787
|
-
defaultRowHeight:
|
|
4872
|
+
defaultRowHeight: 180,
|
|
4788
4873
|
defaultHeaderRowHeight: 'auto',
|
|
4789
4874
|
indicatorsAsCol: false,
|
|
4790
4875
|
select: {
|
|
@@ -4839,7 +4924,7 @@
|
|
|
4839
4924
|
0 === arg.row ? outlineBorderLineWidth : 1,
|
|
4840
4925
|
outlineBorderLineWidth,
|
|
4841
4926
|
0,
|
|
4842
|
-
0 === arg.col || noYAxis && 1 === arg.col ? outlineBorderLineWidth : 1
|
|
4927
|
+
0 === arg.col || noYAxis && 1 === arg.col && arg.table.colCount <= 2 ? outlineBorderLineWidth : 1
|
|
4843
4928
|
];
|
|
4844
4929
|
},
|
|
4845
4930
|
bgColor: transparent,
|
|
@@ -5015,6 +5100,21 @@
|
|
|
5015
5100
|
borderColor,
|
|
5016
5101
|
cornerRadius: frameCornerRadius,
|
|
5017
5102
|
borderLineWidth: outlineBorderLineWidth
|
|
5103
|
+
},
|
|
5104
|
+
axisStyle: {
|
|
5105
|
+
leftAxisStyle: {
|
|
5106
|
+
cellPaddingLeft: 10
|
|
5107
|
+
},
|
|
5108
|
+
bottomAxisStyle: {
|
|
5109
|
+
cellPaddingBottom: 4
|
|
5110
|
+
},
|
|
5111
|
+
rightAxisStyle: {
|
|
5112
|
+
cellPaddingRight: 4
|
|
5113
|
+
}
|
|
5114
|
+
},
|
|
5115
|
+
scrollStyle: {
|
|
5116
|
+
visible: 'scrolling',
|
|
5117
|
+
hoverOn: false
|
|
5018
5118
|
}
|
|
5019
5119
|
}
|
|
5020
5120
|
};
|
|
@@ -5028,7 +5128,7 @@
|
|
|
5028
5128
|
const colorItems = chunk_QJLMYOTX_i(datasetReshapeInfo.flatMap((d)=>d.unfoldInfo.colorItems));
|
|
5029
5129
|
const allMeasureIds = chunk_QJLMYOTX_i(datasetReshapeInfo.flatMap((d)=>Object.keys(d.foldInfo.foldMap || {})));
|
|
5030
5130
|
const indicators = datasetReshapeInfo.map((reshapeInfo, index)=>{
|
|
5031
|
-
const measureGroup = measures?.find((d)
|
|
5131
|
+
const measureGroup = measures?.find((d)=>`${d.id}` === reshapeInfo.id);
|
|
5032
5132
|
const subMeasuresId = (measureGroup?.children || []).map((d)=>d.id);
|
|
5033
5133
|
const invalideMeasuresIds = allMeasureIds.filter((id)=>!subMeasuresId.includes(id));
|
|
5034
5134
|
const newDataset = dataset[index];
|
|
@@ -5045,6 +5145,7 @@
|
|
|
5045
5145
|
...context,
|
|
5046
5146
|
advancedVSeed: {
|
|
5047
5147
|
...advancedVSeed,
|
|
5148
|
+
pivotAllDatasetReshapeInfo: datasetReshapeInfo,
|
|
5048
5149
|
datasetReshapeInfo: newDatasetReshapeInfo,
|
|
5049
5150
|
encoding: Object.keys(encoding).reduce((res, key)=>{
|
|
5050
5151
|
res[key] = encoding[key]?.filter((e)=>!invalideMeasuresIds.includes(e));
|
|
@@ -5055,7 +5156,7 @@
|
|
|
5055
5156
|
};
|
|
5056
5157
|
const chartSpec = execPipeline(chartPipeline, newContext, {});
|
|
5057
5158
|
return {
|
|
5058
|
-
indicatorKey: reshapeInfo.id
|
|
5159
|
+
indicatorKey: `${reshapeInfo.id}`,
|
|
5059
5160
|
title: measureGroup?.alias,
|
|
5060
5161
|
cellType: 'chart',
|
|
5061
5162
|
chartModule: 'vchart',
|
|
@@ -5130,6 +5231,8 @@
|
|
|
5130
5231
|
left: 2,
|
|
5131
5232
|
right: 2
|
|
5132
5233
|
};
|
|
5234
|
+
} else if ('linear' === axis.type) {
|
|
5235
|
+
if ('top' === axis.orient || 'bottom' === axis.orient) axis.label.flush = true;
|
|
5133
5236
|
}
|
|
5134
5237
|
});
|
|
5135
5238
|
}
|
|
@@ -5389,6 +5492,50 @@
|
|
|
5389
5492
|
legends
|
|
5390
5493
|
};
|
|
5391
5494
|
};
|
|
5495
|
+
const dimensionLinkage = (spec, context)=>{
|
|
5496
|
+
const { advancedVSeed, vseed } = context;
|
|
5497
|
+
const { chartType } = vseed;
|
|
5498
|
+
const config = advancedVSeed.config?.[chartType]?.dimensionLinkage ?? {};
|
|
5499
|
+
if (false === config.enable) return spec;
|
|
5500
|
+
const indicators = spec.indicators;
|
|
5501
|
+
const labelHoverOnAxis = {};
|
|
5502
|
+
const chartSpec = indicators?.[0]?.chartSpec;
|
|
5503
|
+
const crosshair = chartSpec?.crosshair;
|
|
5504
|
+
if (crosshair?.xField) {
|
|
5505
|
+
const labelFormat = crosshair.xField.label?.formatMethod;
|
|
5506
|
+
labelHoverOnAxis.bottom = {
|
|
5507
|
+
visible: config.showLabel ?? crosshair.xField.label?.visible ?? true,
|
|
5508
|
+
background: crosshair.xField.label?.labelBackground,
|
|
5509
|
+
textStyle: crosshair.xField.label?.style,
|
|
5510
|
+
formatMethod: labelFormat ? (text)=>text || 0 === text ? labelFormat(text) : null : void 0
|
|
5511
|
+
};
|
|
5512
|
+
}
|
|
5513
|
+
if (crosshair?.yField) {
|
|
5514
|
+
const labelFormat = crosshair.yField.label?.formatMethod;
|
|
5515
|
+
labelHoverOnAxis.left = {
|
|
5516
|
+
visible: config.showLabel ?? crosshair.yField.label?.visible ?? true,
|
|
5517
|
+
background: crosshair.yField.label?.labelBackground,
|
|
5518
|
+
textStyle: crosshair.yField.label?.style,
|
|
5519
|
+
formatMethod: labelFormat ? (text)=>text || 0 === text ? labelFormat(text) : null : void 0
|
|
5520
|
+
};
|
|
5521
|
+
}
|
|
5522
|
+
if (indicators && indicators.length) indicators.forEach((ind)=>{
|
|
5523
|
+
const crosshair = ind?.chartSpec?.crosshair;
|
|
5524
|
+
if (crosshair?.xField) crosshair.xField.label = {
|
|
5525
|
+
visible: false
|
|
5526
|
+
};
|
|
5527
|
+
if (crosshair?.yField) crosshair.yField.label = {
|
|
5528
|
+
visible: false
|
|
5529
|
+
};
|
|
5530
|
+
});
|
|
5531
|
+
spec.chartDimensionLinkage = {
|
|
5532
|
+
showTooltip: config.showTooltip ?? chartSpec?.tooltip?.dimension?.visible ?? true,
|
|
5533
|
+
heightLimitToShowTooltipForLastRow: 60,
|
|
5534
|
+
widthLimitToShowTooltipForLastColumn: 90,
|
|
5535
|
+
labelHoverOnAxis
|
|
5536
|
+
};
|
|
5537
|
+
return spec;
|
|
5538
|
+
};
|
|
5392
5539
|
const pivotAdapter_pivotAdapter = (pipeline, pivotPipeline)=>{
|
|
5393
5540
|
const adapted = (spec, context)=>{
|
|
5394
5541
|
const { vseed } = context;
|
|
@@ -5447,7 +5594,8 @@
|
|
|
5447
5594
|
pivotRowDimensions,
|
|
5448
5595
|
pivotColumnDimensions,
|
|
5449
5596
|
pivotTitle,
|
|
5450
|
-
colorAdapter(pivotDiscreteLegend, pivotColorLegend)
|
|
5597
|
+
colorAdapter(pivotDiscreteLegend, pivotColorLegend),
|
|
5598
|
+
dimensionLinkage
|
|
5451
5599
|
];
|
|
5452
5600
|
const lineSpecPipeline = [
|
|
5453
5601
|
pivotAdapter_pivotAdapter(line_line, pivotLine)
|
|
@@ -5542,7 +5690,8 @@
|
|
|
5542
5690
|
'crosshairRect',
|
|
5543
5691
|
'stackCornerRadius',
|
|
5544
5692
|
'barMaxWidth',
|
|
5545
|
-
'barGapInGroup'
|
|
5693
|
+
'barGapInGroup',
|
|
5694
|
+
'dimensionLinkage'
|
|
5546
5695
|
]);
|
|
5547
5696
|
const config = replaceNullToUndefined(pickedConfig);
|
|
5548
5697
|
result.config = {
|
|
@@ -5641,13 +5790,11 @@
|
|
|
5641
5790
|
const { advancedVSeed, vseed } = context;
|
|
5642
5791
|
const { chartType } = vseed;
|
|
5643
5792
|
const stackCornerRadius = advancedVSeed.config?.[chartType]?.stackCornerRadius;
|
|
5644
|
-
const { datasetReshapeInfo } = advancedVSeed;
|
|
5645
|
-
const { foldInfo } = datasetReshapeInfo[0];
|
|
5646
5793
|
if ('dualAxis' === chartType && 'bar' !== spec.type) return spec;
|
|
5647
5794
|
return {
|
|
5648
5795
|
...spec,
|
|
5649
5796
|
stackCornerRadius: (_, datum)=>{
|
|
5650
|
-
if (datum[
|
|
5797
|
+
if (datum && datum[datum[FoldMeasureId]] > 0) return stackCornerRadius;
|
|
5651
5798
|
return 0;
|
|
5652
5799
|
}
|
|
5653
5800
|
};
|
|
@@ -5690,7 +5837,7 @@
|
|
|
5690
5837
|
type: 'rect',
|
|
5691
5838
|
style: {
|
|
5692
5839
|
lineWidth: 0,
|
|
5693
|
-
opacity: 0.
|
|
5840
|
+
opacity: 0.26,
|
|
5694
5841
|
fill: rectColor
|
|
5695
5842
|
}
|
|
5696
5843
|
},
|
|
@@ -5707,6 +5854,9 @@
|
|
|
5707
5854
|
}
|
|
5708
5855
|
}
|
|
5709
5856
|
};
|
|
5857
|
+
const xAxisConfig = result.axes?.find((v)=>'bottom' === v.orient);
|
|
5858
|
+
const xAxisFormatter = xAxisConfig?.label?.formatMethod;
|
|
5859
|
+
if (xAxisFormatter) crosshair.xField.label.formatMethod = (text)=>xAxisFormatter(text);
|
|
5710
5860
|
return result;
|
|
5711
5861
|
};
|
|
5712
5862
|
const colorBarStyleFill = (stylePipe)=>(spec, context)=>{
|
|
@@ -6012,7 +6162,9 @@
|
|
|
6012
6162
|
}
|
|
6013
6163
|
return 0 === sst ? 0 : 1 - ssr / sst;
|
|
6014
6164
|
}
|
|
6015
|
-
function regressionLinear(data, x = (d)=>d.x, y = (d)=>d.y) {
|
|
6165
|
+
function regressionLinear(data, x = (d)=>d.x, y = (d)=>d.y, options) {
|
|
6166
|
+
var _a;
|
|
6167
|
+
const alpha = null != (_a = null == options ? void 0 : options.alpha) ? _a : .05;
|
|
6016
6168
|
let n = 0, meanX = 0, meanY = 0, meanXY = 0, meanX2 = 0;
|
|
6017
6169
|
visitPoints(data, x, y, (xi, yi)=>{
|
|
6018
6170
|
n++, meanX += (xi - meanX) / n, meanY += (yi - meanY) / n, meanXY += (xi * yi - meanXY) / n, meanX2 += (xi * xi - meanX2) / n;
|
|
@@ -6045,7 +6197,7 @@
|
|
|
6045
6197
|
}
|
|
6046
6198
|
return out;
|
|
6047
6199
|
},
|
|
6048
|
-
confidenceInterval: function(N = 50
|
|
6200
|
+
confidenceInterval: function(N = 50) {
|
|
6049
6201
|
const out = [];
|
|
6050
6202
|
if (0 === comps.n || N <= 0) return out;
|
|
6051
6203
|
const z = invNorm(1 - alpha / 2);
|
|
@@ -6107,10 +6259,10 @@
|
|
|
6107
6259
|
return x;
|
|
6108
6260
|
}
|
|
6109
6261
|
function regressionPolynomial(data, x = (d)=>d.x, y = (d)=>d.y, options = {}) {
|
|
6110
|
-
var _a;
|
|
6262
|
+
var _a, _b;
|
|
6111
6263
|
let degree = null != (_a = options.degree) ? _a : 0;
|
|
6112
6264
|
degree < 0 && (degree = 0);
|
|
6113
|
-
const m = degree + 1, sums = new Array(2 * degree + 1).fill(0);
|
|
6265
|
+
const alpha = null != (_b = options.alpha) ? _b : .05, m = degree + 1, sums = new Array(2 * degree + 1).fill(0);
|
|
6114
6266
|
visitPoints(data, x, y, (dx, dy)=>{
|
|
6115
6267
|
let xp = 1;
|
|
6116
6268
|
for(let k = 0; k < sums.length; k++)sums[k] += xp, xp *= dx;
|
|
@@ -6165,7 +6317,7 @@
|
|
|
6165
6317
|
}
|
|
6166
6318
|
return out;
|
|
6167
6319
|
},
|
|
6168
|
-
confidenceInterval (N = 50
|
|
6320
|
+
confidenceInterval (N = 50) {
|
|
6169
6321
|
const out = [];
|
|
6170
6322
|
if (N <= 0) return out;
|
|
6171
6323
|
const comps = computeLinearCIComponents(data, x, y, predict);
|
|
@@ -6217,6 +6369,7 @@
|
|
|
6217
6369
|
return points[points.length - 1]?.y;
|
|
6218
6370
|
}
|
|
6219
6371
|
};
|
|
6372
|
+
const getAlphaByConfidenceLevel = (confidenceLevel = 0.95)=>1 - Math.max(Math.min(1, confidenceLevel), 0);
|
|
6220
6373
|
const columnPolynomialRegressionLine = (spec, context)=>{
|
|
6221
6374
|
const result = {
|
|
6222
6375
|
...spec
|
|
@@ -6226,16 +6379,18 @@
|
|
|
6226
6379
|
const lineTheme = advancedVSeed.config[chartType]?.regressionLine;
|
|
6227
6380
|
if (!regressionLine || !regressionLine.polynomialRegressionLine) return result;
|
|
6228
6381
|
const lineList = array_array(regressionLine.polynomialRegressionLine);
|
|
6229
|
-
if (!result.
|
|
6382
|
+
if (!result.extensionMark) result.extensionMark = [];
|
|
6230
6383
|
lineList.forEach((line, lineIndex)=>{
|
|
6384
|
+
if (false === line.enable) return;
|
|
6231
6385
|
const theme = lineTheme.linearRegressionLine ?? {};
|
|
6232
|
-
const { color, lineWidth, lineDash, text, textColor, textFontSize, textFontWeight, confidenceIntervalOpacity, confidenceIntervalVisible = theme.confidenceIntervalVisible } = line;
|
|
6386
|
+
const { color, lineWidth, lineDash, text, textColor, textFontSize, textFontWeight, confidenceIntervalOpacity, confidenceLevel = 0.95, confidenceIntervalVisible = theme.confidenceIntervalVisible } = line;
|
|
6233
6387
|
const childrenMarks = [];
|
|
6234
|
-
result.
|
|
6388
|
+
result.extensionMark.push({
|
|
6235
6389
|
type: 'group',
|
|
6236
6390
|
interactive: false,
|
|
6237
6391
|
zIndex: 500,
|
|
6238
6392
|
name: `polynomialRegressionLine-${lineIndex}`,
|
|
6393
|
+
dataId: spec.data?.id,
|
|
6239
6394
|
style: {
|
|
6240
6395
|
data: (datum, ctx)=>{
|
|
6241
6396
|
const vchart = ctx.vchart;
|
|
@@ -6244,8 +6399,7 @@
|
|
|
6244
6399
|
if (s) {
|
|
6245
6400
|
const rect = s.getRegion().getLayoutRect();
|
|
6246
6401
|
if (0 === rect.width || 0 === rect.height) return null;
|
|
6247
|
-
const
|
|
6248
|
-
const yClamper = clamper(start.y, start.y + rect.height);
|
|
6402
|
+
const yClamper = clamper(0, 0 + rect.height);
|
|
6249
6403
|
const data = s.getViewData()?.latestData;
|
|
6250
6404
|
const fieldX = s.fieldX?.[0];
|
|
6251
6405
|
const fieldY = s.fieldY?.[0];
|
|
@@ -6258,7 +6412,8 @@
|
|
|
6258
6412
|
y: Math.max(...filteredData.map((d)=>d[fieldY]))
|
|
6259
6413
|
};
|
|
6260
6414
|
}), void 0, void 0, {
|
|
6261
|
-
degree: line.degree ?? 2
|
|
6415
|
+
degree: line.degree ?? 2,
|
|
6416
|
+
alpha: getAlphaByConfidenceLevel(confidenceLevel)
|
|
6262
6417
|
});
|
|
6263
6418
|
const N = xValues.length;
|
|
6264
6419
|
const xAxisHelper = s.getXAxisHelper();
|
|
@@ -6270,8 +6425,8 @@
|
|
|
6270
6425
|
[fieldY]: datum.y
|
|
6271
6426
|
};
|
|
6272
6427
|
return {
|
|
6273
|
-
x: s.dataToPositionX(d) +
|
|
6274
|
-
y: yClamper(s.dataToPositionY(d)
|
|
6428
|
+
x: s.dataToPositionX(d) + halfBandWidth,
|
|
6429
|
+
y: yClamper(s.dataToPositionY(d))
|
|
6275
6430
|
};
|
|
6276
6431
|
});
|
|
6277
6432
|
const result = {
|
|
@@ -6286,11 +6441,11 @@
|
|
|
6286
6441
|
[fieldY]: datum.lower
|
|
6287
6442
|
};
|
|
6288
6443
|
return {
|
|
6289
|
-
x: s.dataToPositionX(d) +
|
|
6290
|
-
y: yClamper(s.dataToPositionY(d)
|
|
6444
|
+
x: s.dataToPositionX(d) + halfBandWidth,
|
|
6445
|
+
y: yClamper(s.dataToPositionY(d)),
|
|
6291
6446
|
y1: yClamper(s.dataToPositionY({
|
|
6292
6447
|
[fieldY]: datum.upper
|
|
6293
|
-
})
|
|
6448
|
+
}))
|
|
6294
6449
|
};
|
|
6295
6450
|
});
|
|
6296
6451
|
}
|
|
@@ -6305,6 +6460,7 @@
|
|
|
6305
6460
|
type: 'area',
|
|
6306
6461
|
interactive: false,
|
|
6307
6462
|
zIndex: 500,
|
|
6463
|
+
dataId: spec.data?.id,
|
|
6308
6464
|
style: {
|
|
6309
6465
|
lineWidth: lineWidth ?? theme.lineWidth,
|
|
6310
6466
|
lineDash: lineDash ?? theme.lineDash,
|
|
@@ -6321,6 +6477,7 @@
|
|
|
6321
6477
|
type: 'line',
|
|
6322
6478
|
interactive: false,
|
|
6323
6479
|
zIndex: 500,
|
|
6480
|
+
dataId: spec.data?.id,
|
|
6324
6481
|
style: {
|
|
6325
6482
|
lineWidth: lineWidth ?? theme.lineWidth,
|
|
6326
6483
|
lineDash: lineDash ?? theme.lineDash,
|
|
@@ -6336,6 +6493,8 @@
|
|
|
6336
6493
|
type: 'text',
|
|
6337
6494
|
interactive: false,
|
|
6338
6495
|
zIndex: 500,
|
|
6496
|
+
dataId: spec.data?.id,
|
|
6497
|
+
dataKey: ()=>`polynomialRegressionLine-label-${lineIndex}`,
|
|
6339
6498
|
style: {
|
|
6340
6499
|
textAlign: 'end',
|
|
6341
6500
|
fill: textColor ?? theme.textColor,
|
|
@@ -6412,7 +6571,8 @@
|
|
|
6412
6571
|
pivotRowDimensions,
|
|
6413
6572
|
pivotColumnDimensions,
|
|
6414
6573
|
pivotTitle,
|
|
6415
|
-
colorAdapter(pivotDiscreteLegend, pivotColorLegend)
|
|
6574
|
+
colorAdapter(pivotDiscreteLegend, pivotColorLegend),
|
|
6575
|
+
dimensionLinkage
|
|
6416
6576
|
];
|
|
6417
6577
|
const columnSpecPipeline = [
|
|
6418
6578
|
pivotAdapter_pivotAdapter(column, pivotColumn)
|
|
@@ -6612,7 +6772,8 @@
|
|
|
6612
6772
|
pivotRowDimensions,
|
|
6613
6773
|
pivotColumnDimensions,
|
|
6614
6774
|
pivotTitle,
|
|
6615
|
-
colorAdapter(pivotDiscreteLegend, pivotColorLegend)
|
|
6775
|
+
colorAdapter(pivotDiscreteLegend, pivotColorLegend),
|
|
6776
|
+
dimensionLinkage
|
|
6616
6777
|
];
|
|
6617
6778
|
const columnParallelSpecPipeline = [
|
|
6618
6779
|
pivotAdapter_pivotAdapter(columnParallel, pivotColumnParallel)
|
|
@@ -6709,7 +6870,8 @@
|
|
|
6709
6870
|
pivotRowDimensions,
|
|
6710
6871
|
pivotColumnDimensions,
|
|
6711
6872
|
pivotTitle,
|
|
6712
|
-
colorAdapter(pivotDiscreteLegend, pivotColorLegend)
|
|
6873
|
+
colorAdapter(pivotDiscreteLegend, pivotColorLegend),
|
|
6874
|
+
dimensionLinkage
|
|
6713
6875
|
];
|
|
6714
6876
|
const columnPercentSpecPipeline = [
|
|
6715
6877
|
pivotAdapter_pivotAdapter(columnPercent, pivotColumnPercent)
|
|
@@ -6992,11 +7154,12 @@
|
|
|
6992
7154
|
};
|
|
6993
7155
|
const { advancedVSeed, vseed } = context;
|
|
6994
7156
|
const { chartType } = vseed;
|
|
6995
|
-
const { measures, dimensions, encoding } = advancedVSeed;
|
|
7157
|
+
const { measures, dimensions, encoding, datasetReshapeInfo, pivotAllDatasetReshapeInfo } = advancedVSeed;
|
|
6996
7158
|
const config = advancedVSeed.config?.[chartType]?.yAxis ?? {};
|
|
6997
7159
|
if (!result.axes) result.axes = [];
|
|
6998
7160
|
const { visible = true, label, tick, title, grid, line, labelAutoHide, labelAutoHideGap, labelAutoLimit, labelAutoLimitLength = 80, labelAutoRotate, labelAutoRotateAngleRange } = config;
|
|
6999
7161
|
const sampling = !(labelAutoHide || labelAutoRotate || labelAutoLimit);
|
|
7162
|
+
const onlyMeasureId = 0 === (encoding.y || []).filter((v)=>v !== MeasureId).length;
|
|
7000
7163
|
const bandAxis = {
|
|
7001
7164
|
visible,
|
|
7002
7165
|
type: 'band',
|
|
@@ -7066,6 +7229,14 @@
|
|
|
7066
7229
|
0.1
|
|
7067
7230
|
]
|
|
7068
7231
|
};
|
|
7232
|
+
if (onlyMeasureId && bandAxis.label) {
|
|
7233
|
+
const allDatasetReshapeInfo = pivotAllDatasetReshapeInfo || datasetReshapeInfo;
|
|
7234
|
+
const colorIdMap = allDatasetReshapeInfo.reduce((prev, cur)=>({
|
|
7235
|
+
...prev,
|
|
7236
|
+
...cur.unfoldInfo.colorIdMap
|
|
7237
|
+
}), {});
|
|
7238
|
+
bandAxis.label.formatMethod = (text)=>common_isArray(text) ? text : colorIdMap[String(text)]?.alias ?? text;
|
|
7239
|
+
}
|
|
7069
7240
|
result.axes = [
|
|
7070
7241
|
...result.axes,
|
|
7071
7242
|
bandAxis
|
|
@@ -7093,7 +7264,7 @@
|
|
|
7093
7264
|
type: 'rect',
|
|
7094
7265
|
style: {
|
|
7095
7266
|
lineWidth: 0,
|
|
7096
|
-
opacity: 0.
|
|
7267
|
+
opacity: 0.26,
|
|
7097
7268
|
fill: rectColor
|
|
7098
7269
|
}
|
|
7099
7270
|
},
|
|
@@ -7110,6 +7281,9 @@
|
|
|
7110
7281
|
}
|
|
7111
7282
|
}
|
|
7112
7283
|
};
|
|
7284
|
+
const yAxisConfig = result.axes?.find((v)=>'left' === v.orient);
|
|
7285
|
+
const yAxisFormatter = yAxisConfig?.label?.formatMethod;
|
|
7286
|
+
if (yAxisFormatter) crosshair.yField.label.formatMethod = (text)=>yAxisFormatter(text);
|
|
7113
7287
|
return result;
|
|
7114
7288
|
};
|
|
7115
7289
|
const bar = [
|
|
@@ -7159,7 +7333,8 @@
|
|
|
7159
7333
|
pivotRowDimensions,
|
|
7160
7334
|
pivotColumnDimensions,
|
|
7161
7335
|
pivotTitle,
|
|
7162
|
-
colorAdapter(pivotDiscreteLegend, pivotColorLegend)
|
|
7336
|
+
colorAdapter(pivotDiscreteLegend, pivotColorLegend),
|
|
7337
|
+
dimensionLinkage
|
|
7163
7338
|
];
|
|
7164
7339
|
const barSpecPipeline = [
|
|
7165
7340
|
pivotAdapter_pivotAdapter(bar, pivotBar)
|
|
@@ -7273,7 +7448,8 @@
|
|
|
7273
7448
|
pivotRowDimensions,
|
|
7274
7449
|
pivotColumnDimensions,
|
|
7275
7450
|
pivotTitle,
|
|
7276
|
-
colorAdapter(pivotDiscreteLegend, pivotColorLegend)
|
|
7451
|
+
colorAdapter(pivotDiscreteLegend, pivotColorLegend),
|
|
7452
|
+
dimensionLinkage
|
|
7277
7453
|
];
|
|
7278
7454
|
const barParallelSpecPipeline = [
|
|
7279
7455
|
pivotAdapter_pivotAdapter(barParallel, pivotBarParallel)
|
|
@@ -7360,7 +7536,8 @@
|
|
|
7360
7536
|
pivotRowDimensions,
|
|
7361
7537
|
pivotColumnDimensions,
|
|
7362
7538
|
pivotTitle,
|
|
7363
|
-
colorAdapter(pivotDiscreteLegend, pivotColorLegend)
|
|
7539
|
+
colorAdapter(pivotDiscreteLegend, pivotColorLegend),
|
|
7540
|
+
dimensionLinkage
|
|
7364
7541
|
];
|
|
7365
7542
|
const barPercentSpecPipeline = [
|
|
7366
7543
|
pivotAdapter_pivotAdapter(barPercent, pivotBarPercent)
|
|
@@ -7557,7 +7734,8 @@
|
|
|
7557
7734
|
pivotRowDimensions,
|
|
7558
7735
|
pivotColumnDimensions,
|
|
7559
7736
|
pivotTitle,
|
|
7560
|
-
colorAdapter(pivotDiscreteLegend, pivotColorLegend)
|
|
7737
|
+
colorAdapter(pivotDiscreteLegend, pivotColorLegend),
|
|
7738
|
+
dimensionLinkage
|
|
7561
7739
|
];
|
|
7562
7740
|
const areaSpecPipeline = [
|
|
7563
7741
|
pivotAdapter_pivotAdapter(area_area, pivotArea)
|
|
@@ -7649,7 +7827,8 @@
|
|
|
7649
7827
|
pivotRowDimensions,
|
|
7650
7828
|
pivotColumnDimensions,
|
|
7651
7829
|
pivotTitle,
|
|
7652
|
-
colorAdapter(pivotDiscreteLegend, pivotColorLegend)
|
|
7830
|
+
colorAdapter(pivotDiscreteLegend, pivotColorLegend),
|
|
7831
|
+
dimensionLinkage
|
|
7653
7832
|
];
|
|
7654
7833
|
const areaPercentSpecPipeline = [
|
|
7655
7834
|
pivotAdapter_pivotAdapter(areaPercent, pivotAreaPercent)
|
|
@@ -7839,7 +8018,8 @@
|
|
|
7839
8018
|
'yAxis',
|
|
7840
8019
|
'sizeRange',
|
|
7841
8020
|
'size',
|
|
7842
|
-
'crosshairLine'
|
|
8021
|
+
'crosshairLine',
|
|
8022
|
+
'dimensionLinkage'
|
|
7843
8023
|
]);
|
|
7844
8024
|
const config = replaceNullToUndefined(pickedConfig);
|
|
7845
8025
|
result.config = {
|
|
@@ -8205,6 +8385,9 @@
|
|
|
8205
8385
|
}
|
|
8206
8386
|
}
|
|
8207
8387
|
};
|
|
8388
|
+
const yAxisConfig = result.axes?.find((v)=>'left' === v.orient);
|
|
8389
|
+
const yAxisFormatter = yAxisConfig?.label?.formatMethod;
|
|
8390
|
+
if (yAxisFormatter) crosshair.yField.label.formatMethod = (text)=>yAxisFormatter(text);
|
|
8208
8391
|
return result;
|
|
8209
8392
|
};
|
|
8210
8393
|
function tricube(u) {
|
|
@@ -8214,7 +8397,8 @@
|
|
|
8214
8397
|
return t * t * t;
|
|
8215
8398
|
}
|
|
8216
8399
|
function regressionLowess(data, x = (d)=>d.x, y = (d)=>d.y, options = {}) {
|
|
8217
|
-
|
|
8400
|
+
var _a;
|
|
8401
|
+
const span = options.span || .3, degree = 0 === options.degree ? 0 : 1, alpha = null != (_a = null == options ? void 0 : options.alpha) ? _a : .05, iterations = null == options.iterations ? 2 : options.iterations, ptsX = [], ptsY = [];
|
|
8218
8402
|
visitPoints(data, x, y, (dx, dy)=>{
|
|
8219
8403
|
ptsX.push(dx), ptsY.push(dy);
|
|
8220
8404
|
});
|
|
@@ -8296,7 +8480,7 @@
|
|
|
8296
8480
|
}
|
|
8297
8481
|
return out;
|
|
8298
8482
|
},
|
|
8299
|
-
confidenceInterval: function(N = 50
|
|
8483
|
+
confidenceInterval: function(N = 50) {
|
|
8300
8484
|
const out = [];
|
|
8301
8485
|
if (N <= 0) return out;
|
|
8302
8486
|
if (0 === n) return out;
|
|
@@ -8335,8 +8519,8 @@
|
|
|
8335
8519
|
};
|
|
8336
8520
|
}
|
|
8337
8521
|
function regressionLogistic(data, x = (d)=>d.x, y = (d)=>d.y, options) {
|
|
8338
|
-
var _a, _b;
|
|
8339
|
-
const maxIter = null != (_a = null == options ? void 0 : options.maxIteration) ? _a : 25, tol = null != (_b = null == options ? void 0 : options.tol) ? _b : 1e-6, xs = [], ys = [];
|
|
8522
|
+
var _a, _b, _c;
|
|
8523
|
+
const maxIter = null != (_a = null == options ? void 0 : options.maxIteration) ? _a : 25, tol = null != (_b = null == options ? void 0 : options.tol) ? _b : 1e-6, alpha = null != (_c = null == options ? void 0 : options.alpha) ? _c : .05, xs = [], ys = [];
|
|
8340
8524
|
visitPoints(data, x, y, (dx, dy)=>{
|
|
8341
8525
|
xs.push(dx), ys.push(dy ? 1 : 0);
|
|
8342
8526
|
});
|
|
@@ -8403,7 +8587,7 @@
|
|
|
8403
8587
|
}
|
|
8404
8588
|
return out;
|
|
8405
8589
|
},
|
|
8406
|
-
confidenceInterval: function(N = 50
|
|
8590
|
+
confidenceInterval: function(N = 50) {
|
|
8407
8591
|
const out = [];
|
|
8408
8592
|
if (N <= 0) return out;
|
|
8409
8593
|
const comps = computeLinearCIComponents(data, x, y, predict);
|
|
@@ -8446,16 +8630,20 @@
|
|
|
8446
8630
|
const lineTheme = advancedVSeed.config[chartType]?.regressionLine;
|
|
8447
8631
|
if (!regressionLine || !regressionLine[type]) return result;
|
|
8448
8632
|
const lineList = array_array(regressionLine[type]);
|
|
8449
|
-
if (!result.
|
|
8633
|
+
if (!result.extensionMark) result.extensionMark = [];
|
|
8450
8634
|
lineList.forEach((line, lineIndex)=>{
|
|
8635
|
+
if (false === line.enable) return;
|
|
8451
8636
|
const theme = lineTheme.linearRegressionLine ?? {};
|
|
8452
8637
|
const { color, lineWidth, lineDash, text, textColor, textFontSize, textFontWeight, confidenceIntervalOpacity, confidenceIntervalVisible = theme.confidenceIntervalVisible } = line;
|
|
8453
8638
|
const childrenMarks = [];
|
|
8454
|
-
result.
|
|
8639
|
+
result.extensionMark.push({
|
|
8455
8640
|
type: 'group',
|
|
8456
8641
|
interactive: false,
|
|
8457
8642
|
zIndex: 500,
|
|
8458
8643
|
name: `${type}-${lineIndex}`,
|
|
8644
|
+
layoutType: 'region-relative',
|
|
8645
|
+
dataId: spec.data?.id,
|
|
8646
|
+
animation: false,
|
|
8459
8647
|
style: {
|
|
8460
8648
|
data: (datum, ctx)=>{
|
|
8461
8649
|
const vchart = ctx.vchart;
|
|
@@ -8465,8 +8653,7 @@
|
|
|
8465
8653
|
const rect = s.getRegion().getLayoutRect();
|
|
8466
8654
|
const segments = [];
|
|
8467
8655
|
if (0 === rect.width || 0 === rect.height) return segments;
|
|
8468
|
-
const
|
|
8469
|
-
const yClamper = clamper(start.y, start.y + rect.height);
|
|
8656
|
+
const yClamper = clamper(0, rect.height);
|
|
8470
8657
|
const colorAttrOptions = s.getColorAttribute();
|
|
8471
8658
|
const groups = s.getSeriesKeys();
|
|
8472
8659
|
const data = s.getViewData()?.latestData;
|
|
@@ -8475,42 +8662,59 @@
|
|
|
8475
8662
|
if (!groups.length) groups.push(void 0);
|
|
8476
8663
|
groups.forEach((group)=>{
|
|
8477
8664
|
const groupData = data.filter((d)=>d[colorAttrOptions?.field] === group);
|
|
8478
|
-
if (
|
|
8665
|
+
if (groupData.length <= 2) return;
|
|
8479
8666
|
const { confidenceInterval, evaluateGrid } = regressionFunction(groupData, (datum)=>datum?.[fieldX], (datum)=>datum?.[fieldY], getOptions?.(line));
|
|
8480
8667
|
const N = Math.max(3, Math.floor(groupData.length / 4));
|
|
8481
8668
|
const mainColor = color ?? colorAttrOptions?.scale?.scale(group);
|
|
8482
8669
|
const lineData = evaluateGrid(N);
|
|
8483
|
-
const linePoints =
|
|
8670
|
+
const linePoints = [];
|
|
8671
|
+
lineData.forEach((ld, index)=>{
|
|
8484
8672
|
const d = {
|
|
8485
8673
|
[fieldX]: ld.x,
|
|
8486
8674
|
[fieldY]: ld.y
|
|
8487
8675
|
};
|
|
8488
|
-
|
|
8489
|
-
|
|
8490
|
-
|
|
8491
|
-
|
|
8676
|
+
const x = s.dataToPositionX(d);
|
|
8677
|
+
const y = yClamper(s.dataToPositionY(d));
|
|
8678
|
+
if (segments.length && 0 === index) segments[segments.length - 1].linePoints.push({
|
|
8679
|
+
x,
|
|
8680
|
+
y: NaN
|
|
8681
|
+
});
|
|
8682
|
+
linePoints.push({
|
|
8683
|
+
x,
|
|
8684
|
+
y
|
|
8685
|
+
});
|
|
8492
8686
|
});
|
|
8493
|
-
|
|
8687
|
+
const segment = {
|
|
8494
8688
|
color: mainColor,
|
|
8495
8689
|
linePoints
|
|
8496
|
-
}
|
|
8690
|
+
};
|
|
8497
8691
|
if (confidenceIntervalVisible) {
|
|
8498
8692
|
const intervalData = confidenceInterval(N);
|
|
8499
|
-
const areaPoints =
|
|
8693
|
+
const areaPoints = [];
|
|
8694
|
+
intervalData.map((datum, index)=>{
|
|
8500
8695
|
const d = {
|
|
8501
8696
|
[fieldX]: datum.x,
|
|
8502
8697
|
[fieldY]: datum.lower
|
|
8503
8698
|
};
|
|
8504
|
-
|
|
8505
|
-
|
|
8506
|
-
|
|
8507
|
-
|
|
8508
|
-
|
|
8509
|
-
|
|
8510
|
-
|
|
8699
|
+
const x = s.dataToPositionX(d);
|
|
8700
|
+
const y = yClamper(s.dataToPositionY(d));
|
|
8701
|
+
const y1 = yClamper(s.dataToPositionY({
|
|
8702
|
+
[fieldY]: datum.upper
|
|
8703
|
+
}));
|
|
8704
|
+
if (segments.length && 0 === index) segments[segments.length - 1].areaPoints.push({
|
|
8705
|
+
x,
|
|
8706
|
+
y: NaN,
|
|
8707
|
+
y1: NaN
|
|
8708
|
+
});
|
|
8709
|
+
areaPoints.push({
|
|
8710
|
+
x,
|
|
8711
|
+
y,
|
|
8712
|
+
y1
|
|
8713
|
+
});
|
|
8511
8714
|
});
|
|
8512
|
-
|
|
8715
|
+
segment.areaPoints = areaPoints;
|
|
8513
8716
|
}
|
|
8717
|
+
segments.push(segment);
|
|
8514
8718
|
});
|
|
8515
8719
|
return segments;
|
|
8516
8720
|
}
|
|
@@ -8523,17 +8727,22 @@
|
|
|
8523
8727
|
type: 'area',
|
|
8524
8728
|
interactive: false,
|
|
8525
8729
|
zIndex: 500,
|
|
8730
|
+
dataId: spec.data?.id,
|
|
8526
8731
|
style: {
|
|
8732
|
+
stroke: false,
|
|
8527
8733
|
lineWidth: lineWidth ?? theme.lineWidth,
|
|
8528
8734
|
lineDash: lineDash ?? theme.lineDash,
|
|
8529
8735
|
fillOpacity: confidenceIntervalOpacity ?? theme.confidenceIntervalOpacity,
|
|
8530
8736
|
fill: 'red',
|
|
8531
8737
|
segments: (datum, ctx, opt)=>{
|
|
8532
8738
|
const parentNode = opt.mark?._product?.parent;
|
|
8533
|
-
if (parentNode
|
|
8534
|
-
|
|
8535
|
-
|
|
8536
|
-
|
|
8739
|
+
if (parentNode) {
|
|
8740
|
+
const data = parentNode.finalAttribute?.data ?? parentNode.attribute?.data;
|
|
8741
|
+
if (data?.length) return data.map((d)=>({
|
|
8742
|
+
points: d.areaPoints ?? [],
|
|
8743
|
+
fill: d.color
|
|
8744
|
+
}));
|
|
8745
|
+
}
|
|
8537
8746
|
return [];
|
|
8538
8747
|
}
|
|
8539
8748
|
}
|
|
@@ -8542,16 +8751,21 @@
|
|
|
8542
8751
|
type: 'line',
|
|
8543
8752
|
interactive: false,
|
|
8544
8753
|
zIndex: 500,
|
|
8754
|
+
animation: false,
|
|
8755
|
+
dataId: spec.data?.id,
|
|
8545
8756
|
style: {
|
|
8546
8757
|
lineWidth: lineWidth ?? theme.lineWidth,
|
|
8547
8758
|
lineDash: lineDash ?? theme.lineDash,
|
|
8548
8759
|
stroke: 'red',
|
|
8549
8760
|
segments: (datum, ctx, opt)=>{
|
|
8550
8761
|
const parentNode = opt.mark?._product?.parent;
|
|
8551
|
-
if (parentNode
|
|
8552
|
-
|
|
8553
|
-
|
|
8554
|
-
|
|
8762
|
+
if (parentNode) {
|
|
8763
|
+
const data = parentNode.finalAttribute?.data ?? parentNode.attribute?.data;
|
|
8764
|
+
if (data?.length) return data.map((d)=>({
|
|
8765
|
+
points: d.linePoints,
|
|
8766
|
+
stroke: d.color
|
|
8767
|
+
}));
|
|
8768
|
+
}
|
|
8555
8769
|
return [];
|
|
8556
8770
|
}
|
|
8557
8771
|
}
|
|
@@ -8560,6 +8774,9 @@
|
|
|
8560
8774
|
type: 'text',
|
|
8561
8775
|
interactive: false,
|
|
8562
8776
|
zIndex: 500,
|
|
8777
|
+
animation: false,
|
|
8778
|
+
dataId: spec.data?.id,
|
|
8779
|
+
dataKey: ()=>`regressionLine-label-${lineIndex}`,
|
|
8563
8780
|
style: {
|
|
8564
8781
|
textAlign: 'end',
|
|
8565
8782
|
fill: textColor ?? theme.textColor,
|
|
@@ -8585,9 +8802,12 @@
|
|
|
8585
8802
|
});
|
|
8586
8803
|
return result;
|
|
8587
8804
|
};
|
|
8588
|
-
const getDefaultRegressionOptions = (lineConfig)=>
|
|
8589
|
-
|
|
8590
|
-
|
|
8805
|
+
const getDefaultRegressionOptions = (lineConfig)=>{
|
|
8806
|
+
const alpha = getAlphaByConfidenceLevel(lineConfig?.confidenceLevel);
|
|
8807
|
+
return {
|
|
8808
|
+
alpha
|
|
8809
|
+
};
|
|
8810
|
+
};
|
|
8591
8811
|
const linearRegressionLine = generateRegressionLinePipe('linearRegressionLine', regressionLinear);
|
|
8592
8812
|
const lowessRegressionLine = generateRegressionLinePipe('lowessRegressionLine', regressionLowess);
|
|
8593
8813
|
const polynomialRegressionLine = generateRegressionLinePipe('polynomialRegressionLine', regressionPolynomial, (lineConfig)=>({
|
|
@@ -8645,12 +8865,15 @@
|
|
|
8645
8865
|
annotationHorizontalLine_annotationHorizontalLine,
|
|
8646
8866
|
annotationArea_annotationArea,
|
|
8647
8867
|
linearRegressionLine,
|
|
8648
|
-
lowessRegressionLine
|
|
8868
|
+
lowessRegressionLine,
|
|
8869
|
+
polynomialRegressionLine,
|
|
8870
|
+
logisticRegressionLine
|
|
8649
8871
|
]),
|
|
8650
8872
|
pivotRowDimensions,
|
|
8651
8873
|
pivotColumnDimensions,
|
|
8652
8874
|
pivotTitle,
|
|
8653
|
-
colorAdapter(pivotDiscreteLegend, pivotColorLegend)
|
|
8875
|
+
colorAdapter(pivotDiscreteLegend, pivotColorLegend),
|
|
8876
|
+
dimensionLinkage
|
|
8654
8877
|
];
|
|
8655
8878
|
const scatterSpecPipeline = [
|
|
8656
8879
|
pivotAdapter_pivotAdapter(scatter, pivotScatter)
|
|
@@ -8973,7 +9196,8 @@
|
|
|
8973
9196
|
'crosshairRect',
|
|
8974
9197
|
'barGapInGroup',
|
|
8975
9198
|
'barMaxWidth',
|
|
8976
|
-
'stackCornerRadius'
|
|
9199
|
+
'stackCornerRadius',
|
|
9200
|
+
'dimensionLinkage'
|
|
8977
9201
|
]);
|
|
8978
9202
|
const config = replaceNullToUndefined(pickedConfig);
|
|
8979
9203
|
result.config = {
|
|
@@ -9329,7 +9553,6 @@
|
|
|
9329
9553
|
const foldInfoList = datasetReshapeInfo[0].foldInfoList;
|
|
9330
9554
|
const unfoldInfo = datasetReshapeInfo[0].unfoldInfo;
|
|
9331
9555
|
result.tooltip = {
|
|
9332
|
-
style: getTooltipStyle(tooltip),
|
|
9333
9556
|
visible: enable,
|
|
9334
9557
|
mark: {
|
|
9335
9558
|
title: {
|
|
@@ -9377,6 +9600,37 @@
|
|
|
9377
9600
|
};
|
|
9378
9601
|
return result;
|
|
9379
9602
|
};
|
|
9603
|
+
const tooltipDualAxis = (spec, context)=>{
|
|
9604
|
+
const result = {
|
|
9605
|
+
...spec
|
|
9606
|
+
};
|
|
9607
|
+
const { advancedVSeed } = context;
|
|
9608
|
+
const { chartType } = advancedVSeed;
|
|
9609
|
+
const baseConfig = advancedVSeed.config[chartType];
|
|
9610
|
+
const { tooltip = {
|
|
9611
|
+
enable: true
|
|
9612
|
+
} } = baseConfig;
|
|
9613
|
+
result.tooltip = {
|
|
9614
|
+
style: getTooltipStyle(tooltip)
|
|
9615
|
+
};
|
|
9616
|
+
return result;
|
|
9617
|
+
};
|
|
9618
|
+
const barStyleFilter = (pipe)=>(spec, context)=>{
|
|
9619
|
+
if ('bar' === spec.type) return pipe(spec, context);
|
|
9620
|
+
return spec;
|
|
9621
|
+
};
|
|
9622
|
+
const pointStyleFilter = (pipe)=>(spec, context)=>{
|
|
9623
|
+
if ('line' === spec.type || 'area' === spec.type) return pipe(spec, context);
|
|
9624
|
+
return spec;
|
|
9625
|
+
};
|
|
9626
|
+
const lineStyleFilter = (pipe)=>(spec, context)=>{
|
|
9627
|
+
if ('line' === spec.type) return pipe(spec, context);
|
|
9628
|
+
return spec;
|
|
9629
|
+
};
|
|
9630
|
+
const areaStyleFilter = (pipe)=>(spec, context)=>{
|
|
9631
|
+
if ('area' === spec.type) return pipe(spec, context);
|
|
9632
|
+
return spec;
|
|
9633
|
+
};
|
|
9380
9634
|
const yLinearPrimary = (spec, context)=>{
|
|
9381
9635
|
const result = {
|
|
9382
9636
|
...spec
|
|
@@ -9590,6 +9844,116 @@
|
|
|
9590
9844
|
};
|
|
9591
9845
|
return result;
|
|
9592
9846
|
};
|
|
9847
|
+
const isObjectLike = (value)=>"object" == typeof value && null !== value;
|
|
9848
|
+
const common_isObjectLike = isObjectLike;
|
|
9849
|
+
const isPlainObject = function(value) {
|
|
9850
|
+
if (!common_isObjectLike(value) || !isType(value, "Object")) return !1;
|
|
9851
|
+
if (null === Object.getPrototypeOf(value)) return !0;
|
|
9852
|
+
let proto = value;
|
|
9853
|
+
for(; null !== Object.getPrototypeOf(proto);)proto = Object.getPrototypeOf(proto);
|
|
9854
|
+
return Object.getPrototypeOf(value) === proto;
|
|
9855
|
+
};
|
|
9856
|
+
const common_isPlainObject = isPlainObject;
|
|
9857
|
+
const isString = (value, fuzzy = !1)=>{
|
|
9858
|
+
const type = typeof value;
|
|
9859
|
+
return fuzzy ? "string" === type : "string" === type || isType(value, "String");
|
|
9860
|
+
};
|
|
9861
|
+
const common_isString = isString;
|
|
9862
|
+
function pickWithout(obj, keys) {
|
|
9863
|
+
if (!obj || !common_isPlainObject(obj)) return obj;
|
|
9864
|
+
const result = {};
|
|
9865
|
+
return Object.keys(obj).forEach((k)=>{
|
|
9866
|
+
const v = obj[k];
|
|
9867
|
+
let match = !1;
|
|
9868
|
+
keys.forEach((itKey)=>{
|
|
9869
|
+
(common_isString(itKey) && itKey === k || itKey instanceof RegExp && k.match(itKey)) && (match = !0);
|
|
9870
|
+
}), match || (result[k] = v);
|
|
9871
|
+
}), result;
|
|
9872
|
+
}
|
|
9873
|
+
const annotationPointOfDualAxis = (spec, context)=>{
|
|
9874
|
+
const { advancedVSeed, vseed } = context;
|
|
9875
|
+
const { annotation, config } = advancedVSeed;
|
|
9876
|
+
if (!annotation || !annotation.annotationPoint) return spec;
|
|
9877
|
+
const theme = config?.[vseed.chartType]?.annotation?.annotationPoint;
|
|
9878
|
+
const { annotationPoint } = annotation;
|
|
9879
|
+
const annotationPointList = Array.isArray(annotationPoint) ? annotationPoint : [
|
|
9880
|
+
annotationPoint
|
|
9881
|
+
];
|
|
9882
|
+
const isHorizontalBar = isBarLikeChart(advancedVSeed);
|
|
9883
|
+
const defaultStyle = isHorizontalBar ? {
|
|
9884
|
+
textAlign: 'right',
|
|
9885
|
+
textBaseline: 'middle'
|
|
9886
|
+
} : {
|
|
9887
|
+
textAlign: 'center',
|
|
9888
|
+
textBaseline: 'top'
|
|
9889
|
+
};
|
|
9890
|
+
const allMeasureIds = findAllMeasures(advancedVSeed.reshapeMeasures ?? advancedVSeed.measures).map((m)=>m.id);
|
|
9891
|
+
const markPoint = annotationPointList.flatMap((annotationPoint)=>{
|
|
9892
|
+
const { selector: selectorPoint, text = '', textColor = theme?.textColor ?? '#ffffff', textFontSize = theme?.textFontSize ?? 12, textFontWeight = theme?.textFontWeight ?? 400, textAlign = defaultStyle.textAlign, textBaseline = defaultStyle.textBaseline, textBackgroundBorderColor = theme?.textBackgroundBorderColor, textBackgroundBorderRadius = theme?.textBackgroundBorderRadius ?? 4, textBackgroundBorderWidth = theme?.textBackgroundBorderWidth ?? 1, textBackgroundColor = theme?.textBackgroundColor ?? '#212121', textBackgroundPadding = theme?.textBackgroundPadding ?? 2, textBackgroundVisible = theme?.textBackgroundVisible ?? true, offsetX = theme?.offsetX ?? 0, offsetY = theme?.offsetY ?? 0 } = annotationPoint;
|
|
9893
|
+
const dataset = advancedVSeed.dataset.flat();
|
|
9894
|
+
const selectedData = selectorPoint ? dataset.reduce((res, d)=>{
|
|
9895
|
+
const pickedDatum = pickWithout(d, allMeasureIds.filter((id)=>id !== d[MeasureId]));
|
|
9896
|
+
if (selector_selector(pickedDatum, selectorPoint)) res.push(pickedDatum);
|
|
9897
|
+
return res;
|
|
9898
|
+
}, []) : [];
|
|
9899
|
+
const dx = -10 - (isHorizontalBar ? textFontSize : 0);
|
|
9900
|
+
const dy = isHorizontalBar ? 0 : textFontSize;
|
|
9901
|
+
const baseConfig = {
|
|
9902
|
+
zIndex: 1000,
|
|
9903
|
+
itemLine: {
|
|
9904
|
+
visible: false
|
|
9905
|
+
},
|
|
9906
|
+
itemContent: {
|
|
9907
|
+
offsetY,
|
|
9908
|
+
offsetX,
|
|
9909
|
+
confine: true,
|
|
9910
|
+
text: {
|
|
9911
|
+
text: text,
|
|
9912
|
+
style: {
|
|
9913
|
+
opacity: 0.95,
|
|
9914
|
+
visible: true,
|
|
9915
|
+
textAlign: textAlign,
|
|
9916
|
+
textBaseline: textBaseline,
|
|
9917
|
+
fill: textColor,
|
|
9918
|
+
stroke: textBackgroundColor,
|
|
9919
|
+
lineWidth: 1,
|
|
9920
|
+
fontSize: textFontSize,
|
|
9921
|
+
fontWeight: textFontWeight,
|
|
9922
|
+
dx,
|
|
9923
|
+
dy
|
|
9924
|
+
},
|
|
9925
|
+
labelBackground: {
|
|
9926
|
+
visible: textBackgroundVisible,
|
|
9927
|
+
padding: textBackgroundPadding,
|
|
9928
|
+
style: {
|
|
9929
|
+
opacity: 0.95,
|
|
9930
|
+
cornerRadius: textBackgroundBorderRadius ?? 4,
|
|
9931
|
+
fill: textBackgroundColor,
|
|
9932
|
+
stroke: textBackgroundBorderColor,
|
|
9933
|
+
lineWidth: textBackgroundBorderWidth,
|
|
9934
|
+
dx,
|
|
9935
|
+
dy
|
|
9936
|
+
}
|
|
9937
|
+
}
|
|
9938
|
+
}
|
|
9939
|
+
}
|
|
9940
|
+
};
|
|
9941
|
+
return spec.series?.reduce((res, s, index)=>{
|
|
9942
|
+
selectedData.forEach((datum)=>{
|
|
9943
|
+
res.push({
|
|
9944
|
+
...baseConfig,
|
|
9945
|
+
relativeSeriesIndex: index,
|
|
9946
|
+
coordinate: (data)=>data.find((item)=>isSubset(datum, item, allMeasureIds.filter((id)=>id !== item[MeasureId])))
|
|
9947
|
+
});
|
|
9948
|
+
});
|
|
9949
|
+
return res;
|
|
9950
|
+
}, []);
|
|
9951
|
+
});
|
|
9952
|
+
return {
|
|
9953
|
+
...spec,
|
|
9954
|
+
markPoint
|
|
9955
|
+
};
|
|
9956
|
+
};
|
|
9593
9957
|
const dualAxis = [
|
|
9594
9958
|
seriesDualAxis([
|
|
9595
9959
|
initDualAxisPrimary,
|
|
@@ -9601,11 +9965,11 @@
|
|
|
9601
9965
|
barMaxWidth_barMaxWidth,
|
|
9602
9966
|
barGapInGroup_barGapInGroup,
|
|
9603
9967
|
stackCornerRadius_stackCornerRadius,
|
|
9604
|
-
colorBarStyleFill(barStyle_barStyle),
|
|
9605
|
-
colorPointStyleFill(pointStyle_pointStyle),
|
|
9606
|
-
pointStateDimensionHover,
|
|
9607
|
-
colorLineStyleFill(lineStyle_lineStyle),
|
|
9608
|
-
colorAreaStyleFill(areaStyle_areaStyle)
|
|
9968
|
+
barStyleFilter(colorBarStyleFill(barStyle_barStyle)),
|
|
9969
|
+
pointStyleFilter(colorPointStyleFill(pointStyle_pointStyle)),
|
|
9970
|
+
pointStyleFilter(pointStateDimensionHover),
|
|
9971
|
+
lineStyleFilter(colorLineStyleFill(lineStyle_lineStyle)),
|
|
9972
|
+
areaStyleFilter(colorAreaStyleFill(areaStyle_areaStyle))
|
|
9609
9973
|
], [
|
|
9610
9974
|
initDualAxisSecondary,
|
|
9611
9975
|
dualChartTypeSecondary,
|
|
@@ -9616,11 +9980,11 @@
|
|
|
9616
9980
|
barMaxWidth_barMaxWidth,
|
|
9617
9981
|
barGapInGroup_barGapInGroup,
|
|
9618
9982
|
stackCornerRadius_stackCornerRadius,
|
|
9619
|
-
colorBarStyleFill(barStyle_barStyle),
|
|
9620
|
-
colorPointStyleFill(pointStyle_pointStyle),
|
|
9621
|
-
pointStateDimensionHover,
|
|
9622
|
-
colorLineStyleFill(lineStyle_lineStyle),
|
|
9623
|
-
colorAreaStyleFill(areaStyle_areaStyle)
|
|
9983
|
+
barStyleFilter(colorBarStyleFill(barStyle_barStyle)),
|
|
9984
|
+
pointStyleFilter(colorPointStyleFill(pointStyle_pointStyle)),
|
|
9985
|
+
pointStyleFilter(pointStateDimensionHover),
|
|
9986
|
+
lineStyleFilter(colorLineStyleFill(lineStyle_lineStyle)),
|
|
9987
|
+
areaStyleFilter(colorAreaStyleFill(areaStyle_areaStyle))
|
|
9624
9988
|
]),
|
|
9625
9989
|
xBand,
|
|
9626
9990
|
yLinearPrimary,
|
|
@@ -9629,10 +9993,11 @@
|
|
|
9629
9993
|
colorAdapter(discreteLegend, colorLegend),
|
|
9630
9994
|
background_backgroundColor,
|
|
9631
9995
|
verticalCrosshairRect,
|
|
9632
|
-
|
|
9996
|
+
annotationPointOfDualAxis,
|
|
9633
9997
|
annotationVerticalLine_annotationVerticalLine,
|
|
9634
9998
|
annotationHorizontalLine_annotationHorizontalLine,
|
|
9635
|
-
annotationAreaBand
|
|
9999
|
+
annotationAreaBand,
|
|
10000
|
+
tooltipDualAxis
|
|
9636
10001
|
];
|
|
9637
10002
|
const pivotDualAxis = [
|
|
9638
10003
|
initPivot,
|
|
@@ -9677,15 +10042,17 @@
|
|
|
9677
10042
|
colorAdapter(color_color, linearColor),
|
|
9678
10043
|
background_backgroundColor,
|
|
9679
10044
|
verticalCrosshairRect,
|
|
9680
|
-
|
|
10045
|
+
annotationPointOfDualAxis,
|
|
9681
10046
|
annotationVerticalLine_annotationVerticalLine,
|
|
9682
10047
|
annotationHorizontalLine_annotationHorizontalLine,
|
|
9683
|
-
annotationAreaBand
|
|
10048
|
+
annotationAreaBand,
|
|
10049
|
+
tooltipDualAxis
|
|
9684
10050
|
]),
|
|
9685
10051
|
pivotRowDimensions,
|
|
9686
10052
|
pivotColumnDimensions,
|
|
9687
10053
|
pivotTitle,
|
|
9688
|
-
colorAdapter(pivotDiscreteLegend, pivotColorLegend)
|
|
10054
|
+
colorAdapter(pivotDiscreteLegend, pivotColorLegend),
|
|
10055
|
+
dimensionLinkage
|
|
9689
10056
|
];
|
|
9690
10057
|
const dualAxisSpecPipeline = [
|
|
9691
10058
|
pivotAdapter_pivotAdapter(dualAxis, pivotDualAxis)
|
|
@@ -9698,7 +10065,7 @@
|
|
|
9698
10065
|
const { measures: vseedMeasures = [], dimensions = [] } = advancedVSeed;
|
|
9699
10066
|
const measures = findAllMeasures(vseedMeasures);
|
|
9700
10067
|
const encoding = {};
|
|
9701
|
-
pie_generateDefaultDimensionEncoding(dimensions, encoding);
|
|
10068
|
+
pie_generateDefaultDimensionEncoding(dimensions, encoding, hasMultipleMeasureInSingleView(vseedMeasures));
|
|
9702
10069
|
pie_generateDefaultMeasureEncoding(measures, encoding);
|
|
9703
10070
|
return {
|
|
9704
10071
|
...advancedVSeed,
|
|
@@ -9711,8 +10078,9 @@
|
|
|
9711
10078
|
const hasDimensionEncoding = dimensions.some((item)=>item.encoding);
|
|
9712
10079
|
const hasMeasureEncoding = measures.some((item)=>item.encoding);
|
|
9713
10080
|
const encoding = {};
|
|
9714
|
-
|
|
9715
|
-
|
|
10081
|
+
const hasMulti = hasMultipleMeasureInSingleView(vseedMeasures);
|
|
10082
|
+
if (hasDimensionEncoding) pie_generateDimensionEncoding(dimensions, encoding, hasMulti);
|
|
10083
|
+
else pie_generateDefaultDimensionEncoding(dimensions, encoding, hasMulti);
|
|
9716
10084
|
if (hasMeasureEncoding) pie_generateMeasureEncoding(measures, encoding);
|
|
9717
10085
|
else pie_generateDefaultMeasureEncoding(measures, encoding);
|
|
9718
10086
|
return {
|
|
@@ -9720,9 +10088,10 @@
|
|
|
9720
10088
|
encoding
|
|
9721
10089
|
};
|
|
9722
10090
|
};
|
|
9723
|
-
const pie_generateDefaultDimensionEncoding = (dimensions, encoding)=>{
|
|
10091
|
+
const pie_generateDefaultDimensionEncoding = (dimensions, encoding, isMultiMeasure)=>{
|
|
9724
10092
|
const uniqueDimIds = chunk_QJLMYOTX_i(dimensions.map((d)=>d.id));
|
|
9725
|
-
encoding.color = uniqueDimIds.slice(0);
|
|
10093
|
+
if (isMultiMeasure) encoding.color = uniqueDimIds.slice(0);
|
|
10094
|
+
else encoding.color = uniqueDimIds.filter((d)=>d !== MeasureId);
|
|
9726
10095
|
encoding.detail = encoding.color;
|
|
9727
10096
|
encoding.tooltip = uniqueDimIds.filter((d)=>d !== MeasureId);
|
|
9728
10097
|
encoding.label = [];
|
|
@@ -9765,11 +10134,11 @@
|
|
|
9765
10134
|
defaultDimensions_defaultDimensions,
|
|
9766
10135
|
defaultMeasureId_defaultMeasureId,
|
|
9767
10136
|
encodingAdapter([
|
|
9768
|
-
|
|
9769
|
-
|
|
10137
|
+
buildMeasures,
|
|
10138
|
+
defaultEncodingForPie
|
|
9770
10139
|
], [
|
|
9771
|
-
encodingForPie,
|
|
9772
10140
|
buildMeasures,
|
|
10141
|
+
encodingForPie,
|
|
9773
10142
|
pickMeasuresForReshape([
|
|
9774
10143
|
'tooltip',
|
|
9775
10144
|
'label',
|
|
@@ -9926,11 +10295,11 @@
|
|
|
9926
10295
|
defaultDimensions_defaultDimensions,
|
|
9927
10296
|
defaultMeasureId_defaultMeasureId,
|
|
9928
10297
|
encodingAdapter([
|
|
9929
|
-
|
|
9930
|
-
|
|
10298
|
+
buildMeasures,
|
|
10299
|
+
defaultEncodingForPie
|
|
9931
10300
|
], [
|
|
9932
|
-
encodingForPie,
|
|
9933
10301
|
buildMeasures,
|
|
10302
|
+
encodingForPie,
|
|
9934
10303
|
pickMeasuresForReshape([
|
|
9935
10304
|
'tooltip',
|
|
9936
10305
|
'label',
|
|
@@ -11135,7 +11504,8 @@
|
|
|
11135
11504
|
'xAxis',
|
|
11136
11505
|
'yAxis',
|
|
11137
11506
|
'crosshairRect',
|
|
11138
|
-
'whiskers'
|
|
11507
|
+
'whiskers',
|
|
11508
|
+
'dimensionLinkage'
|
|
11139
11509
|
]);
|
|
11140
11510
|
const config = replaceNullToUndefined(pickedConfig);
|
|
11141
11511
|
result.config = {
|
|
@@ -11263,26 +11633,15 @@
|
|
|
11263
11633
|
const sorted = vals.slice().sort((a, b)=>a - b), count = sorted.length, dataMin = sorted[0], dataMax = sorted[sorted.length - 1];
|
|
11264
11634
|
let sum = 0;
|
|
11265
11635
|
for(let i = 0; i < sorted.length; i++)sum += sorted[i];
|
|
11266
|
-
const mean = sum / count, q1 = quantileSorted(sorted, .25), median = quantileSorted(sorted, .5), q3 = quantileSorted(sorted, .75), iqr = q3 - q1, lowerBound = common_isArray(whiskers) ? quantileSorted(sorted, whiskers[0]) : q1 - whiskers * iqr, upperBound = common_isArray(whiskers) ? quantileSorted(sorted, whiskers[1]) : q3 + whiskers * iqr;
|
|
11267
|
-
let
|
|
11268
|
-
for(let i = 0; i < sorted.length; i++)if (sorted[i] >= lowerBound) {
|
|
11269
|
-
lowerWhisker = sorted[i];
|
|
11270
|
-
break;
|
|
11271
|
-
}
|
|
11272
|
-
let upperWhisker = dataMax;
|
|
11273
|
-
for(let i = sorted.length - 1; i >= 0; i--)if (sorted[i] <= upperBound) {
|
|
11274
|
-
upperWhisker = sorted[i];
|
|
11275
|
-
break;
|
|
11276
|
-
}
|
|
11277
|
-
const outliers = [];
|
|
11278
|
-
for(let i = 0; i < sorted.length; i++)(sorted[i] < lowerWhisker || sorted[i] > upperWhisker) && outliers.push(sorted[i]);
|
|
11636
|
+
const mean = sum / count, q1 = quantileSorted(sorted, .25), median = quantileSorted(sorted, .5), q3 = quantileSorted(sorted, .75), iqr = q3 - q1, lowerBound = common_isArray(whiskers) ? quantileSorted(sorted, whiskers[0]) : q1 - whiskers * iqr, upperBound = common_isArray(whiskers) ? quantileSorted(sorted, whiskers[1]) : q3 + whiskers * iqr, outliers = [];
|
|
11637
|
+
for(let i = 0; i < sorted.length; i++)(sorted[i] < lowerBound || sorted[i] > upperBound) && outliers.push(sorted[i]);
|
|
11279
11638
|
const obj = {}, representative = keyToGroup.get(key);
|
|
11280
11639
|
if (null !== keyName) obj[keyName] = representative;
|
|
11281
11640
|
else if (common_isArray(groupField)) {
|
|
11282
11641
|
const groupObj = representative || {};
|
|
11283
11642
|
for (const f of groupField)obj[f] = groupObj[f];
|
|
11284
11643
|
}
|
|
11285
|
-
obj[countName] = count, obj[meanName] = mean, obj[q1Name] = q1, obj[medianName] = median, obj[q3Name] = q3, obj[iqrName] = iqr, obj[minName] = dataMin, obj[maxName] = dataMax, obj[lowerWhiskerName] =
|
|
11644
|
+
obj[countName] = count, obj[meanName] = mean, obj[q1Name] = q1, obj[medianName] = median, obj[q3Name] = q3, obj[iqrName] = iqr, obj[minName] = dataMin, obj[maxName] = dataMax, obj[lowerWhiskerName] = lowerBound, obj[upperWhiskerName] = upperBound, obj[outliersName] = outliers, includeValues && (obj[valuesName] = rawValues.get(key) || []), out.push(obj);
|
|
11286
11645
|
}
|
|
11287
11646
|
return out;
|
|
11288
11647
|
};
|
|
@@ -11449,7 +11808,7 @@
|
|
|
11449
11808
|
unfoldInfo = res.unfoldInfo;
|
|
11450
11809
|
}
|
|
11451
11810
|
const reshapeInfo = {
|
|
11452
|
-
id: groupId
|
|
11811
|
+
id: `${groupId}`,
|
|
11453
11812
|
index,
|
|
11454
11813
|
foldInfo,
|
|
11455
11814
|
unfoldInfo
|
|
@@ -11545,14 +11904,6 @@
|
|
|
11545
11904
|
"__Q1__",
|
|
11546
11905
|
LowerWhisker
|
|
11547
11906
|
];
|
|
11548
|
-
const measureAliasMapping = {
|
|
11549
|
-
[OutliersMeasureId]: intl.i18n`异常点`,
|
|
11550
|
-
[UpperWhisker]: intl.i18n`上边界`,
|
|
11551
|
-
["__Q3__"]: intl.i18n`上四分位数`,
|
|
11552
|
-
[MedianMeasureId]: intl.i18n`中位数`,
|
|
11553
|
-
["__Q1__"]: intl.i18n`下四分位数`,
|
|
11554
|
-
[LowerWhisker]: intl.i18n`下边界`
|
|
11555
|
-
};
|
|
11556
11907
|
const VCHART_OUTLIER_KEY = '__VCHART_BOX_PLOT_OUTLIER_VALUE';
|
|
11557
11908
|
const tooltipBoxplot = (spec, context)=>{
|
|
11558
11909
|
const result = {
|
|
@@ -11568,6 +11919,14 @@
|
|
|
11568
11919
|
const meas = findAllMeasures(vseed.measures);
|
|
11569
11920
|
const valueMeasure = meas.find((item)=>'value' === item.encoding || chunk_JK3VNB42_n(item.encoding));
|
|
11570
11921
|
const defaultFormatter = valueMeasure ? createFormatterByMeasure(valueMeasure) : (v)=>v;
|
|
11922
|
+
const measureAliasMapping = {
|
|
11923
|
+
[OutliersMeasureId]: intl.i18n`异常点`,
|
|
11924
|
+
[UpperWhisker]: intl.i18n`上边界`,
|
|
11925
|
+
["__Q3__"]: intl.i18n`上四分位数`,
|
|
11926
|
+
[MedianMeasureId]: intl.i18n`中位数`,
|
|
11927
|
+
["__Q1__"]: intl.i18n`下四分位数`,
|
|
11928
|
+
[LowerWhisker]: intl.i18n`下边界`
|
|
11929
|
+
};
|
|
11571
11930
|
result.tooltip = {
|
|
11572
11931
|
visible: enable,
|
|
11573
11932
|
style: getTooltipStyle(tooltip),
|
|
@@ -11639,16 +11998,127 @@
|
|
|
11639
11998
|
defaultContent
|
|
11640
11999
|
];
|
|
11641
12000
|
};
|
|
11642
|
-
const
|
|
11643
|
-
|
|
11644
|
-
|
|
11645
|
-
|
|
11646
|
-
|
|
11647
|
-
|
|
11648
|
-
|
|
11649
|
-
|
|
12001
|
+
const colorBoxPlotStyleFill = (stylePipe)=>(spec, context)=>{
|
|
12002
|
+
const result = stylePipe(spec, context);
|
|
12003
|
+
const { advancedVSeed, vseed } = context;
|
|
12004
|
+
const { datasetReshapeInfo } = advancedVSeed;
|
|
12005
|
+
const { unfoldInfo } = datasetReshapeInfo[0];
|
|
12006
|
+
if (isLinearColor(advancedVSeed, vseed)) {
|
|
12007
|
+
if (result?.boxPlot?.style) result.boxPlot.style.fill = {
|
|
12008
|
+
field: unfoldInfo.encodingColor,
|
|
12009
|
+
scale: 'color'
|
|
12010
|
+
};
|
|
12011
|
+
}
|
|
12012
|
+
return result;
|
|
12013
|
+
};
|
|
12014
|
+
const boxPlotStyle_boxPlotStyle = (spec, context)=>{
|
|
12015
|
+
const { advancedVSeed, vseed } = context;
|
|
12016
|
+
const { markStyle, config } = advancedVSeed;
|
|
12017
|
+
const { boxPlotStyle } = markStyle;
|
|
12018
|
+
const theme = config?.[vseed.chartType]?.boxPlotStyle;
|
|
12019
|
+
const result = {
|
|
12020
|
+
...spec,
|
|
12021
|
+
boxPlot: {
|
|
12022
|
+
style: {
|
|
12023
|
+
shaftShape: 'filled-line',
|
|
12024
|
+
visible: true,
|
|
12025
|
+
shaftWidth: '50%',
|
|
12026
|
+
stroke: theme?.boxBorderColor
|
|
12027
|
+
}
|
|
12028
|
+
}
|
|
12029
|
+
};
|
|
12030
|
+
if (chunk_JK3VNB42_n(boxPlotStyle) || chunk_VCYTMP4D_n(boxPlotStyle)) return result;
|
|
12031
|
+
const boxPlotStyles = Array.isArray(boxPlotStyle) ? boxPlotStyle : [
|
|
12032
|
+
boxPlotStyle
|
|
12033
|
+
];
|
|
12034
|
+
const customMap = boxPlotStyles.reduce((result, style, index)=>{
|
|
12035
|
+
const { boxColor, boxColorOpacity, boxBorderColor, boxBorderWidth = 1, boxVisible = true, boxBorderOpacity } = style;
|
|
12036
|
+
return {
|
|
12037
|
+
...result,
|
|
12038
|
+
[`custom${index + 1}`]: {
|
|
12039
|
+
level: index + 1,
|
|
12040
|
+
filter: (datum)=>{
|
|
12041
|
+
if (selector_selector(datum, style.selector)) return true;
|
|
12042
|
+
return false;
|
|
12043
|
+
},
|
|
12044
|
+
style: {
|
|
12045
|
+
visible: boxVisible,
|
|
12046
|
+
fill: boxColor,
|
|
12047
|
+
fillOpacity: boxColorOpacity,
|
|
12048
|
+
lineWidth: boxBorderWidth,
|
|
12049
|
+
stroke: boxBorderColor,
|
|
12050
|
+
strokeOpacity: boxBorderOpacity
|
|
12051
|
+
}
|
|
12052
|
+
}
|
|
12053
|
+
};
|
|
12054
|
+
}, {});
|
|
12055
|
+
result.boxPlot.state = {
|
|
12056
|
+
...result.boxPlot.state,
|
|
12057
|
+
...customMap
|
|
12058
|
+
};
|
|
12059
|
+
return result;
|
|
12060
|
+
};
|
|
12061
|
+
const outlierStyle_outlierStyle = (spec, context)=>{
|
|
12062
|
+
const { advancedVSeed, vseed } = context;
|
|
12063
|
+
const { markStyle, config } = advancedVSeed;
|
|
12064
|
+
const { outlierStyle } = markStyle;
|
|
12065
|
+
const theme = config?.[vseed.chartType]?.outlierStyle;
|
|
12066
|
+
const result = {
|
|
12067
|
+
...spec,
|
|
12068
|
+
outlier: {
|
|
12069
|
+
style: {
|
|
12070
|
+
fill: theme?.pointColor
|
|
12071
|
+
}
|
|
12072
|
+
}
|
|
12073
|
+
};
|
|
12074
|
+
if (chunk_JK3VNB42_n(outlierStyle) || chunk_VCYTMP4D_n(outlierStyle)) return result;
|
|
12075
|
+
const outlierStyles = Array.isArray(outlierStyle) ? outlierStyle : [
|
|
12076
|
+
outlierStyle
|
|
12077
|
+
];
|
|
12078
|
+
const customMap = outlierStyles.reduce((result, style, index)=>{
|
|
12079
|
+
const { pointBorderColor, pointBorderStyle, pointBorderWidth = 1, pointColor, pointColorOpacity, pointSize, pointVisible = true } = style;
|
|
12080
|
+
const lineDash = 'dashed' === pointBorderStyle ? [
|
|
12081
|
+
5,
|
|
12082
|
+
2
|
|
12083
|
+
] : 'dotted' === pointBorderStyle ? [
|
|
12084
|
+
2,
|
|
12085
|
+
5
|
|
12086
|
+
] : [
|
|
12087
|
+
0,
|
|
12088
|
+
0
|
|
12089
|
+
];
|
|
12090
|
+
return {
|
|
12091
|
+
...result,
|
|
12092
|
+
[`custom${index + 1}`]: {
|
|
12093
|
+
level: index + 1,
|
|
12094
|
+
filter: (datum)=>{
|
|
12095
|
+
if (selector_selector(datum, style.selector)) return true;
|
|
12096
|
+
return false;
|
|
12097
|
+
},
|
|
12098
|
+
style: {
|
|
12099
|
+
visible: pointVisible,
|
|
12100
|
+
size: pointSize,
|
|
12101
|
+
fill: pointColor,
|
|
12102
|
+
fillOpacity: pointColorOpacity,
|
|
12103
|
+
innerBorder: {
|
|
12104
|
+
stroke: pointBorderColor,
|
|
12105
|
+
lineWidth: pointBorderWidth,
|
|
12106
|
+
distance: (pointBorderWidth || 0) / 2,
|
|
12107
|
+
lineDash: lineDash
|
|
12108
|
+
}
|
|
12109
|
+
}
|
|
12110
|
+
}
|
|
12111
|
+
};
|
|
12112
|
+
}, {});
|
|
12113
|
+
return {
|
|
12114
|
+
...result,
|
|
12115
|
+
outlier: {
|
|
12116
|
+
...result.outlier,
|
|
12117
|
+
state: {
|
|
12118
|
+
...customMap
|
|
12119
|
+
}
|
|
12120
|
+
}
|
|
11650
12121
|
};
|
|
11651
|
-
return normalLegend;
|
|
11652
12122
|
};
|
|
11653
12123
|
const pipeline_boxplot_boxplot = [
|
|
11654
12124
|
initBoxplot,
|
|
@@ -11661,9 +12131,10 @@
|
|
|
11661
12131
|
yLinear,
|
|
11662
12132
|
label_label,
|
|
11663
12133
|
tooltipBoxplot,
|
|
11664
|
-
colorAdapter(
|
|
12134
|
+
colorAdapter(discreteLegend, colorLegend),
|
|
11665
12135
|
verticalCrosshairRect,
|
|
11666
|
-
|
|
12136
|
+
colorBoxPlotStyleFill(boxPlotStyle_boxPlotStyle),
|
|
12137
|
+
outlierStyle_outlierStyle,
|
|
11667
12138
|
annotationPoint_annotationPoint,
|
|
11668
12139
|
annotationVerticalLine_annotationVerticalLine,
|
|
11669
12140
|
annotationHorizontalLine_annotationHorizontalLine,
|
|
@@ -11684,7 +12155,8 @@
|
|
|
11684
12155
|
pivotAxisStyle(yLinear),
|
|
11685
12156
|
label_label,
|
|
11686
12157
|
tooltipBoxplot,
|
|
11687
|
-
|
|
12158
|
+
colorBoxPlotStyleFill(boxPlotStyle_boxPlotStyle),
|
|
12159
|
+
outlierStyle_outlierStyle,
|
|
11688
12160
|
verticalCrosshairRect,
|
|
11689
12161
|
annotationPoint_annotationPoint,
|
|
11690
12162
|
annotationVerticalLine_annotationVerticalLine,
|
|
@@ -11694,7 +12166,8 @@
|
|
|
11694
12166
|
pivotRowDimensions,
|
|
11695
12167
|
pivotColumnDimensions,
|
|
11696
12168
|
pivotTitle,
|
|
11697
|
-
colorAdapter(pivotDiscreteLegend, pivotColorLegend)
|
|
12169
|
+
colorAdapter(pivotDiscreteLegend, pivotColorLegend),
|
|
12170
|
+
dimensionLinkage
|
|
11698
12171
|
];
|
|
11699
12172
|
const boxplotSpecPipeline = [
|
|
11700
12173
|
pivotAdapter_pivotAdapter(pipeline_boxplot_boxplot, pivotBoxplot)
|
|
@@ -11721,7 +12194,8 @@
|
|
|
11721
12194
|
'crosshairRect',
|
|
11722
12195
|
'binCount',
|
|
11723
12196
|
'binStep',
|
|
11724
|
-
'binValueType'
|
|
12197
|
+
'binValueType',
|
|
12198
|
+
'dimensionLinkage'
|
|
11725
12199
|
]);
|
|
11726
12200
|
let config = replaceNullToUndefined(pickedConfig);
|
|
11727
12201
|
if (!hasColorEncoding && !config?.legend?.enable) config = {
|
|
@@ -11835,9 +12309,9 @@
|
|
|
11835
12309
|
]);
|
|
11836
12310
|
};
|
|
11837
12311
|
const subBin = (data, options)=>{
|
|
11838
|
-
var _a, _b;
|
|
11839
|
-
const { numBins: numBins, thresholds: thresholds, countName: countName, percentageName: percentageName, valuesName: valuesName, countField: countField, field: field, n: n, x0Name: x0Name, x1Name: x1Name } = options, out = [];
|
|
11840
|
-
if (!
|
|
12312
|
+
var _a, _b, _c, _d;
|
|
12313
|
+
const { numBins: numBins, thresholds: thresholds, countName: countName, percentageName: percentageName, valuesName: valuesName, countField: countField, field: field, n: n, x0Name: x0Name, x1Name: x1Name } = options, groupField = options.groupField, usingGroup = Array.isArray(groupField) ? groupField.length > 0 : !!groupField, out = [];
|
|
12314
|
+
if (!usingGroup) for(let i = 0; i < numBins; i++){
|
|
11841
12315
|
const rec = {
|
|
11842
12316
|
[x0Name]: thresholds[i],
|
|
11843
12317
|
[x1Name]: thresholds[i + 1],
|
|
@@ -11845,7 +12319,7 @@
|
|
|
11845
12319
|
};
|
|
11846
12320
|
options.includeValues && (rec[valuesName] = []), out.push(rec);
|
|
11847
12321
|
}
|
|
11848
|
-
const
|
|
12322
|
+
const binGroupCounts = usingGroup ? new Array(numBins).fill(0).map(()=>new Map) : [], binGroupValues = usingGroup ? new Array(numBins).fill(0).map(()=>new Map) : [], groupKeyOrder = [], groupKeySet = new Set, groupRepr = new Map;
|
|
11849
12323
|
for(let i = 0; i < n; i++){
|
|
11850
12324
|
const v = data[i][field];
|
|
11851
12325
|
if (null == v) continue;
|
|
@@ -11858,12 +12332,10 @@
|
|
|
11858
12332
|
let gk;
|
|
11859
12333
|
gk = common_isArray(groupField) ? groupField.map((f)=>String(data[i][f])).join("||") : String(data[i][groupField]);
|
|
11860
12334
|
const m = binGroupCounts[j], prev = null != (_b = m.get(gk)) ? _b : 0;
|
|
11861
|
-
m.set(gk, prev + datumCount)
|
|
11862
|
-
const repMap = binGroupRepr[j];
|
|
11863
|
-
if (repMap.has(gk) || (common_isArray(groupField) ? repMap.set(gk, Object.fromEntries(groupField.map((f)=>[
|
|
12335
|
+
if (m.set(gk, prev + datumCount), groupKeySet.has(gk) || (groupKeySet.add(gk), groupKeyOrder.push(gk), common_isArray(groupField) ? groupRepr.set(gk, Object.fromEntries(groupField.map((f)=>[
|
|
11864
12336
|
f,
|
|
11865
12337
|
data[i][f]
|
|
11866
|
-
]))) :
|
|
12338
|
+
]))) : groupRepr.set(gk, data[i][groupField])), options && options.includeValues) {
|
|
11867
12339
|
const vv = binGroupValues[j];
|
|
11868
12340
|
vv.has(gk) || vv.set(gk, []);
|
|
11869
12341
|
const arr = vv.get(gk);
|
|
@@ -11878,21 +12350,18 @@
|
|
|
11878
12350
|
let totalCount = 0;
|
|
11879
12351
|
const finalOut = [];
|
|
11880
12352
|
if (usingGroup) {
|
|
11881
|
-
for(let j = 0; j < numBins; j++){
|
|
11882
|
-
const
|
|
11883
|
-
|
|
11884
|
-
|
|
11885
|
-
|
|
11886
|
-
|
|
11887
|
-
|
|
11888
|
-
|
|
11889
|
-
|
|
11890
|
-
if (common_isArray(groupField)) for (const f of groupField)rec[f] = repr[f];
|
|
11891
|
-
else rec[groupField] = repr;
|
|
11892
|
-
options && options.includeValues && (rec[valuesName] = binGroupValues[j].get(gk) || []), finalOut.push(rec);
|
|
11893
|
-
}
|
|
12353
|
+
for(let j = 0; j < numBins; j++)for (const gk of groupKeyOrder){
|
|
12354
|
+
const sum = null != (_c = binGroupCounts[j].get(gk)) ? _c : 0, rec = {
|
|
12355
|
+
[x0Name]: thresholds[j],
|
|
12356
|
+
[x1Name]: thresholds[j + 1],
|
|
12357
|
+
[countName]: sum
|
|
12358
|
+
}, repr = null != (_d = groupRepr.get(gk)) ? _d : {};
|
|
12359
|
+
if (common_isArray(groupField)) for (const f of groupField)rec[f] = repr[f];
|
|
12360
|
+
else groupField && (rec[groupField] = repr);
|
|
12361
|
+
options && options.includeValues && (rec[valuesName] = binGroupValues[j].get(gk) || []), finalOut.push(rec), totalCount += sum;
|
|
11894
12362
|
}
|
|
11895
|
-
|
|
12363
|
+
const denominator = totalCount;
|
|
12364
|
+
for (const r of finalOut)r[percentageName] = denominator > 0 ? r[countName] / denominator : 0;
|
|
11896
12365
|
} else {
|
|
11897
12366
|
for(let i = 0, len = out.length; i < len; i++)totalCount += out[i][countName];
|
|
11898
12367
|
for(let i = 0, len = out.length; i < len; i++)out[i][percentageName] = totalCount > 0 ? out[i][countName] / totalCount : 0, finalOut.push(out[i]);
|
|
@@ -11938,7 +12407,7 @@
|
|
|
11938
12407
|
options.facetField
|
|
11939
12408
|
] : [], groupField = common_isArray(null == options ? void 0 : options.groupField) ? null == options ? void 0 : options.groupField : (null == options ? void 0 : options.groupField) ? [
|
|
11940
12409
|
options.groupField
|
|
11941
|
-
] : [], subViewOptions = Object.assign(Object.assign({}, options), {
|
|
12410
|
+
] : [], normalizedGroupField = groupField.length ? groupField : void 0, subViewOptions = Object.assign(Object.assign({}, options), {
|
|
11942
12411
|
numBins: numBins,
|
|
11943
12412
|
thresholds: thresholds,
|
|
11944
12413
|
countName: countName,
|
|
@@ -11948,7 +12417,8 @@
|
|
|
11948
12417
|
field: field,
|
|
11949
12418
|
n: n,
|
|
11950
12419
|
x0Name: x0Name,
|
|
11951
|
-
x1Name: x1Name
|
|
12420
|
+
x1Name: x1Name,
|
|
12421
|
+
groupField: normalizedGroupField
|
|
11952
12422
|
});
|
|
11953
12423
|
if (!facetField.length) return subBin(data, subViewOptions);
|
|
11954
12424
|
const subViewMap = {};
|
|
@@ -11957,13 +12427,16 @@
|
|
|
11957
12427
|
subViewMap[subViewKey] ? subViewMap[subViewKey].push(dataItem) : subViewMap[subViewKey] = [
|
|
11958
12428
|
dataItem
|
|
11959
12429
|
];
|
|
11960
|
-
}), Object.values(subViewMap).map((subDataset)=>
|
|
11961
|
-
|
|
11962
|
-
|
|
11963
|
-
|
|
11964
|
-
|
|
12430
|
+
}), Object.values(subViewMap).map((subDataset)=>{
|
|
12431
|
+
const combinedGroupField = [
|
|
12432
|
+
...groupField,
|
|
12433
|
+
...facetField
|
|
12434
|
+
];
|
|
12435
|
+
return subBin(subDataset, Object.assign(Object.assign({}, subViewOptions), {
|
|
12436
|
+
groupField: combinedGroupField.length ? combinedGroupField : void 0,
|
|
11965
12437
|
n: subDataset.length
|
|
11966
|
-
}))
|
|
12438
|
+
}));
|
|
12439
|
+
}).flat();
|
|
11967
12440
|
};
|
|
11968
12441
|
const reshapeWithHistogramEncoding = (advancedVSeed, context)=>{
|
|
11969
12442
|
const result = {
|
|
@@ -12161,7 +12634,7 @@
|
|
|
12161
12634
|
unfoldInfo = res.unfoldInfo;
|
|
12162
12635
|
}
|
|
12163
12636
|
const reshapeInfo = {
|
|
12164
|
-
id: groupId
|
|
12637
|
+
id: `${groupId}`,
|
|
12165
12638
|
index,
|
|
12166
12639
|
foldInfo,
|
|
12167
12640
|
unfoldInfo
|
|
@@ -12179,7 +12652,6 @@
|
|
|
12179
12652
|
initAdvancedVSeed_initAdvancedVSeed,
|
|
12180
12653
|
default_defaultMeasures_defaultMeasures,
|
|
12181
12654
|
defaultDimensions_defaultDimensions,
|
|
12182
|
-
defaultMeasureId_defaultMeasureId,
|
|
12183
12655
|
histogramConfig,
|
|
12184
12656
|
encodingAdapter([
|
|
12185
12657
|
defaultEncodingForHistogram,
|
|
@@ -12449,19 +12921,22 @@
|
|
|
12449
12921
|
const { chartType, encoding = {}, dimensions, regressionLine } = advancedVSeed;
|
|
12450
12922
|
const { dataset } = vseed;
|
|
12451
12923
|
const lineTheme = advancedVSeed.config[chartType]?.regressionLine;
|
|
12924
|
+
const binValueType = advancedVSeed.config[chartType]?.binValueType;
|
|
12452
12925
|
if (!regressionLine || !regressionLine.kdeRegressionLine) return result;
|
|
12453
12926
|
const rowColumnFields = T(dimensions.filter((dim)=>'row' === dim.encoding || 'column' === dim.encoding), (item)=>item.id);
|
|
12454
12927
|
const lineList = array_array(regressionLine.kdeRegressionLine).filter((kdeLine)=>false !== kdeLine.enable);
|
|
12455
|
-
if (!result.
|
|
12928
|
+
if (!result.extensionMark) result.extensionMark = [];
|
|
12456
12929
|
lineList.forEach((line, lineIndex)=>{
|
|
12930
|
+
if (false === line.enable) return;
|
|
12457
12931
|
const theme = lineTheme.kdeRegressionLine ?? {};
|
|
12458
12932
|
const { color, lineWidth, lineDash, text, textColor, textFontSize, textFontWeight } = line;
|
|
12459
12933
|
const childrenMarks = [];
|
|
12460
|
-
result.
|
|
12934
|
+
result.extensionMark.push({
|
|
12461
12935
|
type: 'group',
|
|
12462
12936
|
interactive: false,
|
|
12463
12937
|
zIndex: 500,
|
|
12464
12938
|
name: `kdeRegressionLine-${lineIndex}`,
|
|
12939
|
+
dataId: spec.data?.id,
|
|
12465
12940
|
style: {
|
|
12466
12941
|
data: (datum, ctx)=>{
|
|
12467
12942
|
const vchart = ctx.vchart;
|
|
@@ -12469,7 +12944,6 @@
|
|
|
12469
12944
|
const series = chart.getAllSeries().filter((s)=>'bar' === s.type);
|
|
12470
12945
|
if (series && series.length) {
|
|
12471
12946
|
const s = series[0];
|
|
12472
|
-
const region = s.getRegion().getLayoutStartPoint();
|
|
12473
12947
|
const fieldX = s.fieldX?.[0];
|
|
12474
12948
|
const scaleY = s.getYAxisHelper().getScale?.(0);
|
|
12475
12949
|
const viewData = s.getViewData()?.latestData;
|
|
@@ -12480,14 +12954,17 @@
|
|
|
12480
12954
|
});
|
|
12481
12955
|
const N = Math.max(3, Math.floor(simpleData.length / 4));
|
|
12482
12956
|
const lineData = res.evaluateGrid(N);
|
|
12483
|
-
const scaleR = (k)=>
|
|
12957
|
+
const scaleR = (k)=>{
|
|
12958
|
+
if ('percentage' === binValueType) return scaleY.scale(k * res.bandwidth);
|
|
12959
|
+
return scaleY.scale(k * simpleData.length * res.bandwidth);
|
|
12960
|
+
};
|
|
12484
12961
|
const linePoints = lineData.map((ld)=>{
|
|
12485
12962
|
const d = {
|
|
12486
12963
|
[fieldX]: ld.x
|
|
12487
12964
|
};
|
|
12488
12965
|
return {
|
|
12489
|
-
x: s.dataToPositionX(d)
|
|
12490
|
-
y: scaleR(ld.y)
|
|
12966
|
+
x: s.dataToPositionX(d),
|
|
12967
|
+
y: scaleR(ld.y)
|
|
12491
12968
|
};
|
|
12492
12969
|
});
|
|
12493
12970
|
return {
|
|
@@ -12504,6 +12981,7 @@
|
|
|
12504
12981
|
type: 'line',
|
|
12505
12982
|
interactive: false,
|
|
12506
12983
|
zIndex: 500,
|
|
12984
|
+
dataId: spec.data?.id,
|
|
12507
12985
|
style: {
|
|
12508
12986
|
lineWidth: lineWidth ?? theme.lineWidth,
|
|
12509
12987
|
lineDash: lineDash ?? theme.lineDash,
|
|
@@ -12519,6 +12997,8 @@
|
|
|
12519
12997
|
type: 'text',
|
|
12520
12998
|
interactive: false,
|
|
12521
12999
|
zIndex: 500,
|
|
13000
|
+
dataId: spec.data?.id,
|
|
13001
|
+
dataKey: ()=>`kdeRegressionLine-label-${lineIndex}`,
|
|
12522
13002
|
style: {
|
|
12523
13003
|
textAlign: 'end',
|
|
12524
13004
|
fill: textColor ?? theme.textColor,
|
|
@@ -12588,16 +13068,18 @@
|
|
|
12588
13068
|
if (!regressionLine || !regressionLine.ecdfRegressionLine) return result;
|
|
12589
13069
|
const rowColumnFields = T(dimensions.filter((dim)=>'row' === dim.encoding || 'column' === dim.encoding), (item)=>item.id);
|
|
12590
13070
|
const lineList = array_array(regressionLine.ecdfRegressionLine).filter((ecdfLine)=>false !== ecdfLine.enable);
|
|
12591
|
-
if (!result.
|
|
13071
|
+
if (!result.extensionMark) result.extensionMark = [];
|
|
12592
13072
|
lineList.forEach((line, lineIndex)=>{
|
|
13073
|
+
if (false === line.enable) return;
|
|
12593
13074
|
const theme = lineTheme?.ecdfRegressionLine ?? {};
|
|
12594
13075
|
const { color, lineWidth, lineDash, text, textColor, textFontSize, textFontWeight } = line;
|
|
12595
13076
|
const childrenMarks = [];
|
|
12596
|
-
result.
|
|
13077
|
+
result.extensionMark.push({
|
|
12597
13078
|
type: 'group',
|
|
12598
13079
|
interactive: false,
|
|
12599
13080
|
zIndex: 500,
|
|
12600
13081
|
name: `ecdfRegressionLine-${lineIndex}`,
|
|
13082
|
+
dataId: spec.data?.id,
|
|
12601
13083
|
style: {
|
|
12602
13084
|
data: (datum, ctx)=>{
|
|
12603
13085
|
const vchart = ctx.vchart;
|
|
@@ -12605,7 +13087,6 @@
|
|
|
12605
13087
|
const series = chart.getAllSeries().filter((s)=>'bar' === s.type);
|
|
12606
13088
|
if (series && series.length) {
|
|
12607
13089
|
const s = series[0];
|
|
12608
|
-
const region = s.getRegion().getLayoutStartPoint();
|
|
12609
13090
|
const fieldX = s.fieldX?.[0];
|
|
12610
13091
|
const scaleY = s.getYAxisHelper().getScale?.(0);
|
|
12611
13092
|
const viewData = s.getViewData()?.latestData;
|
|
@@ -12623,8 +13104,8 @@
|
|
|
12623
13104
|
[fieldX]: ld.x
|
|
12624
13105
|
};
|
|
12625
13106
|
return {
|
|
12626
|
-
x: s.dataToPositionX(d)
|
|
12627
|
-
y: scaleR(ld.y)
|
|
13107
|
+
x: s.dataToPositionX(d),
|
|
13108
|
+
y: scaleR(ld.y)
|
|
12628
13109
|
};
|
|
12629
13110
|
});
|
|
12630
13111
|
return {
|
|
@@ -12641,6 +13122,7 @@
|
|
|
12641
13122
|
type: 'line',
|
|
12642
13123
|
interactive: false,
|
|
12643
13124
|
zIndex: 500,
|
|
13125
|
+
dataId: spec.data?.id,
|
|
12644
13126
|
style: {
|
|
12645
13127
|
lineWidth: lineWidth ?? theme.lineWidth,
|
|
12646
13128
|
lineDash: lineDash ?? theme.lineDash,
|
|
@@ -12656,6 +13138,8 @@
|
|
|
12656
13138
|
type: 'text',
|
|
12657
13139
|
interactive: false,
|
|
12658
13140
|
zIndex: 500,
|
|
13141
|
+
dataId: spec.data?.id,
|
|
13142
|
+
dataKey: ()=>`ecdfRegressionLine-label-${lineIndex}`,
|
|
12659
13143
|
style: {
|
|
12660
13144
|
textAlign: 'end',
|
|
12661
13145
|
fill: textColor ?? theme.textColor,
|
|
@@ -12745,7 +13229,8 @@
|
|
|
12745
13229
|
pivotRowDimensions,
|
|
12746
13230
|
pivotColumnDimensions,
|
|
12747
13231
|
pivotTitle,
|
|
12748
|
-
colorAdapter(pivotDiscreteLegend, pivotColorLegend)
|
|
13232
|
+
colorAdapter(pivotDiscreteLegend, pivotColorLegend),
|
|
13233
|
+
dimensionLinkage
|
|
12749
13234
|
];
|
|
12750
13235
|
const histogramSpecPipeline = [
|
|
12751
13236
|
pivotAdapter_pivotAdapter(histogram, pivotHistogram)
|
|
@@ -12764,9 +13249,9 @@
|
|
|
12764
13249
|
const getDarkCrosshairRect = ()=>({
|
|
12765
13250
|
visible: true,
|
|
12766
13251
|
labelVisible: true,
|
|
12767
|
-
labelColor: '#
|
|
12768
|
-
labelBackgroundColor: '#
|
|
12769
|
-
rectColor: '#
|
|
13252
|
+
labelColor: '#ffffff',
|
|
13253
|
+
labelBackgroundColor: '#404349',
|
|
13254
|
+
rectColor: '#4B4F54'
|
|
12770
13255
|
});
|
|
12771
13256
|
const getLightCrosshairLine = ()=>({
|
|
12772
13257
|
visible: true,
|
|
@@ -12780,7 +13265,7 @@
|
|
|
12780
13265
|
labelVisible: true,
|
|
12781
13266
|
labelColor: '#ffffff',
|
|
12782
13267
|
labelBackgroundColor: '#364159',
|
|
12783
|
-
rectColor: '#
|
|
13268
|
+
rectColor: '#D9DDE4'
|
|
12784
13269
|
});
|
|
12785
13270
|
const getLightColorScheme = ()=>[
|
|
12786
13271
|
'#8D72F6',
|
|
@@ -12910,12 +13395,14 @@
|
|
|
12910
13395
|
});
|
|
12911
13396
|
const getLightPivotChartGridConfig = ()=>{
|
|
12912
13397
|
const res = pickPivotChartGridConfig(getLightTableConfig());
|
|
13398
|
+
res.hoverHeaderInlineBackgroundColor = '#D9DDE446';
|
|
12913
13399
|
res.chartGridColor = '#F0F1F6';
|
|
12914
13400
|
res.axisLabelColor = '#BCC1CB';
|
|
12915
13401
|
return res;
|
|
12916
13402
|
};
|
|
12917
13403
|
const getDarkPivotChartGridConfig = ()=>{
|
|
12918
13404
|
const res = pickPivotChartGridConfig(getDarkTableConfig());
|
|
13405
|
+
res.hoverHeaderInlineBackgroundColor = '#4b4f5446';
|
|
12919
13406
|
return res;
|
|
12920
13407
|
};
|
|
12921
13408
|
const getDefaultTooltip = ()=>({
|
|
@@ -12974,11 +13461,11 @@
|
|
|
12974
13461
|
visible: false,
|
|
12975
13462
|
tickInside: false,
|
|
12976
13463
|
tickSize: 4,
|
|
12977
|
-
tickColor: '#
|
|
13464
|
+
tickColor: '#E3E5EB'
|
|
12978
13465
|
},
|
|
12979
13466
|
line: {
|
|
12980
13467
|
visible: false,
|
|
12981
|
-
lineColor: '#
|
|
13468
|
+
lineColor: '#E3E5EB',
|
|
12982
13469
|
lineWidth: 1
|
|
12983
13470
|
}
|
|
12984
13471
|
});
|
|
@@ -13020,11 +13507,11 @@
|
|
|
13020
13507
|
visible: false,
|
|
13021
13508
|
tickInside: false,
|
|
13022
13509
|
tickSize: 4,
|
|
13023
|
-
tickColor: '#
|
|
13510
|
+
tickColor: '#E3E5EB'
|
|
13024
13511
|
},
|
|
13025
13512
|
line: {
|
|
13026
13513
|
visible: true,
|
|
13027
|
-
lineColor: '#
|
|
13514
|
+
lineColor: '#E3E5EB',
|
|
13028
13515
|
lineWidth: 1
|
|
13029
13516
|
}
|
|
13030
13517
|
});
|
|
@@ -13285,6 +13772,18 @@
|
|
|
13285
13772
|
confidenceIntervalOpacity: 0.2
|
|
13286
13773
|
}
|
|
13287
13774
|
});
|
|
13775
|
+
const getLightBoxPlotStyle = ()=>({
|
|
13776
|
+
boxBorderColor: '#e3e5eb'
|
|
13777
|
+
});
|
|
13778
|
+
const getDarkBoxPlotStyle = ()=>({
|
|
13779
|
+
boxBorderColor: '#4b4e53'
|
|
13780
|
+
});
|
|
13781
|
+
const getLightOutlierStyle = ()=>({
|
|
13782
|
+
pointColor: '#8F959E'
|
|
13783
|
+
});
|
|
13784
|
+
const getDarkOutlierStyle = ()=>({
|
|
13785
|
+
pointColor: '#36393e'
|
|
13786
|
+
});
|
|
13288
13787
|
const lightTheme = ()=>{
|
|
13289
13788
|
const linearAxis = getLightLinearAxis();
|
|
13290
13789
|
const bandAxis = getLightBandAxis();
|
|
@@ -13549,7 +14048,9 @@
|
|
|
13549
14048
|
yAxis: linearAxis,
|
|
13550
14049
|
crosshairRect,
|
|
13551
14050
|
pivotGrid: getLightPivotChartGridConfig(),
|
|
13552
|
-
annotation: getLightAnnotation()
|
|
14051
|
+
annotation: getLightAnnotation(),
|
|
14052
|
+
boxPlotStyle: getLightBoxPlotStyle(),
|
|
14053
|
+
outlierStyle: getLightOutlierStyle()
|
|
13553
14054
|
}
|
|
13554
14055
|
}
|
|
13555
14056
|
};
|
|
@@ -13812,7 +14313,9 @@
|
|
|
13812
14313
|
yAxis: linearAxis,
|
|
13813
14314
|
crosshairRect: crosshairRect,
|
|
13814
14315
|
pivotGrid: getDarkPivotChartGridConfig(),
|
|
13815
|
-
annotation: getDarkAnnotation()
|
|
14316
|
+
annotation: getDarkAnnotation(),
|
|
14317
|
+
boxPlotStyle: getDarkBoxPlotStyle(),
|
|
14318
|
+
outlierStyle: getDarkOutlierStyle()
|
|
13816
14319
|
}
|
|
13817
14320
|
}
|
|
13818
14321
|
};
|
|
@@ -14075,7 +14578,7 @@
|
|
|
14075
14578
|
return false;
|
|
14076
14579
|
}
|
|
14077
14580
|
});
|
|
14078
|
-
function
|
|
14581
|
+
function util_isPlainObject(o) {
|
|
14079
14582
|
if (false === util_isObject(o)) return false;
|
|
14080
14583
|
const ctor = o.constructor;
|
|
14081
14584
|
if (void 0 === ctor) return true;
|
|
@@ -14182,7 +14685,7 @@
|
|
|
14182
14685
|
return clone(schema, def);
|
|
14183
14686
|
}
|
|
14184
14687
|
function extend(schema, shape) {
|
|
14185
|
-
if (!
|
|
14688
|
+
if (!util_isPlainObject(shape)) throw new Error("Invalid input to extend: expected a plain object");
|
|
14186
14689
|
const def = mergeDefs(schema._zod.def, {
|
|
14187
14690
|
get shape () {
|
|
14188
14691
|
const _shape = {
|
|
@@ -15596,7 +16099,7 @@
|
|
|
15596
16099
|
valid: true,
|
|
15597
16100
|
data: a
|
|
15598
16101
|
};
|
|
15599
|
-
if (
|
|
16102
|
+
if (util_isPlainObject(a) && util_isPlainObject(b)) {
|
|
15600
16103
|
const bKeys = Object.keys(b);
|
|
15601
16104
|
const sharedKeys = Object.keys(a).filter((key)=>-1 !== bKeys.indexOf(key));
|
|
15602
16105
|
const newObj = {
|
|
@@ -15661,7 +16164,7 @@
|
|
|
15661
16164
|
$ZodType.init(inst, def);
|
|
15662
16165
|
inst._zod.parse = (payload, ctx)=>{
|
|
15663
16166
|
const input = payload.value;
|
|
15664
|
-
if (!
|
|
16167
|
+
if (!util_isPlainObject(input)) {
|
|
15665
16168
|
payload.issues.push({
|
|
15666
16169
|
expected: "record",
|
|
15667
16170
|
code: "invalid_type",
|
|
@@ -16601,11 +17104,11 @@
|
|
|
16601
17104
|
arg
|
|
16602
17105
|
]);
|
|
16603
17106
|
inst.and = (arg)=>intersection(inst, arg);
|
|
16604
|
-
inst.transform = (tx)=>
|
|
17107
|
+
inst.transform = (tx)=>schemas_pipe(inst, transform(tx));
|
|
16605
17108
|
inst.default = (def)=>schemas_default(inst, def);
|
|
16606
17109
|
inst.prefault = (def)=>prefault(inst, def);
|
|
16607
17110
|
inst.catch = (params)=>schemas_catch(inst, params);
|
|
16608
|
-
inst.pipe = (target)=>
|
|
17111
|
+
inst.pipe = (target)=>schemas_pipe(inst, target);
|
|
16609
17112
|
inst.readonly = ()=>readonly(inst);
|
|
16610
17113
|
inst.describe = (description)=>{
|
|
16611
17114
|
const cl = inst.clone();
|
|
@@ -17117,7 +17620,7 @@
|
|
|
17117
17620
|
inst.in = def.in;
|
|
17118
17621
|
inst.out = def.out;
|
|
17119
17622
|
});
|
|
17120
|
-
function
|
|
17623
|
+
function schemas_pipe(in_, out) {
|
|
17121
17624
|
return new ZodPipe({
|
|
17122
17625
|
type: "pipe",
|
|
17123
17626
|
in: in_,
|
|
@@ -17913,6 +18416,11 @@
|
|
|
17913
18416
|
chartGridColor: schemas_string().nullish(),
|
|
17914
18417
|
axisLabelColor: schemas_string().nullish()
|
|
17915
18418
|
});
|
|
18419
|
+
const zDimensionLinkage = schemas_object({
|
|
18420
|
+
enable: schemas_boolean().nullish(),
|
|
18421
|
+
showTooltip: schemas_boolean().nullish(),
|
|
18422
|
+
showLabel: schemas_boolean().nullish()
|
|
18423
|
+
});
|
|
17916
18424
|
const zLineConfig = schemas_object({
|
|
17917
18425
|
backgroundColor: zBackgroundColor.nullish(),
|
|
17918
18426
|
label: zLabel.nullish(),
|
|
@@ -17923,7 +18431,8 @@
|
|
|
17923
18431
|
yAxis: zYLinearAxis.nullish(),
|
|
17924
18432
|
crosshairLine: zCrosshairLine.nullish(),
|
|
17925
18433
|
pivotGrid: zPivotChartGridConfig.nullish(),
|
|
17926
|
-
annotation: zAnnotationConfig.nullish()
|
|
18434
|
+
annotation: zAnnotationConfig.nullish(),
|
|
18435
|
+
dimensionLinkage: zDimensionLinkage.nullish()
|
|
17927
18436
|
});
|
|
17928
18437
|
const zStackCornerRadius = schemas_number().or(schemas_array(schemas_number())).default([
|
|
17929
18438
|
3,
|
|
@@ -17975,7 +18484,8 @@
|
|
|
17975
18484
|
barMaxWidth: zBarMaxWidth.nullish(),
|
|
17976
18485
|
barGapInGroup: zBarGapInGroup.nullish(),
|
|
17977
18486
|
pivotGrid: zPivotChartGridConfig.nullish(),
|
|
17978
|
-
annotation: zAnnotationConfig.nullish()
|
|
18487
|
+
annotation: zAnnotationConfig.nullish(),
|
|
18488
|
+
dimensionLinkage: zDimensionLinkage.nullish()
|
|
17979
18489
|
});
|
|
17980
18490
|
const zColumnConfig = zColumnParallelConfig.extend({
|
|
17981
18491
|
regressionLine: zRegressionLine.nullish()
|
|
@@ -17992,7 +18502,8 @@
|
|
|
17992
18502
|
crosshairRect: zCrosshairRect.nullish(),
|
|
17993
18503
|
stackCornerRadius: zStackCornerRadius.nullish(),
|
|
17994
18504
|
pivotGrid: zPivotChartGridConfig.nullish(),
|
|
17995
|
-
annotation: zAnnotationConfig.nullish()
|
|
18505
|
+
annotation: zAnnotationConfig.nullish(),
|
|
18506
|
+
dimensionLinkage: zDimensionLinkage.nullish()
|
|
17996
18507
|
});
|
|
17997
18508
|
const zBarParallelConfig = zBarConfig;
|
|
17998
18509
|
const zBarPercentConfig = zBarConfig;
|
|
@@ -18006,7 +18517,8 @@
|
|
|
18006
18517
|
yAxis: zYLinearAxis.nullish(),
|
|
18007
18518
|
crosshairLine: zCrosshairLine.nullish(),
|
|
18008
18519
|
pivotGrid: zPivotChartGridConfig.nullish(),
|
|
18009
|
-
annotation: zAnnotationConfig.nullish()
|
|
18520
|
+
annotation: zAnnotationConfig.nullish(),
|
|
18521
|
+
dimensionLinkage: zDimensionLinkage.nullish()
|
|
18010
18522
|
});
|
|
18011
18523
|
const zAreaPercentConfig = zAreaConfig;
|
|
18012
18524
|
const zScatterConfig = schemas_object({
|
|
@@ -18022,7 +18534,8 @@
|
|
|
18022
18534
|
sizeRange: schemas_number().or(schemas_array(schemas_number())).nullish(),
|
|
18023
18535
|
pivotGrid: zPivotChartGridConfig.nullish(),
|
|
18024
18536
|
annotation: zAnnotationConfig.nullish(),
|
|
18025
|
-
regressionLine: zRegressionLine.nullish()
|
|
18537
|
+
regressionLine: zRegressionLine.nullish(),
|
|
18538
|
+
dimensionLinkage: zDimensionLinkage.nullish()
|
|
18026
18539
|
});
|
|
18027
18540
|
const zDualAxisConfig = schemas_object({
|
|
18028
18541
|
backgroundColor: zBackgroundColor.nullish(),
|
|
@@ -18037,7 +18550,8 @@
|
|
|
18037
18550
|
xAxis: zXBandAxis.nullish(),
|
|
18038
18551
|
crosshairRect: zCrosshairRect.nullish(),
|
|
18039
18552
|
pivotGrid: zPivotChartGridConfig.nullish(),
|
|
18040
|
-
annotation: zAnnotationConfig.nullish()
|
|
18553
|
+
annotation: zAnnotationConfig.nullish(),
|
|
18554
|
+
dimensionLinkage: zDimensionLinkage.nullish()
|
|
18041
18555
|
});
|
|
18042
18556
|
const zPieLabel = zLabel.extend({
|
|
18043
18557
|
labelLayout: union([
|
|
@@ -18095,6 +18609,32 @@
|
|
|
18095
18609
|
});
|
|
18096
18610
|
const zPivotTableConfig = zTableConfig;
|
|
18097
18611
|
const zWhiskersConfig = schemas_number().or(schemas_array(schemas_number())).default(1.5);
|
|
18612
|
+
const zBoxPlotStyle = schemas_object({
|
|
18613
|
+
selector: zSelector.or(zSelectors).nullish(),
|
|
18614
|
+
boxVisible: schemas_boolean().nullish(),
|
|
18615
|
+
boxColor: schemas_string().nullish(),
|
|
18616
|
+
boxColorOpacity: schemas_number().min(0).max(1).nullish(),
|
|
18617
|
+
boxBorderColor: schemas_string().nullish(),
|
|
18618
|
+
boxBorderWidth: schemas_number().min(0).nullish(),
|
|
18619
|
+
boxBorderOpacity: schemas_number().min(0).max(1).nullish()
|
|
18620
|
+
});
|
|
18621
|
+
const zOutlierStyle = schemas_object({
|
|
18622
|
+
selector: union([
|
|
18623
|
+
zSelector,
|
|
18624
|
+
zSelectors
|
|
18625
|
+
]).optional(),
|
|
18626
|
+
pointVisible: schemas_boolean().optional(),
|
|
18627
|
+
pointSize: schemas_number().optional(),
|
|
18628
|
+
pointColor: schemas_string().optional(),
|
|
18629
|
+
pointColorOpacity: schemas_number().min(0).max(1).optional(),
|
|
18630
|
+
pointBorderColor: schemas_string().optional(),
|
|
18631
|
+
pointBorderWidth: schemas_number().min(0).optional(),
|
|
18632
|
+
pointBorderStyle: schemas_enum([
|
|
18633
|
+
'solid',
|
|
18634
|
+
'dashed',
|
|
18635
|
+
'dotted'
|
|
18636
|
+
]).optional()
|
|
18637
|
+
});
|
|
18098
18638
|
const zBoxplotConfig = schemas_object({
|
|
18099
18639
|
backgroundColor: zBackgroundColor.nullish(),
|
|
18100
18640
|
label: zLabel.nullish(),
|
|
@@ -18106,7 +18646,14 @@
|
|
|
18106
18646
|
crosshairRect: zCrosshairRect.nullish(),
|
|
18107
18647
|
pivotGrid: zPivotChartGridConfig.nullish(),
|
|
18108
18648
|
annotation: zAnnotationConfig.nullish(),
|
|
18109
|
-
whiskers: zWhiskersConfig.nullish()
|
|
18649
|
+
whiskers: zWhiskersConfig.nullish(),
|
|
18650
|
+
dimensionLinkage: zDimensionLinkage.nullish(),
|
|
18651
|
+
boxPlotStyle: zBoxPlotStyle.omit({
|
|
18652
|
+
selector: true
|
|
18653
|
+
}).nullish(),
|
|
18654
|
+
outlierStyle: zOutlierStyle.omit({
|
|
18655
|
+
selector: true
|
|
18656
|
+
}).nullish()
|
|
18110
18657
|
});
|
|
18111
18658
|
const zHistogramConfig = schemas_object({
|
|
18112
18659
|
backgroundColor: zBackgroundColor.nullish(),
|
|
@@ -18123,7 +18670,8 @@
|
|
|
18123
18670
|
binCount: schemas_number().positive().nullish(),
|
|
18124
18671
|
binStep: schemas_number().positive().nullish(),
|
|
18125
18672
|
binValueType: literal('count').or(literal('percentage')).nullish(),
|
|
18126
|
-
regressionLine: zRegressionLine.nullish()
|
|
18673
|
+
regressionLine: zRegressionLine.nullish(),
|
|
18674
|
+
dimensionLinkage: zDimensionLinkage.nullish()
|
|
18127
18675
|
});
|
|
18128
18676
|
const zConfig = schemas_object({
|
|
18129
18677
|
table: zTableConfig.nullish(),
|
|
@@ -18224,7 +18772,9 @@
|
|
|
18224
18772
|
barStyle: zBarStyle.or(schemas_array(zBarStyle)).nullish(),
|
|
18225
18773
|
pointStyle: zPointStyle.or(schemas_array(zPointStyle)).nullish(),
|
|
18226
18774
|
lineStyle: zLineStyle.or(schemas_array(zLineStyle)).nullish(),
|
|
18227
|
-
areaStyle: zAreaStyle.or(schemas_array(zAreaStyle)).nullish()
|
|
18775
|
+
areaStyle: zAreaStyle.or(schemas_array(zAreaStyle)).nullish(),
|
|
18776
|
+
boxPlotStyle: zBoxPlotStyle.or(schemas_array(zBoxPlotStyle)).nullish(),
|
|
18777
|
+
outlierStyle: zOutlierStyle.or(schemas_array(zOutlierStyle)).nullish()
|
|
18228
18778
|
});
|
|
18229
18779
|
const zAnnotationVerticalLine = schemas_object({
|
|
18230
18780
|
selector: union([
|
|
@@ -18385,6 +18935,7 @@
|
|
|
18385
18935
|
annotationVerticalLine: schemas_array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
|
|
18386
18936
|
annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
|
|
18387
18937
|
annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
|
|
18938
|
+
dimensionLinkage: zDimensionLinkage.nullish(),
|
|
18388
18939
|
locale: zLocale.nullish()
|
|
18389
18940
|
});
|
|
18390
18941
|
const zColumn = schemas_object({
|
|
@@ -18412,6 +18963,7 @@
|
|
|
18412
18963
|
annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
|
|
18413
18964
|
annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
|
|
18414
18965
|
polynomialRegressionLine: schemas_array(zPolynomialRegressionLine).or(zPolynomialRegressionLine).or(schemas_boolean()).nullish(),
|
|
18966
|
+
dimensionLinkage: zDimensionLinkage.nullish(),
|
|
18415
18967
|
locale: zLocale.nullish()
|
|
18416
18968
|
});
|
|
18417
18969
|
const zColumnParallel = schemas_object({
|
|
@@ -18437,6 +18989,7 @@
|
|
|
18437
18989
|
annotationVerticalLine: schemas_array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
|
|
18438
18990
|
annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
|
|
18439
18991
|
annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
|
|
18992
|
+
dimensionLinkage: zDimensionLinkage.nullish(),
|
|
18440
18993
|
locale: zLocale.nullish()
|
|
18441
18994
|
});
|
|
18442
18995
|
const zColumnPercent = schemas_object({
|
|
@@ -18461,6 +19014,7 @@
|
|
|
18461
19014
|
annotationVerticalLine: schemas_array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
|
|
18462
19015
|
annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
|
|
18463
19016
|
annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
|
|
19017
|
+
dimensionLinkage: zDimensionLinkage.nullish(),
|
|
18464
19018
|
locale: zLocale.nullish()
|
|
18465
19019
|
});
|
|
18466
19020
|
const zBar = schemas_object({
|
|
@@ -18485,6 +19039,7 @@
|
|
|
18485
19039
|
annotationVerticalLine: schemas_array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
|
|
18486
19040
|
annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
|
|
18487
19041
|
annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
|
|
19042
|
+
dimensionLinkage: zDimensionLinkage.nullish(),
|
|
18488
19043
|
locale: zLocale.nullish()
|
|
18489
19044
|
});
|
|
18490
19045
|
const zBarParallel = schemas_object({
|
|
@@ -18510,6 +19065,7 @@
|
|
|
18510
19065
|
annotationVerticalLine: schemas_array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
|
|
18511
19066
|
annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
|
|
18512
19067
|
annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
|
|
19068
|
+
dimensionLinkage: zDimensionLinkage.nullish(),
|
|
18513
19069
|
locale: zLocale.nullish()
|
|
18514
19070
|
});
|
|
18515
19071
|
const zBarPercent = schemas_object({
|
|
@@ -18534,6 +19090,7 @@
|
|
|
18534
19090
|
annotationVerticalLine: schemas_array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
|
|
18535
19091
|
annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
|
|
18536
19092
|
annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
|
|
19093
|
+
dimensionLinkage: zDimensionLinkage.nullish(),
|
|
18537
19094
|
locale: zLocale.nullish()
|
|
18538
19095
|
});
|
|
18539
19096
|
const zArea = schemas_object({
|
|
@@ -18558,6 +19115,7 @@
|
|
|
18558
19115
|
annotationVerticalLine: schemas_array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
|
|
18559
19116
|
annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
|
|
18560
19117
|
annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
|
|
19118
|
+
dimensionLinkage: zDimensionLinkage.nullish(),
|
|
18561
19119
|
locale: zLocale.nullish()
|
|
18562
19120
|
});
|
|
18563
19121
|
const zAreaPercent = schemas_object({
|
|
@@ -18582,6 +19140,7 @@
|
|
|
18582
19140
|
annotationVerticalLine: schemas_array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
|
|
18583
19141
|
annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
|
|
18584
19142
|
annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
|
|
19143
|
+
dimensionLinkage: zDimensionLinkage.nullish(),
|
|
18585
19144
|
locale: zLocale.nullish()
|
|
18586
19145
|
});
|
|
18587
19146
|
const zScatter = schemas_object({
|
|
@@ -18611,6 +19170,7 @@
|
|
|
18611
19170
|
lowessRegressionLine: schemas_array(zLowessRegressionLine).or(zLowessRegressionLine).or(schemas_boolean()).nullish(),
|
|
18612
19171
|
polynomialRegressionLine: schemas_array(zPolynomialRegressionLine).or(zPolynomialRegressionLine).or(schemas_boolean()).nullish(),
|
|
18613
19172
|
logisticRegressionLine: schemas_array(zLogisticRegressionLine).or(zLogisticRegressionLine).or(schemas_boolean()).nullish(),
|
|
19173
|
+
dimensionLinkage: zDimensionLinkage.nullish(),
|
|
18614
19174
|
locale: zLocale.nullish()
|
|
18615
19175
|
});
|
|
18616
19176
|
const zDualAxis = schemas_object({
|
|
@@ -18643,6 +19203,7 @@
|
|
|
18643
19203
|
annotationVerticalLine: schemas_array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
|
|
18644
19204
|
annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
|
|
18645
19205
|
annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
|
|
19206
|
+
dimensionLinkage: zDimensionLinkage.nullish(),
|
|
18646
19207
|
locale: zLocale.nullish()
|
|
18647
19208
|
});
|
|
18648
19209
|
const zHistogram = schemas_object({
|
|
@@ -18670,6 +19231,7 @@
|
|
|
18670
19231
|
annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
|
|
18671
19232
|
ecdfRegressionLine: schemas_array(zEcdfRegressionLine).or(zEcdfRegressionLine).nullish(),
|
|
18672
19233
|
kdeRegressionLine: schemas_array(zKdeRegressionLine).or(zKdeRegressionLine).nullish(),
|
|
19234
|
+
dimensionLinkage: zDimensionLinkage.nullish(),
|
|
18673
19235
|
locale: zLocale.nullish()
|
|
18674
19236
|
});
|
|
18675
19237
|
const zRose = schemas_object({
|
|
@@ -18785,12 +19347,15 @@
|
|
|
18785
19347
|
sort: zSort.nullish(),
|
|
18786
19348
|
sortLegent: zSortLegend.nullish(),
|
|
18787
19349
|
crosshairRect: zCrosshairRect.nullish(),
|
|
19350
|
+
boxPlotStyle: schemas_array(zBoxPlotStyle).or(zBoxPlotStyle).nullish(),
|
|
19351
|
+
outlierStyle: schemas_array(zOutlierStyle).or(zOutlierStyle).nullish(),
|
|
18788
19352
|
theme: zTheme.nullish(),
|
|
18789
19353
|
whiskers: zWhiskersConfig.nullish(),
|
|
18790
19354
|
annotationPoint: schemas_array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
|
|
18791
19355
|
annotationVerticalLine: schemas_array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
|
|
18792
19356
|
annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
|
|
18793
19357
|
annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
|
|
19358
|
+
dimensionLinkage: zDimensionLinkage.nullish(),
|
|
18794
19359
|
locale: zLocale.nullish()
|
|
18795
19360
|
});
|
|
18796
19361
|
const zVSeed = discriminatedUnion('chartType', [
|
|
@@ -18824,6 +19389,7 @@
|
|
|
18824
19389
|
chartType: zChartType,
|
|
18825
19390
|
dataset: zDataset,
|
|
18826
19391
|
datasetReshapeInfo: zDatasetReshapeInfo,
|
|
19392
|
+
pivotAllDatasetReshapeInfo: zDatasetReshapeInfo,
|
|
18827
19393
|
dimensions: zDimensionTree,
|
|
18828
19394
|
measures: zMeasureTree,
|
|
18829
19395
|
reshapeMeasures: zMeasureTree.optional(),
|