@visactor/vseed 0.1.36 → 0.1.38
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 +2 -2
- 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/builder.d.ts +4183 -965
- package/dist/esm/builder/register/all.js +3 -1
- package/dist/esm/builder/register/all.js.map +1 -1
- package/dist/esm/builder/register/chartType/boxplot.d.ts +1 -0
- package/dist/esm/builder/register/chartType/boxplot.js +9 -0
- package/dist/esm/builder/register/chartType/boxplot.js.map +1 -0
- package/dist/esm/builder/register/chartType/histogram.d.ts +1 -0
- package/dist/esm/builder/register/chartType/histogram.js +9 -0
- package/dist/esm/builder/register/chartType/histogram.js.map +1 -0
- package/dist/esm/builder/register/chartType/index.d.ts +2 -0
- package/dist/esm/builder/register/chartType/index.js +3 -1
- package/dist/esm/dataReshape/constant.d.ts +10 -0
- package/dist/esm/dataReshape/constant.js +11 -1
- package/dist/esm/dataReshape/constant.js.map +1 -1
- package/dist/esm/dataReshape/unfoldDimensions.js +2 -2
- package/dist/esm/dataReshape/unfoldDimensions.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/pipeline/advanced/chart/pipeline/boxplot.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/boxplot.js +33 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/boxplot.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/histogram.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/histogram.js +34 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/histogram.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/index.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/index.js +3 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/boxplot.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/boxplot.js +31 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/boxplot.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/column.js +3 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/column.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/dualAxis.js +4 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/dualAxis.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.js +33 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/index.d.ts +3 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/index.js +3 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/index.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/boxplot.d.ts +3 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/boxplot.js +80 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/boxplot.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/histogram.d.ts +3 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/histogram.js +78 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/histogram.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/index.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/index.js +3 -1
- package/dist/esm/pipeline/advanced/chart/pipes/index.d.ts +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/index.js +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/measures/buildMeasures.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/regressionLine/index.d.ts +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/regressionLine/index.js +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/regressionLine/regressionLine.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/regressionLine/regressionLine.js +8 -0
- package/dist/esm/pipeline/advanced/chart/pipes/regressionLine/regressionLine.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/index.d.ts +4 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/index.js +5 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.js +96 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js +96 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithBoxplotEncoding.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithBoxplotEncoding.js +84 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithBoxplotEncoding.js.map +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithHistogramEncoding.d.ts +2 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithHistogramEncoding.js +86 -0
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithHistogramEncoding.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipeline/bar.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipeline/bar.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/barParallel.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipeline/barParallel.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/barPercent.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipeline/barPercent.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/boxplot.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipeline/boxplot.js +52 -0
- package/dist/esm/pipeline/spec/chart/pipeline/boxplot.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipeline/column.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipeline/column.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/columnParallel.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipeline/columnParallel.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/columnPercent.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipeline/columnPercent.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/dualAxis.js +13 -1
- package/dist/esm/pipeline/spec/chart/pipeline/dualAxis.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/histogram.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipeline/histogram.js +52 -0
- package/dist/esm/pipeline/spec/chart/pipeline/histogram.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipeline/index.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipeline/index.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationAreaBand.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPoint.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/barWidth/barGapInGroup.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/barWidth/barGapInGroup.js +14 -0
- package/dist/esm/pipeline/spec/chart/pipes/barWidth/barGapInGroup.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/barWidth/barMaxWidth.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/barWidth/barMaxWidth.js +14 -0
- package/dist/esm/pipeline/spec/chart/pipes/barWidth/barMaxWidth.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/barWidth/index.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/barWidth/index.js +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetBoxplot.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetBoxplot.js +18 -0
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetBoxplot.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetHistogram.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetHistogram.js +18 -0
- package/dist/esm/pipeline/spec/chart/pipes/dataset/datasetHistogram.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/dataset/index.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/dataset/index.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipes/dataset/progressive.js +4 -8
- package/dist/esm/pipeline/spec/chart/pipes/dataset/progressive.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/index.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/index.js +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/boxplot.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/boxplot.js +37 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/boxplot.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/histogram.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/histogram.js +21 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/histogram.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/index.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/index.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipes/label/label.d.ts +15 -4
- package/dist/esm/pipeline/spec/chart/pipes/label/label.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipes/label/label.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/label/labelDualAxis.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/label/labelPie.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/label/labelScatter.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/legend/pivotColorLegend.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/legend/pivotDiscreteLegend.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/pointState.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotColumnDimensions.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js +37 -14
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotIndicators.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotRowDimensions.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/histogramRegressionLine.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/histogramRegressionLine.js +126 -0
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/histogramRegressionLine.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/index.d.ts +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/index.js +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/stack/stackCornerRadius.js +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/stack/stackCornerRadius.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/index.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/index.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.js +98 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.js +69 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.js.map +1 -0
- package/dist/esm/pipeline/spec/table/pipes/columns/measuresToColumns.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/indicators/pivotDataConfig.js +1 -2
- package/dist/esm/pipeline/spec/table/pipes/indicators/pivotDataConfig.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/indicators/pivotIndicators.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/bodyStyle.js +1 -0
- package/dist/esm/pipeline/spec/table/pipes/theme/bodyStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/cornerHeaderStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/frameStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/headerStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/rowHeaderStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/scrollStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/selectionStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/theme/type.d.ts +13 -0
- package/dist/esm/pipeline/spec/table/pipes/theme/type.js +0 -0
- package/dist/esm/pipeline/utils/constant.d.ts +2 -0
- package/dist/esm/pipeline/utils/constant.js +3 -1
- package/dist/esm/pipeline/utils/constant.js.map +1 -1
- package/dist/esm/theme/common/annotaion.d.ts +3 -0
- package/dist/esm/theme/common/annotaion.js +33 -49
- package/dist/esm/theme/common/annotaion.js.map +1 -1
- package/dist/esm/theme/common/label.d.ts +18 -0
- package/dist/esm/theme/common/label.js +9 -1
- package/dist/esm/theme/common/label.js.map +1 -1
- package/dist/esm/theme/common/regressionLine.d.ts +4 -0
- package/dist/esm/theme/common/regressionLine.js +16 -0
- package/dist/esm/theme/common/regressionLine.js.map +1 -0
- package/dist/esm/theme/common/table.d.ts +17 -8
- package/dist/esm/theme/common/table.js +11 -8
- package/dist/esm/theme/common/table.js.map +1 -1
- package/dist/esm/theme/dark/dark.js +20 -2
- package/dist/esm/theme/dark/dark.js.map +1 -1
- package/dist/esm/theme/light/light.js +20 -2
- package/dist/esm/theme/light/light.js.map +1 -1
- package/dist/esm/types/advancedVSeed.d.ts +1453 -17
- package/dist/esm/types/advancedVSeed.js +3 -2
- package/dist/esm/types/advancedVSeed.js.map +1 -1
- package/dist/esm/types/chartType/area/zArea.d.ts +9 -0
- package/dist/esm/types/chartType/areaPercent/zAreaPercent.d.ts +9 -0
- package/dist/esm/types/chartType/bar/bar.d.ts +5 -1
- package/dist/esm/types/chartType/bar/zBar.d.ts +10 -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 +9 -1
- package/dist/esm/types/chartType/barParallel/zBarParallel.d.ts +11 -0
- package/dist/esm/types/chartType/barParallel/zBarParallel.js +3 -1
- package/dist/esm/types/chartType/barParallel/zBarParallel.js.map +1 -1
- package/dist/esm/types/chartType/barPercent/barPercent.d.ts +5 -1
- package/dist/esm/types/chartType/barPercent/zBarPercent.d.ts +10 -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 +144 -0
- package/dist/esm/types/chartType/boxplot/boxplot.js +0 -0
- package/dist/esm/types/chartType/boxplot/index.d.ts +2 -0
- package/dist/esm/types/chartType/boxplot/index.js +1 -0
- package/dist/esm/types/chartType/boxplot/zBoxplot.d.ts +1185 -0
- package/dist/esm/types/chartType/boxplot/zBoxplot.js +30 -0
- package/dist/esm/types/chartType/boxplot/zBoxplot.js.map +1 -0
- package/dist/esm/types/chartType/column/column.d.ts +5 -1
- package/dist/esm/types/chartType/column/zColumn.d.ts +26 -0
- package/dist/esm/types/chartType/column/zColumn.js +4 -1
- package/dist/esm/types/chartType/column/zColumn.js.map +1 -1
- package/dist/esm/types/chartType/columnParallel/columnParallel.d.ts +9 -1
- package/dist/esm/types/chartType/columnParallel/zColumnParallel.d.ts +11 -0
- package/dist/esm/types/chartType/columnParallel/zColumnParallel.js +3 -1
- package/dist/esm/types/chartType/columnParallel/zColumnParallel.js.map +1 -1
- package/dist/esm/types/chartType/columnPercent/columnPercent.d.ts +5 -1
- package/dist/esm/types/chartType/columnPercent/zColumnPercent.d.ts +10 -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/donut/zDonut.d.ts +9 -0
- package/dist/esm/types/chartType/dualAxis/dualAxis.d.ts +9 -1
- package/dist/esm/types/chartType/dualAxis/zDualAxis.d.ts +2 -0
- package/dist/esm/types/chartType/dualAxis/zDualAxis.js +3 -1
- package/dist/esm/types/chartType/dualAxis/zDualAxis.js.map +1 -1
- package/dist/esm/types/chartType/funnel/zFunnel.d.ts +9 -0
- package/dist/esm/types/chartType/histogram/histogram.d.ts +127 -0
- package/dist/esm/types/chartType/histogram/histogram.js +0 -0
- package/dist/esm/types/chartType/histogram/index.d.ts +2 -0
- package/dist/esm/types/chartType/histogram/index.js +1 -0
- package/dist/esm/types/chartType/histogram/zHistogram.d.ts +1377 -0
- package/dist/esm/types/chartType/histogram/zHistogram.js +32 -0
- package/dist/esm/types/chartType/histogram/zHistogram.js.map +1 -0
- package/dist/esm/types/chartType/index.d.ts +3 -0
- package/dist/esm/types/chartType/index.js +2 -0
- package/dist/esm/types/chartType/line/zLine.d.ts +9 -0
- package/dist/esm/types/chartType/pie/zPie.d.ts +9 -0
- package/dist/esm/types/chartType/radar/zRadar.d.ts +9 -0
- package/dist/esm/types/chartType/rose/zRose.d.ts +9 -0
- package/dist/esm/types/chartType/roseParallel/zRoseParallel.d.ts +9 -0
- package/dist/esm/types/chartType/scatter/zScatter.d.ts +9 -0
- package/dist/esm/types/properties/chartType/chartType.d.ts +3 -1
- package/dist/esm/types/properties/chartType/chartType.js +3 -1
- package/dist/esm/types/properties/chartType/chartType.js.map +1 -1
- package/dist/esm/types/properties/config/area.d.ts +4 -0
- package/dist/esm/types/properties/config/bar.d.ts +6 -0
- package/dist/esm/types/properties/config/barWidth/index.d.ts +5 -0
- package/dist/esm/types/properties/config/barWidth/index.js +6 -0
- package/dist/esm/types/properties/config/barWidth/index.js.map +1 -0
- package/dist/esm/types/properties/config/boxplot.d.ts +326 -0
- package/dist/esm/types/properties/config/boxplot.js +27 -0
- package/dist/esm/types/properties/config/boxplot.js.map +1 -0
- package/dist/esm/types/properties/config/column.d.ts +12 -0
- package/dist/esm/types/properties/config/column.js +3 -0
- package/dist/esm/types/properties/config/column.js.map +1 -1
- package/dist/esm/types/properties/config/config.d.ts +703 -0
- package/dist/esm/types/properties/config/config.js +5 -1
- package/dist/esm/types/properties/config/config.js.map +1 -1
- package/dist/esm/types/properties/config/dualAxis.d.ts +2 -0
- package/dist/esm/types/properties/config/funnel.d.ts +2 -0
- package/dist/esm/types/properties/config/heatmap.d.ts +2 -0
- package/dist/esm/types/properties/config/histogram.d.ts +339 -0
- package/dist/esm/types/properties/config/histogram.js +32 -0
- package/dist/esm/types/properties/config/histogram.js.map +1 -0
- package/dist/esm/types/properties/config/index.d.ts +2 -0
- package/dist/esm/types/properties/config/index.js +2 -0
- package/dist/esm/types/properties/config/label/label.d.ts +4 -0
- package/dist/esm/types/properties/config/line.d.ts +2 -0
- package/dist/esm/types/properties/config/pie.d.ts +6 -0
- package/dist/esm/types/properties/config/pivotGrid/pivotGrid.d.ts +2 -0
- package/dist/esm/types/properties/config/pivotGrid/pivotGrid.js +3 -1
- package/dist/esm/types/properties/config/pivotGrid/pivotGrid.js.map +1 -1
- package/dist/esm/types/properties/config/rose.d.ts +4 -0
- package/dist/esm/types/properties/config/scatter.d.ts +2 -0
- package/dist/esm/types/properties/config/whiskers/index.d.ts +3 -0
- package/dist/esm/types/properties/config/whiskers/index.js +5 -0
- package/dist/esm/types/properties/config/whiskers/index.js.map +1 -0
- package/dist/esm/types/properties/encoding/encoding.d.ts +36 -0
- package/dist/esm/types/properties/encoding/measureEncoding.d.ts +1 -1
- package/dist/esm/types/properties/encoding/zEncoding.d.ts +9 -0
- package/dist/esm/types/properties/encoding/zEncoding.js +10 -1
- package/dist/esm/types/properties/encoding/zEncoding.js.map +1 -1
- package/dist/esm/types/properties/index.d.ts +1 -0
- package/dist/esm/types/properties/index.js +1 -0
- package/dist/esm/types/properties/regressionLine/histogramRegressionLine.d.ts +45 -0
- package/dist/esm/types/properties/regressionLine/histogramRegressionLine.js +0 -0
- package/dist/esm/types/properties/regressionLine/index.d.ts +2 -0
- package/dist/esm/types/properties/regressionLine/index.js +1 -0
- package/dist/esm/types/properties/regressionLine/zHistogramRegressionLine.d.ts +11 -0
- package/dist/esm/types/properties/regressionLine/zHistogramRegressionLine.js +17 -0
- package/dist/esm/types/properties/regressionLine/zHistogramRegressionLine.js.map +1 -0
- package/dist/esm/types/properties/theme/customTheme.d.ts +1950 -544
- package/dist/esm/types/vseed.d.ts +2 -2
- package/dist/esm/types/zVseed.d.ts +2727 -0
- package/dist/esm/types/zVseed.js +4 -2
- package/dist/esm/types/zVseed.js.map +1 -1
- package/dist/umd/index.js +1850 -208
- package/dist/umd/index.js.map +1 -1
- package/package.json +6 -4
package/dist/umd/index.js
CHANGED
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
__webpack_require__.r(__webpack_exports__);
|
|
69
69
|
__webpack_require__.d(__webpack_exports__, {
|
|
70
70
|
funnelAdvancedPipeline: ()=>funnelAdvancedPipeline,
|
|
71
|
+
zBoxplot: ()=>zBoxplot,
|
|
71
72
|
zHeatmapConfig: ()=>zHeatmapConfig,
|
|
72
73
|
execPipeline: ()=>execPipeline,
|
|
73
74
|
areaSpecPipeline: ()=>areaSpecPipeline,
|
|
@@ -88,6 +89,7 @@
|
|
|
88
89
|
zYLinearAxis: ()=>zYLinearAxis,
|
|
89
90
|
zMarkStyle: ()=>zMarkStyle,
|
|
90
91
|
registerFunnel: ()=>registerFunnel,
|
|
92
|
+
zHistogramRegressionLine: ()=>zHistogramRegressionLine,
|
|
91
93
|
columnAdvancedPipeline: ()=>columnAdvancedPipeline,
|
|
92
94
|
zLabel: ()=>zLabel,
|
|
93
95
|
registerColumn: ()=>registerColumn,
|
|
@@ -99,6 +101,7 @@
|
|
|
99
101
|
zLineStyle: ()=>zLineStyle,
|
|
100
102
|
registerArea: ()=>registerArea,
|
|
101
103
|
zDataset: ()=>zDataset,
|
|
104
|
+
registerBoxplot: ()=>registerBoxplot,
|
|
102
105
|
DimensionEncodingEnum: ()=>DimensionEncodingEnum,
|
|
103
106
|
barPercentAdvancedPipeline: ()=>barPercentAdvancedPipeline,
|
|
104
107
|
zColumnParallel: ()=>zColumnParallel,
|
|
@@ -110,6 +113,7 @@
|
|
|
110
113
|
FoldXMeasureId: ()=>FoldXMeasureId,
|
|
111
114
|
zAnnotationAreaConfig: ()=>zAnnotationAreaConfig,
|
|
112
115
|
zAnnotationVerticalLineConfig: ()=>zAnnotationVerticalLineConfig,
|
|
116
|
+
zHistogram: ()=>zHistogram,
|
|
113
117
|
zAnnotationConfig: ()=>zAnnotationConfig,
|
|
114
118
|
registerBarPercent: ()=>registerBarPercent,
|
|
115
119
|
ColorIdEncoding: ()=>ColorIdEncoding,
|
|
@@ -118,13 +122,14 @@
|
|
|
118
122
|
roseAdvancedPipeline: ()=>roseAdvancedPipeline,
|
|
119
123
|
zBarParallel: ()=>zBarParallel,
|
|
120
124
|
registerDarkTheme: ()=>registerDarkTheme,
|
|
121
|
-
|
|
125
|
+
MedianMeasureId: ()=>MedianMeasureId,
|
|
122
126
|
tableAdvancedPipeline: ()=>tableAdvancedPipeline,
|
|
127
|
+
zChartType: ()=>zChartType,
|
|
123
128
|
zMeasureTree: ()=>zMeasureTree,
|
|
124
129
|
zStackCornerRadius: ()=>zStackCornerRadius,
|
|
125
|
-
zRose: ()=>zRose,
|
|
126
130
|
registerRose: ()=>registerRose,
|
|
127
131
|
zPivotChartGridConfig: ()=>zPivotChartGridConfig,
|
|
132
|
+
zRose: ()=>zRose,
|
|
128
133
|
registerTable: ()=>registerTable,
|
|
129
134
|
isMeasureGroup: ()=>isMeasureGroup,
|
|
130
135
|
autoFormatter: ()=>autoFormatter,
|
|
@@ -135,8 +140,9 @@
|
|
|
135
140
|
registerBar: ()=>registerBar,
|
|
136
141
|
zColor: ()=>zColor,
|
|
137
142
|
registerDonut: ()=>registerDonut,
|
|
138
|
-
|
|
143
|
+
BinStartMeasureId: ()=>BinStartMeasureId,
|
|
139
144
|
heatmapAdvancedPipeline: ()=>heatmapAdvancedPipeline,
|
|
145
|
+
heatmapSpecPipeline: ()=>heatmapSpecPipeline,
|
|
140
146
|
zFunnelConfig: ()=>zFunnelConfig,
|
|
141
147
|
zMeasures: ()=>zMeasures,
|
|
142
148
|
zDualAxis: ()=>zDualAxis,
|
|
@@ -144,9 +150,11 @@
|
|
|
144
150
|
zDualChartType: ()=>zDualChartType,
|
|
145
151
|
darkTheme: ()=>darkTheme,
|
|
146
152
|
isVTable: ()=>isVTable,
|
|
153
|
+
MaxMeasureId: ()=>MaxMeasureId,
|
|
147
154
|
ORIGINAL_DATA: ()=>ORIGINAL_DATA,
|
|
148
|
-
|
|
155
|
+
MinMeasureId: ()=>MinMeasureId,
|
|
149
156
|
columnParallelSpecPipeline: ()=>columnParallelSpecPipeline,
|
|
157
|
+
zAnnotationHorizontalLineConfig: ()=>zAnnotationHorizontalLineConfig,
|
|
150
158
|
zAnnotationPoint: ()=>zAnnotationPoint,
|
|
151
159
|
DATUM_HIDE_KEY: ()=>DATUM_HIDE_KEY,
|
|
152
160
|
isMeasure: ()=>isMeasure,
|
|
@@ -154,6 +162,7 @@
|
|
|
154
162
|
zSort: ()=>zSort,
|
|
155
163
|
isPivotChart: ()=>isPivotChart,
|
|
156
164
|
zDualAxisConfig: ()=>zDualAxisConfig,
|
|
165
|
+
Q1MeasureValue: ()=>"__Q1__",
|
|
157
166
|
zLineConfig: ()=>zLineConfig,
|
|
158
167
|
FoldPrimaryMeasureValue: ()=>FoldPrimaryMeasureValue,
|
|
159
168
|
zXBandAxis: ()=>zXBandAxis,
|
|
@@ -168,6 +177,7 @@
|
|
|
168
177
|
zLocale: ()=>zLocale,
|
|
169
178
|
isDimension: ()=>isDimension,
|
|
170
179
|
registerScatter: ()=>registerScatter,
|
|
180
|
+
boxplotSpecPipeline: ()=>boxplotSpecPipeline,
|
|
171
181
|
autoNumFormatter: ()=>autoNumFormatter,
|
|
172
182
|
tableSpecPipeline: ()=>tableSpecPipeline,
|
|
173
183
|
isCombination: ()=>isCombination,
|
|
@@ -179,17 +189,18 @@
|
|
|
179
189
|
columnParallelAdvancedPipeline: ()=>columnParallelAdvancedPipeline,
|
|
180
190
|
zColumnPercent: ()=>zColumnPercent,
|
|
181
191
|
foldMeasures: ()=>foldMeasures,
|
|
192
|
+
zFunnel: ()=>zFunnel,
|
|
182
193
|
isPivotTable: ()=>isPivotTable,
|
|
183
194
|
registerPie: ()=>registerPie,
|
|
184
195
|
zDimensionEncoding: ()=>zDimensionEncoding,
|
|
185
|
-
zFunnel: ()=>zFunnel,
|
|
186
196
|
zBarParallelConfig: ()=>zBarParallelConfig,
|
|
187
197
|
lineAdvancedPipeline: ()=>lineAdvancedPipeline,
|
|
188
198
|
FoldMeasureValue: ()=>FoldMeasureValue,
|
|
189
199
|
ANNOTATION_Z_INDEX: ()=>1000,
|
|
200
|
+
Q3MeasureValue: ()=>"__Q3__",
|
|
190
201
|
createFormatter: ()=>createFormatter,
|
|
191
|
-
isMeasureSelector: ()=>isMeasureSelector,
|
|
192
202
|
columnPercentSpecPipeline: ()=>columnPercentSpecPipeline,
|
|
203
|
+
isMeasureSelector: ()=>isMeasureSelector,
|
|
193
204
|
areaAdvancedPipeline: ()=>areaAdvancedPipeline,
|
|
194
205
|
areaPercentSpecPipeline: ()=>areaPercentSpecPipeline,
|
|
195
206
|
barParallelSpecPipeline: ()=>barParallelSpecPipeline,
|
|
@@ -199,23 +210,26 @@
|
|
|
199
210
|
pieAdvancedPipeline: ()=>pieAdvancedPipeline,
|
|
200
211
|
zDualMeasures: ()=>zDualMeasures,
|
|
201
212
|
isTable: ()=>isTable,
|
|
213
|
+
zBarMaxWidth: ()=>zBarMaxWidth,
|
|
202
214
|
zDonut: ()=>zDonut,
|
|
203
|
-
zFunnelTransform: ()=>zFunnelTransform,
|
|
204
215
|
XEncoding: ()=>XEncoding,
|
|
205
216
|
findFirstMeasure: ()=>findFirstMeasure,
|
|
206
217
|
scatterAdvancedPipeline: ()=>scatterAdvancedPipeline,
|
|
218
|
+
zFunnelTransform: ()=>zFunnelTransform,
|
|
207
219
|
zRoseConfig: ()=>zRoseConfig,
|
|
208
220
|
zScatterMeasures: ()=>zScatterMeasures,
|
|
209
221
|
zAnnotation: ()=>zAnnotation,
|
|
210
222
|
selector: ()=>selector_selector,
|
|
211
223
|
isMeasures: ()=>isMeasures,
|
|
212
224
|
zYBandAxis: ()=>zYBandAxis,
|
|
225
|
+
BinPercentageMeasureId: ()=>BinPercentageMeasureId,
|
|
213
226
|
Separator: ()=>"-",
|
|
214
227
|
findAllMeasures: ()=>findAllMeasures,
|
|
215
228
|
zColorLegend: ()=>zColorLegend,
|
|
216
229
|
EncodingEnum: ()=>EncodingEnum,
|
|
217
230
|
preorderTraverse: ()=>preorderTraverse,
|
|
218
231
|
roseParallelSpecPipeline: ()=>roseParallelSpecPipeline,
|
|
232
|
+
registerHistogram: ()=>registerHistogram,
|
|
219
233
|
zRoseParallel: ()=>zRoseParallel,
|
|
220
234
|
MeasureName: ()=>MeasureName,
|
|
221
235
|
zNumFormat: ()=>zNumFormat,
|
|
@@ -250,9 +264,12 @@
|
|
|
250
264
|
roseParallelAdvancedPipeline: ()=>roseParallelAdvancedPipeline,
|
|
251
265
|
zPieConfig: ()=>zPieConfig,
|
|
252
266
|
Builder: ()=>Builder,
|
|
267
|
+
zWhiskersConfig: ()=>zWhiskersConfig,
|
|
253
268
|
radarSpecPipeline: ()=>radarSpecPipeline,
|
|
269
|
+
OutliersMeasureId: ()=>OutliersMeasureId,
|
|
254
270
|
zRadar: ()=>zRadar,
|
|
255
271
|
zTable: ()=>zTable,
|
|
272
|
+
histogramSpecPipeline: ()=>histogramSpecPipeline,
|
|
256
273
|
registerLine: ()=>registerLine,
|
|
257
274
|
registerCustomTheme: ()=>registerCustomTheme,
|
|
258
275
|
zMeasureGroup: ()=>zMeasureGroup,
|
|
@@ -270,6 +287,7 @@
|
|
|
270
287
|
zLinearColor: ()=>zLinearColor,
|
|
271
288
|
DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX: ()=>1001,
|
|
272
289
|
zAreaStyle: ()=>zAreaStyle,
|
|
290
|
+
BinEndMeasureId: ()=>BinEndMeasureId,
|
|
273
291
|
zAnnotationArea: ()=>zAnnotationArea,
|
|
274
292
|
DetailEncoding: ()=>DetailEncoding,
|
|
275
293
|
isPivot: ()=>isPivot,
|
|
@@ -278,23 +296,28 @@
|
|
|
278
296
|
lightTheme: ()=>lightTheme,
|
|
279
297
|
registerColumnParallel: ()=>registerColumnParallel,
|
|
280
298
|
updateAdvanced: ()=>updateAdvanced,
|
|
299
|
+
histogramAdvancedPipeline: ()=>histogramAdvancedPipeline,
|
|
281
300
|
isAreaPercent: ()=>isAreaPercent,
|
|
282
301
|
zColumn: ()=>zColumn,
|
|
283
302
|
zCustomTheme: ()=>zCustomTheme,
|
|
284
303
|
zTableConfig: ()=>zTableConfig,
|
|
285
304
|
zColumnPercentConfig: ()=>zColumnPercentConfig,
|
|
305
|
+
zBarGapInGroup: ()=>zBarGapInGroup,
|
|
286
306
|
ChartTypeEnum: ()=>ChartTypeEnum,
|
|
287
307
|
zVSeed: ()=>zVSeed,
|
|
288
308
|
radarAdvancedPipeline: ()=>radarAdvancedPipeline,
|
|
309
|
+
registerDualAxis: ()=>registerDualAxis,
|
|
289
310
|
registerBarParallel: ()=>registerBarParallel,
|
|
290
311
|
pivotTableSpecPipeline: ()=>pivotTableSpecPipeline,
|
|
291
312
|
DUAL_AXIS_LABEL_Z_INDEX: ()=>1002,
|
|
292
313
|
MeasureEncodingEnum: ()=>MeasureEncodingEnum,
|
|
293
314
|
FoldXMeasureValue: ()=>FoldXMeasureValue,
|
|
294
|
-
|
|
315
|
+
boxplotAdvancedPipeline: ()=>boxplotAdvancedPipeline,
|
|
295
316
|
zEncoding: ()=>zEncoding,
|
|
317
|
+
dualAxisAdvancedPipeline: ()=>dualAxisAdvancedPipeline,
|
|
296
318
|
ColorEncoding: ()=>ColorEncoding,
|
|
297
319
|
measureDepth: ()=>measureDepth,
|
|
320
|
+
BinCountMeasureId: ()=>BinCountMeasureId,
|
|
298
321
|
zAdvancedVSeed: ()=>zAdvancedVSeed,
|
|
299
322
|
zAreaPercent: ()=>zAreaPercent,
|
|
300
323
|
isValueSelector: ()=>isValueSelector,
|
|
@@ -304,9 +327,9 @@
|
|
|
304
327
|
zTooltip: ()=>zTooltip,
|
|
305
328
|
isBarLikeChart: ()=>isBarLikeChart,
|
|
306
329
|
barParallelAdvancedPipeline: ()=>barParallelAdvancedPipeline,
|
|
307
|
-
deleteMeasureTreeByCallback: ()=>deleteMeasureTreeByCallback,
|
|
308
|
-
zBarPercentConfig: ()=>zBarPercentConfig,
|
|
309
330
|
barPercentSpecPipeline: ()=>barPercentSpecPipeline,
|
|
331
|
+
zBarPercentConfig: ()=>zBarPercentConfig,
|
|
332
|
+
deleteMeasureTreeByCallback: ()=>deleteMeasureTreeByCallback,
|
|
310
333
|
dataReshapeByEncoding: ()=>dataReshapeByEncoding,
|
|
311
334
|
lineSpecPipeline: ()=>lineSpecPipeline,
|
|
312
335
|
zDimensionGroup: ()=>zDimensionGroup
|
|
@@ -349,7 +372,7 @@
|
|
|
349
372
|
const { chartType } = builder.vseed;
|
|
350
373
|
if (!chartType) throw new Error('chartType is nil in buildAdvanced');
|
|
351
374
|
const pipeline = Builder.getAdvancedPipeline(chartType);
|
|
352
|
-
if (!pipeline) throw new Error(`no advanced pipeline for chartType ${chartType}`);
|
|
375
|
+
if (!pipeline) throw new Error(`please invoke registerAll or register ${chartType} before build, no advanced pipeline for chartType ${chartType}`);
|
|
353
376
|
const context = {
|
|
354
377
|
vseed: builder.vseed,
|
|
355
378
|
customTheme: Builder.getThemeMap()
|
|
@@ -562,7 +585,9 @@
|
|
|
562
585
|
Donut: 'donut',
|
|
563
586
|
Radar: 'radar',
|
|
564
587
|
Funnel: 'funnel',
|
|
565
|
-
Heatmap: 'heatmap'
|
|
588
|
+
Heatmap: 'heatmap',
|
|
589
|
+
Boxplot: 'boxPlot',
|
|
590
|
+
Histogram: 'histogram'
|
|
566
591
|
};
|
|
567
592
|
const DATUM_HIDE_KEY = '__VSEED_HideItem__';
|
|
568
593
|
const isTable = (vseed)=>vseed.chartType === ChartTypeEnum.Table;
|
|
@@ -1204,6 +1229,7 @@
|
|
|
1204
1229
|
const fontSize = themeConfig.bodyFontSize || 12;
|
|
1205
1230
|
const hoverCellBgColor = themeConfig.hoverBodyBackgroundColor || '#bedaff';
|
|
1206
1231
|
const hoverInlineColor = themeConfig.hoverBodyInlineBackgroundColor || '#bedaff';
|
|
1232
|
+
if (!result.theme) result.theme = {};
|
|
1207
1233
|
result.theme.bodyStyle = {
|
|
1208
1234
|
borderColor: borderColor,
|
|
1209
1235
|
borderLineWidth: 1,
|
|
@@ -1340,6 +1366,14 @@
|
|
|
1340
1366
|
const DetailEncoding = '__Dim_Detail__';
|
|
1341
1367
|
const ColorEncoding = '__Dim_Color__';
|
|
1342
1368
|
const ColorIdEncoding = '__Dim_ColorId__';
|
|
1369
|
+
const MinMeasureId = '__Min__';
|
|
1370
|
+
const MaxMeasureId = '__Max__';
|
|
1371
|
+
const OutliersMeasureId = '__Outliers__';
|
|
1372
|
+
const MedianMeasureId = '__Meadian__';
|
|
1373
|
+
const BinStartMeasureId = '__BinStart__';
|
|
1374
|
+
const BinEndMeasureId = '__BinEnd__';
|
|
1375
|
+
const BinCountMeasureId = '__BinCount__';
|
|
1376
|
+
const BinPercentageMeasureId = '__BinPercentage__';
|
|
1343
1377
|
const defaultMeasureName = (advancedVSeed)=>{
|
|
1344
1378
|
const result = {
|
|
1345
1379
|
...advancedVSeed
|
|
@@ -1748,20 +1782,12 @@
|
|
|
1748
1782
|
};
|
|
1749
1783
|
return result;
|
|
1750
1784
|
};
|
|
1751
|
-
var new_data_set_AggregationType;
|
|
1752
|
-
!function(AggregationType) {
|
|
1753
|
-
AggregationType.RECORD = "RECORD", AggregationType.NONE = "NONE", AggregationType.SUM = "SUM", AggregationType.MIN = "MIN", AggregationType.MAX = "MAX", AggregationType.AVG = "AVG", AggregationType.COUNT = "COUNT", AggregationType.CUSTOM = "CUSTOM", AggregationType.RECALCULATE = "RECALCULATE";
|
|
1754
|
-
}(new_data_set_AggregationType || (new_data_set_AggregationType = {}));
|
|
1755
|
-
var new_data_set_SortType;
|
|
1756
|
-
!function(SortType) {
|
|
1757
|
-
SortType.ASC = "ASC", SortType.DESC = "DESC", SortType.NORMAL = "NORMAL", SortType.desc = "desc", SortType.asc = "asc", SortType.normal = "normal";
|
|
1758
|
-
}(new_data_set_SortType || (new_data_set_SortType = {}));
|
|
1759
1785
|
const dataConfig = (spec, context)=>{
|
|
1760
1786
|
const { advancedVSeed } = context;
|
|
1761
1787
|
const measures = findAllMeasures(advancedVSeed.measures);
|
|
1762
1788
|
const aggregationRules = measures.map((measure)=>({
|
|
1763
1789
|
field: measure.id,
|
|
1764
|
-
aggregationType:
|
|
1790
|
+
aggregationType: 'NONE',
|
|
1765
1791
|
indicatorKey: measure.id
|
|
1766
1792
|
}));
|
|
1767
1793
|
return {
|
|
@@ -2141,8 +2167,8 @@
|
|
|
2141
2167
|
applyEncoding(ColorEncoding, colorDimensions, datum, separator);
|
|
2142
2168
|
applyEncoding(DetailEncoding, detailDimensions, datum, separator);
|
|
2143
2169
|
if (!colorDimensions.length || !datum[ColorEncoding]) continue;
|
|
2144
|
-
const measureId = String(datum[foldMeasureId]);
|
|
2145
|
-
const colorItem = String(datum[ColorEncoding]);
|
|
2170
|
+
const measureId = String(datum[foldMeasureId] ?? '');
|
|
2171
|
+
const colorItem = String(datum[ColorEncoding] ?? '');
|
|
2146
2172
|
const colorId = colorItemAsId ? colorItem : measureId ? [
|
|
2147
2173
|
colorItem,
|
|
2148
2174
|
measureId
|
|
@@ -2603,18 +2629,14 @@
|
|
|
2603
2629
|
}
|
|
2604
2630
|
};
|
|
2605
2631
|
};
|
|
2606
|
-
const progressive = (spec
|
|
2632
|
+
const progressive = (spec)=>{
|
|
2607
2633
|
const result = {
|
|
2608
2634
|
...spec
|
|
2609
2635
|
};
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
const size = dataset.length;
|
|
2613
|
-
if (size < 5000) return result;
|
|
2614
|
-
result.large = true;
|
|
2615
|
-
result.largeThreshold = 5000;
|
|
2636
|
+
result.large = false;
|
|
2637
|
+
result.largeThreshold = 1 / 0;
|
|
2616
2638
|
result.progressiveStep = 400;
|
|
2617
|
-
result.progressiveThreshold =
|
|
2639
|
+
result.progressiveThreshold = 1 / 0;
|
|
2618
2640
|
return result;
|
|
2619
2641
|
};
|
|
2620
2642
|
const defaultTitleText = (measures, dimensions, idList = [])=>{
|
|
@@ -3356,7 +3378,7 @@
|
|
|
3356
3378
|
return formatter(percentValue);
|
|
3357
3379
|
};
|
|
3358
3380
|
const buildLabel = (label, vseedMeasures = [], vseedDimensions = [], advancedVSeedDimensions, advancedVSeedMeasures, encoding, foldInfoList)=>{
|
|
3359
|
-
const { enable, wrap, showValue, showValuePercent, showDimension, labelOverlap, labelColorSmartInvert, labelColor, labelFontSize, labelFontWeight, labelBackgroundColor, labelPosition, autoFormat, numFormat = {} } = label;
|
|
3381
|
+
const { enable, wrap, showValue, showValuePercent, showDimension, labelOverlap, labelColorSmartInvert, labelStroke, labelColor, labelFontSize, labelFontWeight, labelBackgroundColor, labelPosition, autoFormat, numFormat = {} } = label;
|
|
3360
3382
|
const hasDimLabelEncoding = vseedDimensions.some((item)=>encoding.label?.includes(item.id));
|
|
3361
3383
|
const labelDims = T(hasDimLabelEncoding ? vseedDimensions.filter((item)=>encoding.label?.includes(item.id)) : showDimension ? advancedVSeedDimensions.filter((d)=>d.id !== MeasureName) : [], (item)=>item.id);
|
|
3362
3384
|
const labelMeas = T(vseedMeasures.filter((item)=>encoding.label?.includes(item.id)), (item)=>item.id);
|
|
@@ -3391,6 +3413,7 @@
|
|
|
3391
3413
|
},
|
|
3392
3414
|
position: labelPosition,
|
|
3393
3415
|
style: {
|
|
3416
|
+
stroke: labelStroke,
|
|
3394
3417
|
fill: labelColor,
|
|
3395
3418
|
fontSize: labelFontSize,
|
|
3396
3419
|
fontWeight: labelFontWeight,
|
|
@@ -3994,6 +4017,8 @@
|
|
|
3994
4017
|
const headerBackgroundColor = themConfig.headerBackgroundColor ?? 'rgba(0,0,0,0)';
|
|
3995
4018
|
const hoverHeaderBackgroundColor = onlyCombination ? transparent : themConfig.hoverHeaderBackgroundColor ?? '#D9DDE4';
|
|
3996
4019
|
const hoverHeaderInlineBackgroundColor = onlyCombination ? transparent : themConfig.hoverHeaderInlineBackgroundColor ?? '#D9DDE455';
|
|
4020
|
+
const outlineBorderLineWidth = themConfig.outlineBorderLineWidth ?? 0;
|
|
4021
|
+
const frameCornerRadius = themConfig.frameCornerRadius ?? 0;
|
|
3997
4022
|
return {
|
|
3998
4023
|
...result,
|
|
3999
4024
|
theme: {
|
|
@@ -4003,8 +4028,8 @@
|
|
|
4003
4028
|
color: bodyFontColor,
|
|
4004
4029
|
borderLineWidth: [
|
|
4005
4030
|
1,
|
|
4006
|
-
|
|
4007
|
-
|
|
4031
|
+
outlineBorderLineWidth,
|
|
4032
|
+
0,
|
|
4008
4033
|
1
|
|
4009
4034
|
],
|
|
4010
4035
|
bgColor: transparent,
|
|
@@ -4015,7 +4040,12 @@
|
|
|
4015
4040
|
headerStyle: {
|
|
4016
4041
|
borderColor,
|
|
4017
4042
|
fontSize: 12,
|
|
4018
|
-
borderLineWidth:
|
|
4043
|
+
borderLineWidth: [
|
|
4044
|
+
outlineBorderLineWidth,
|
|
4045
|
+
outlineBorderLineWidth,
|
|
4046
|
+
1,
|
|
4047
|
+
1
|
|
4048
|
+
],
|
|
4019
4049
|
color: headerFontColor,
|
|
4020
4050
|
textAlign: 'center',
|
|
4021
4051
|
bgColor: headerBackgroundColor,
|
|
@@ -4029,7 +4059,12 @@
|
|
|
4029
4059
|
borderColor,
|
|
4030
4060
|
fontSize: 12,
|
|
4031
4061
|
color: headerFontColor,
|
|
4032
|
-
borderLineWidth:
|
|
4062
|
+
borderLineWidth: [
|
|
4063
|
+
1,
|
|
4064
|
+
1,
|
|
4065
|
+
1,
|
|
4066
|
+
outlineBorderLineWidth
|
|
4067
|
+
],
|
|
4033
4068
|
bgColor: headerBackgroundColor,
|
|
4034
4069
|
hover: {
|
|
4035
4070
|
cellBgColor: hoverHeaderBackgroundColor,
|
|
@@ -4043,15 +4078,20 @@
|
|
|
4043
4078
|
fontSize: 12,
|
|
4044
4079
|
color: headerFontColor,
|
|
4045
4080
|
fontWeight: 'bold',
|
|
4046
|
-
borderLineWidth:
|
|
4081
|
+
borderLineWidth: [
|
|
4082
|
+
outlineBorderLineWidth,
|
|
4083
|
+
1,
|
|
4084
|
+
1,
|
|
4085
|
+
outlineBorderLineWidth
|
|
4086
|
+
],
|
|
4047
4087
|
bgColor: headerBackgroundColor,
|
|
4048
4088
|
frameStyle: {
|
|
4049
4089
|
borderColor,
|
|
4050
4090
|
borderLineWidth: [
|
|
4051
|
-
|
|
4091
|
+
outlineBorderLineWidth,
|
|
4052
4092
|
0,
|
|
4053
4093
|
0,
|
|
4054
|
-
|
|
4094
|
+
outlineBorderLineWidth
|
|
4055
4095
|
]
|
|
4056
4096
|
},
|
|
4057
4097
|
hover: {
|
|
@@ -4066,7 +4106,7 @@
|
|
|
4066
4106
|
frameStyle: {
|
|
4067
4107
|
borderColor,
|
|
4068
4108
|
borderLineWidth: [
|
|
4069
|
-
|
|
4109
|
+
outlineBorderLineWidth,
|
|
4070
4110
|
1,
|
|
4071
4111
|
0,
|
|
4072
4112
|
1
|
|
@@ -4082,8 +4122,8 @@
|
|
|
4082
4122
|
borderLineWidth: [
|
|
4083
4123
|
1,
|
|
4084
4124
|
0,
|
|
4085
|
-
|
|
4086
|
-
|
|
4125
|
+
outlineBorderLineWidth,
|
|
4126
|
+
outlineBorderLineWidth
|
|
4087
4127
|
],
|
|
4088
4128
|
bgColor: headerBackgroundColor,
|
|
4089
4129
|
frameStyle: {
|
|
@@ -4091,8 +4131,8 @@
|
|
|
4091
4131
|
borderLineWidth: [
|
|
4092
4132
|
1,
|
|
4093
4133
|
0,
|
|
4094
|
-
|
|
4095
|
-
|
|
4134
|
+
outlineBorderLineWidth,
|
|
4135
|
+
outlineBorderLineWidth
|
|
4096
4136
|
]
|
|
4097
4137
|
},
|
|
4098
4138
|
hover: {
|
|
@@ -4126,7 +4166,12 @@
|
|
|
4126
4166
|
},
|
|
4127
4167
|
bottomFrozenStyle: {
|
|
4128
4168
|
borderColor,
|
|
4129
|
-
borderLineWidth:
|
|
4169
|
+
borderLineWidth: [
|
|
4170
|
+
1,
|
|
4171
|
+
outlineBorderLineWidth,
|
|
4172
|
+
outlineBorderLineWidth,
|
|
4173
|
+
1
|
|
4174
|
+
],
|
|
4130
4175
|
bgColor: headerBackgroundColor,
|
|
4131
4176
|
hover: {
|
|
4132
4177
|
cellBgColor: hoverHeaderBackgroundColor
|
|
@@ -4138,7 +4183,8 @@
|
|
|
4138
4183
|
},
|
|
4139
4184
|
frameStyle: {
|
|
4140
4185
|
borderColor,
|
|
4141
|
-
cornerRadius:
|
|
4186
|
+
cornerRadius: frameCornerRadius,
|
|
4187
|
+
borderLineWidth: outlineBorderLineWidth
|
|
4142
4188
|
}
|
|
4143
4189
|
}
|
|
4144
4190
|
};
|
|
@@ -4599,7 +4645,9 @@
|
|
|
4599
4645
|
'xAxis',
|
|
4600
4646
|
'yAxis',
|
|
4601
4647
|
'crosshairRect',
|
|
4602
|
-
'stackCornerRadius'
|
|
4648
|
+
'stackCornerRadius',
|
|
4649
|
+
'barMaxWidth',
|
|
4650
|
+
'barGapInGroup'
|
|
4603
4651
|
]);
|
|
4604
4652
|
const config = replaceNullToUndefined(pickedConfig);
|
|
4605
4653
|
result.config = {
|
|
@@ -4667,6 +4715,7 @@
|
|
|
4667
4715
|
const stackCornerRadius = advancedVSeed.config?.[chartType]?.stackCornerRadius;
|
|
4668
4716
|
const { datasetReshapeInfo } = advancedVSeed;
|
|
4669
4717
|
const { foldInfo } = datasetReshapeInfo[0];
|
|
4718
|
+
if ('dualAxis' === chartType && 'bar' !== spec.type) return spec;
|
|
4670
4719
|
return {
|
|
4671
4720
|
...spec,
|
|
4672
4721
|
stackCornerRadius: (_, datum)=>{
|
|
@@ -4675,6 +4724,16 @@
|
|
|
4675
4724
|
}
|
|
4676
4725
|
};
|
|
4677
4726
|
};
|
|
4727
|
+
const barMaxWidth_barMaxWidth = (spec, context)=>{
|
|
4728
|
+
const { advancedVSeed, vseed } = context;
|
|
4729
|
+
const { chartType } = vseed;
|
|
4730
|
+
const barMaxWidth = advancedVSeed.config?.[chartType]?.barMaxWidth;
|
|
4731
|
+
if (!chunk_JK3VNB42_n(barMaxWidth)) return {
|
|
4732
|
+
...spec,
|
|
4733
|
+
barMaxWidth
|
|
4734
|
+
};
|
|
4735
|
+
return spec;
|
|
4736
|
+
};
|
|
4678
4737
|
const stackInverse = (spec)=>{
|
|
4679
4738
|
const result = {
|
|
4680
4739
|
...spec
|
|
@@ -4953,6 +5012,7 @@
|
|
|
4953
5012
|
const column = [
|
|
4954
5013
|
initColumn,
|
|
4955
5014
|
stackCornerRadius_stackCornerRadius,
|
|
5015
|
+
barMaxWidth_barMaxWidth,
|
|
4956
5016
|
stackInverse,
|
|
4957
5017
|
colorAdapter(color_color, linearColor),
|
|
4958
5018
|
background_backgroundColor,
|
|
@@ -5138,9 +5198,21 @@
|
|
|
5138
5198
|
result.animation = true;
|
|
5139
5199
|
return result;
|
|
5140
5200
|
};
|
|
5201
|
+
const barGapInGroup_barGapInGroup = (spec, context)=>{
|
|
5202
|
+
const { advancedVSeed, vseed } = context;
|
|
5203
|
+
const { chartType } = vseed;
|
|
5204
|
+
const barGapInGroup = advancedVSeed.config?.[chartType]?.barGapInGroup;
|
|
5205
|
+
if (!chunk_JK3VNB42_n(barGapInGroup)) return {
|
|
5206
|
+
...spec,
|
|
5207
|
+
barGapInGroup
|
|
5208
|
+
};
|
|
5209
|
+
return spec;
|
|
5210
|
+
};
|
|
5141
5211
|
const columnParallel = [
|
|
5142
5212
|
initColumnParallel,
|
|
5143
5213
|
stackCornerRadius_stackCornerRadius,
|
|
5214
|
+
barMaxWidth_barMaxWidth,
|
|
5215
|
+
barGapInGroup_barGapInGroup,
|
|
5144
5216
|
colorAdapter(color_color, linearColor),
|
|
5145
5217
|
background_backgroundColor,
|
|
5146
5218
|
datasetXY,
|
|
@@ -5221,7 +5293,7 @@
|
|
|
5221
5293
|
markStyle_markStyle,
|
|
5222
5294
|
annotation_annotation
|
|
5223
5295
|
];
|
|
5224
|
-
const
|
|
5296
|
+
const percent_percent = (spec)=>{
|
|
5225
5297
|
const result = {
|
|
5226
5298
|
...spec
|
|
5227
5299
|
};
|
|
@@ -5232,9 +5304,10 @@
|
|
|
5232
5304
|
initColumn,
|
|
5233
5305
|
stackCornerRadius_stackCornerRadius,
|
|
5234
5306
|
stackInverse,
|
|
5307
|
+
barMaxWidth_barMaxWidth,
|
|
5235
5308
|
colorAdapter(color_color, linearColor),
|
|
5236
5309
|
background_backgroundColor,
|
|
5237
|
-
|
|
5310
|
+
percent_percent,
|
|
5238
5311
|
datasetXY,
|
|
5239
5312
|
progressive,
|
|
5240
5313
|
xBand,
|
|
@@ -5259,7 +5332,7 @@
|
|
|
5259
5332
|
stackCornerRadius_stackCornerRadius,
|
|
5260
5333
|
stackInverse,
|
|
5261
5334
|
colorAdapter(color_color, linearColor),
|
|
5262
|
-
|
|
5335
|
+
percent_percent,
|
|
5263
5336
|
background_backgroundColor,
|
|
5264
5337
|
datasetXY,
|
|
5265
5338
|
progressive,
|
|
@@ -5673,6 +5746,7 @@
|
|
|
5673
5746
|
const bar = [
|
|
5674
5747
|
initBar,
|
|
5675
5748
|
stackCornerRadius_stackCornerRadius,
|
|
5749
|
+
barMaxWidth_barMaxWidth,
|
|
5676
5750
|
colorAdapter(color_color, linearColor),
|
|
5677
5751
|
background_backgroundColor,
|
|
5678
5752
|
datasetYX,
|
|
@@ -5704,7 +5778,6 @@
|
|
|
5704
5778
|
xLinear,
|
|
5705
5779
|
yBand,
|
|
5706
5780
|
label_label,
|
|
5707
|
-
label_label,
|
|
5708
5781
|
tooltip_tooltip,
|
|
5709
5782
|
colorBarStyleFill(barStyle_barStyle),
|
|
5710
5783
|
horizontalCrosshairRect,
|
|
@@ -5785,6 +5858,8 @@
|
|
|
5785
5858
|
const barParallel = [
|
|
5786
5859
|
initBarParallel,
|
|
5787
5860
|
stackCornerRadius_stackCornerRadius,
|
|
5861
|
+
barMaxWidth_barMaxWidth,
|
|
5862
|
+
barGapInGroup_barGapInGroup,
|
|
5788
5863
|
colorAdapter(color_color, linearColor),
|
|
5789
5864
|
background_backgroundColor,
|
|
5790
5865
|
datasetYX,
|
|
@@ -5867,9 +5942,10 @@
|
|
|
5867
5942
|
const barPercent = [
|
|
5868
5943
|
initBar,
|
|
5869
5944
|
stackCornerRadius_stackCornerRadius,
|
|
5945
|
+
barMaxWidth_barMaxWidth,
|
|
5870
5946
|
colorAdapter(color_color, linearColor),
|
|
5871
5947
|
background_backgroundColor,
|
|
5872
|
-
|
|
5948
|
+
percent_percent,
|
|
5873
5949
|
datasetYX,
|
|
5874
5950
|
progressive,
|
|
5875
5951
|
xLinear,
|
|
@@ -5894,7 +5970,7 @@
|
|
|
5894
5970
|
stackCornerRadius_stackCornerRadius,
|
|
5895
5971
|
colorAdapter(color_color, linearColor),
|
|
5896
5972
|
background_backgroundColor,
|
|
5897
|
-
|
|
5973
|
+
percent_percent,
|
|
5898
5974
|
datasetYX,
|
|
5899
5975
|
yBand,
|
|
5900
5976
|
xLinear,
|
|
@@ -6147,7 +6223,7 @@
|
|
|
6147
6223
|
stackInverse,
|
|
6148
6224
|
colorAdapter(color_color, linearColor),
|
|
6149
6225
|
background_backgroundColor,
|
|
6150
|
-
|
|
6226
|
+
percent_percent,
|
|
6151
6227
|
datasetXY,
|
|
6152
6228
|
progressive,
|
|
6153
6229
|
xBand,
|
|
@@ -6175,7 +6251,7 @@
|
|
|
6175
6251
|
stackInverse,
|
|
6176
6252
|
colorAdapter(color_color, linearColor),
|
|
6177
6253
|
background_backgroundColor,
|
|
6178
|
-
|
|
6254
|
+
percent_percent,
|
|
6179
6255
|
datasetXY,
|
|
6180
6256
|
progressive,
|
|
6181
6257
|
xBand,
|
|
@@ -7109,7 +7185,10 @@
|
|
|
7109
7185
|
'primaryYAxis',
|
|
7110
7186
|
'secondaryYAxis',
|
|
7111
7187
|
'crosshairLine',
|
|
7112
|
-
'crosshairRect'
|
|
7188
|
+
'crosshairRect',
|
|
7189
|
+
'barGapInGroup',
|
|
7190
|
+
'barMaxWidth',
|
|
7191
|
+
'stackCornerRadius'
|
|
7113
7192
|
]);
|
|
7114
7193
|
const config = replaceNullToUndefined(pickedConfig);
|
|
7115
7194
|
result.config = {
|
|
@@ -7150,7 +7229,7 @@
|
|
|
7150
7229
|
markStyle_markStyle,
|
|
7151
7230
|
annotation_annotation
|
|
7152
7231
|
];
|
|
7153
|
-
const
|
|
7232
|
+
const series_series = (...args)=>{
|
|
7154
7233
|
const result = {
|
|
7155
7234
|
type: 'common',
|
|
7156
7235
|
padding: 0,
|
|
@@ -7731,6 +7810,9 @@
|
|
|
7731
7810
|
labelPrimary,
|
|
7732
7811
|
tooltipPrimary,
|
|
7733
7812
|
progressive,
|
|
7813
|
+
barMaxWidth_barMaxWidth,
|
|
7814
|
+
barGapInGroup_barGapInGroup,
|
|
7815
|
+
stackCornerRadius_stackCornerRadius,
|
|
7734
7816
|
colorBarStyleFill(barStyle_barStyle),
|
|
7735
7817
|
colorPointStyleFill(pointStyle_pointStyle),
|
|
7736
7818
|
pointStateDimensionHover,
|
|
@@ -7743,6 +7825,9 @@
|
|
|
7743
7825
|
labelSecondary,
|
|
7744
7826
|
tooltipSecondary,
|
|
7745
7827
|
progressive,
|
|
7828
|
+
barMaxWidth_barMaxWidth,
|
|
7829
|
+
barGapInGroup_barGapInGroup,
|
|
7830
|
+
stackCornerRadius_stackCornerRadius,
|
|
7746
7831
|
colorBarStyleFill(barStyle_barStyle),
|
|
7747
7832
|
colorPointStyleFill(pointStyle_pointStyle),
|
|
7748
7833
|
pointStateDimensionHover,
|
|
@@ -7767,13 +7852,16 @@
|
|
|
7767
7852
|
pivotIndicatorsAsRow,
|
|
7768
7853
|
datasetPivot,
|
|
7769
7854
|
pivotIndicators_pivotIndicators([
|
|
7770
|
-
|
|
7855
|
+
series_series([
|
|
7771
7856
|
initDualAxisPrimary,
|
|
7772
7857
|
dualChartTypePrimary,
|
|
7773
7858
|
datasetPrimary,
|
|
7774
7859
|
labelPrimary,
|
|
7775
7860
|
tooltipPrimary,
|
|
7776
7861
|
progressive,
|
|
7862
|
+
stackCornerRadius_stackCornerRadius,
|
|
7863
|
+
barMaxWidth_barMaxWidth,
|
|
7864
|
+
barGapInGroup_barGapInGroup,
|
|
7777
7865
|
colorBarStyleFill(barStyle_barStyle),
|
|
7778
7866
|
colorPointStyleFill(pointStyle_pointStyle),
|
|
7779
7867
|
pointStateDimensionHover,
|
|
@@ -7786,6 +7874,9 @@
|
|
|
7786
7874
|
labelSecondary,
|
|
7787
7875
|
tooltipSecondary,
|
|
7788
7876
|
progressive,
|
|
7877
|
+
stackCornerRadius_stackCornerRadius,
|
|
7878
|
+
barMaxWidth_barMaxWidth,
|
|
7879
|
+
barGapInGroup_barGapInGroup,
|
|
7789
7880
|
colorBarStyleFill(barStyle_barStyle),
|
|
7790
7881
|
colorPointStyleFill(pointStyle_pointStyle),
|
|
7791
7882
|
pointStateDimensionHover,
|
|
@@ -9220,99 +9311,1489 @@
|
|
|
9220
9311
|
Builder._advancedPipelineMap.heatmap = heatmapAdvancedPipeline;
|
|
9221
9312
|
Builder._specPipelineMap.heatmap = heatmapSpecPipeline;
|
|
9222
9313
|
};
|
|
9223
|
-
const
|
|
9224
|
-
|
|
9225
|
-
|
|
9226
|
-
|
|
9227
|
-
|
|
9228
|
-
|
|
9229
|
-
|
|
9230
|
-
|
|
9231
|
-
|
|
9232
|
-
|
|
9233
|
-
|
|
9234
|
-
|
|
9235
|
-
|
|
9236
|
-
|
|
9237
|
-
|
|
9238
|
-
|
|
9239
|
-
|
|
9240
|
-
|
|
9241
|
-
|
|
9242
|
-
|
|
9243
|
-
|
|
9244
|
-
|
|
9245
|
-
|
|
9246
|
-
|
|
9247
|
-
|
|
9248
|
-
|
|
9249
|
-
|
|
9250
|
-
}
|
|
9251
|
-
|
|
9252
|
-
|
|
9253
|
-
|
|
9254
|
-
|
|
9255
|
-
|
|
9256
|
-
|
|
9257
|
-
|
|
9258
|
-
|
|
9259
|
-
|
|
9260
|
-
|
|
9261
|
-
|
|
9262
|
-
|
|
9263
|
-
|
|
9264
|
-
|
|
9265
|
-
|
|
9266
|
-
|
|
9267
|
-
|
|
9268
|
-
|
|
9269
|
-
|
|
9270
|
-
|
|
9271
|
-
|
|
9272
|
-
|
|
9273
|
-
|
|
9274
|
-
|
|
9275
|
-
|
|
9276
|
-
|
|
9277
|
-
|
|
9314
|
+
const boxplotConfig = (advancedVSeed, context)=>{
|
|
9315
|
+
const { vseed } = context;
|
|
9316
|
+
const { chartType } = vseed;
|
|
9317
|
+
const result = {
|
|
9318
|
+
...advancedVSeed
|
|
9319
|
+
};
|
|
9320
|
+
const pickedConfig = chunk_2T7K3PFL_i(vseed, [
|
|
9321
|
+
'backgroundColor',
|
|
9322
|
+
'color',
|
|
9323
|
+
'label',
|
|
9324
|
+
'legend',
|
|
9325
|
+
'tooltip',
|
|
9326
|
+
'xAxis',
|
|
9327
|
+
'yAxis',
|
|
9328
|
+
'crosshairRect',
|
|
9329
|
+
'whiskers'
|
|
9330
|
+
]);
|
|
9331
|
+
const config = replaceNullToUndefined(pickedConfig);
|
|
9332
|
+
result.config = {
|
|
9333
|
+
...result.config || {},
|
|
9334
|
+
[chartType]: {
|
|
9335
|
+
...config
|
|
9336
|
+
}
|
|
9337
|
+
};
|
|
9338
|
+
return result;
|
|
9339
|
+
};
|
|
9340
|
+
const defaultEncodingForBoxplot = (advancedVSeed)=>{
|
|
9341
|
+
const { measures: vseedMeasures = [], dimensions = [] } = advancedVSeed;
|
|
9342
|
+
const measures = findAllMeasures(vseedMeasures);
|
|
9343
|
+
const encoding = {};
|
|
9344
|
+
boxplot_generateDefaultDimensionEncoding(dimensions, encoding);
|
|
9345
|
+
boxplot_generateDefaultMeasureEncoding(measures, encoding);
|
|
9346
|
+
return {
|
|
9347
|
+
...advancedVSeed,
|
|
9348
|
+
encoding
|
|
9349
|
+
};
|
|
9350
|
+
};
|
|
9351
|
+
const encodingForBoxplot = (advancedVSeed)=>{
|
|
9352
|
+
const { measures: vseedMeasures = [], dimensions = [] } = advancedVSeed;
|
|
9353
|
+
const measures = findAllMeasures(vseedMeasures);
|
|
9354
|
+
const hasDimensionEncoding = dimensions.some((item)=>item.encoding);
|
|
9355
|
+
const hasMeasureEncoding = measures.some((item)=>item.encoding);
|
|
9356
|
+
const encoding = {};
|
|
9357
|
+
if (hasDimensionEncoding) boxplot_generateDimensionEncoding(dimensions, encoding, measures.length > 1);
|
|
9358
|
+
else boxplot_generateDefaultDimensionEncoding(dimensions, encoding);
|
|
9359
|
+
if (hasMeasureEncoding) boxplot_generateMeasureEncoding(measures, encoding);
|
|
9360
|
+
else boxplot_generateDefaultMeasureEncoding(measures, encoding);
|
|
9361
|
+
if ((!encoding.value || encoding.value.length <= 1) && encoding.color && encoding.color.length > 1) encoding.color = encoding.color.filter((c)=>c !== MeasureName);
|
|
9362
|
+
return {
|
|
9363
|
+
...advancedVSeed,
|
|
9364
|
+
encoding
|
|
9365
|
+
};
|
|
9366
|
+
};
|
|
9367
|
+
const boxplot_generateDefaultDimensionEncoding = (dimensions, encoding)=>{
|
|
9368
|
+
const onlyMeasureName = 1 === dimensions.length && dimensions.find((item)=>item.id === MeasureName);
|
|
9369
|
+
const uniqueDimIds = chunk_QJLMYOTX_i(dimensions.map((d)=>d.id));
|
|
9370
|
+
encoding.x = uniqueDimIds.slice(0, 1);
|
|
9371
|
+
encoding.color = uniqueDimIds.slice(onlyMeasureName ? 0 : 1);
|
|
9372
|
+
encoding.tooltip = uniqueDimIds.filter((d)=>d !== MeasureName);
|
|
9373
|
+
encoding.label = [];
|
|
9374
|
+
encoding.row = [];
|
|
9375
|
+
encoding.column = [];
|
|
9376
|
+
};
|
|
9377
|
+
const boxplot_generateDimensionEncoding = (dimensions, encoding, isMultiMeasure)=>{
|
|
9378
|
+
encoding.x = chunk_QJLMYOTX_i(dimensions.filter((item)=>'xAxis' === item.encoding).map((item)=>item.id));
|
|
9379
|
+
if (0 === encoding.x.length) encoding.x = [
|
|
9380
|
+
dimensions[0].id
|
|
9278
9381
|
];
|
|
9279
|
-
|
|
9280
|
-
|
|
9281
|
-
|
|
9382
|
+
addColorToEncoding(dimensions, encoding, isMultiMeasure);
|
|
9383
|
+
encoding.tooltip = chunk_QJLMYOTX_i(dimensions.map((item)=>item.id));
|
|
9384
|
+
encoding.tooltip = encoding.tooltip.filter((d)=>d !== MeasureName);
|
|
9385
|
+
encoding.label = chunk_QJLMYOTX_i(dimensions.filter((item)=>'label' === item.encoding).map((item)=>item.id));
|
|
9386
|
+
encoding.label = encoding.label.filter((d)=>d !== MeasureName);
|
|
9387
|
+
};
|
|
9388
|
+
const boxplot_generateDefaultMeasureEncoding = (measures, encoding)=>{
|
|
9389
|
+
encoding.value = chunk_QJLMYOTX_i(measures.filter((item)=>'value' === item.encoding || !item.encoding).map((item)=>item.id));
|
|
9390
|
+
};
|
|
9391
|
+
const boxplot_generateMeasureEncoding = (measures, encoding)=>{
|
|
9392
|
+
encoding.value = chunk_QJLMYOTX_i(measures.filter((item)=>'value' === item.encoding || !item.encoding).map((item)=>item.id));
|
|
9393
|
+
encoding.q1 = chunk_QJLMYOTX_i(measures.filter((item)=>'q1' === item.encoding).map((item)=>item.id));
|
|
9394
|
+
encoding.median = chunk_QJLMYOTX_i(measures.filter((item)=>'median' === item.encoding).map((item)=>item.id));
|
|
9395
|
+
encoding.q3 = chunk_QJLMYOTX_i(measures.filter((item)=>'q3' === item.encoding).map((item)=>item.id));
|
|
9396
|
+
encoding.min = chunk_QJLMYOTX_i(measures.filter((item)=>'min' === item.encoding).map((item)=>item.id));
|
|
9397
|
+
encoding.max = chunk_QJLMYOTX_i(measures.filter((item)=>'max' === item.encoding).map((item)=>item.id));
|
|
9398
|
+
encoding.outliers = chunk_QJLMYOTX_i(measures.filter((item)=>'outliers' === item.encoding).map((item)=>item.id));
|
|
9399
|
+
const color = chunk_QJLMYOTX_i(measures.filter((item)=>'color' === item.encoding).map((item)=>item.id));
|
|
9400
|
+
if (color.length > 0) encoding.color = color;
|
|
9401
|
+
const label = chunk_QJLMYOTX_i(measures.filter((item)=>'label' === item.encoding).map((item)=>item.id));
|
|
9402
|
+
encoding.label = chunk_QJLMYOTX_i([
|
|
9403
|
+
...encoding.label || [],
|
|
9404
|
+
...label
|
|
9405
|
+
]);
|
|
9406
|
+
const tooltip = chunk_QJLMYOTX_i(measures.filter((item)=>'tooltip' === item.encoding).map((item)=>item.id));
|
|
9407
|
+
encoding.tooltip = chunk_QJLMYOTX_i([
|
|
9408
|
+
...encoding.tooltip || [],
|
|
9409
|
+
...label,
|
|
9410
|
+
...tooltip
|
|
9411
|
+
]);
|
|
9412
|
+
};
|
|
9413
|
+
const isType_isType = (value, type)=>Object.prototype.toString.call(value) === `[object ${type}]`;
|
|
9414
|
+
const isType = isType_isType;
|
|
9415
|
+
const isArray = (value)=>Array.isArray ? Array.isArray(value) : isType(value, "Array");
|
|
9416
|
+
const common_isArray = isArray;
|
|
9417
|
+
const isNil = (value)=>null == value;
|
|
9418
|
+
const common_isNil = isNil;
|
|
9419
|
+
const clamp_clamp = function(input, min, max) {
|
|
9420
|
+
return input < min ? min : input > max ? max : input;
|
|
9421
|
+
};
|
|
9422
|
+
const clamp = clamp_clamp;
|
|
9423
|
+
function toNumber(a) {
|
|
9424
|
+
return Number(a);
|
|
9425
|
+
}
|
|
9426
|
+
function quantileSorted(values, percent, valueof = toNumber) {
|
|
9427
|
+
const n = values.length;
|
|
9428
|
+
if (!n) return;
|
|
9429
|
+
if (percent <= 0 || n < 2) return valueof(values[0], 0, values);
|
|
9430
|
+
if (percent >= 1) return valueof(values[n - 1], n - 1, values);
|
|
9431
|
+
const i = (n - 1) * percent, i0 = Math.floor(i), value0 = valueof(values[i0], i0, values);
|
|
9432
|
+
return value0 + (valueof(values[i0 + 1], i0 + 1, values) - value0) * (i - i0);
|
|
9433
|
+
}
|
|
9434
|
+
const boxplot_boxplot = (data, options)=>{
|
|
9435
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
9436
|
+
const field = null == options ? void 0 : options.field;
|
|
9437
|
+
if (!field) return [];
|
|
9438
|
+
const groupField = null == options ? void 0 : options.groupField;
|
|
9439
|
+
let whiskers = null != (_a = null == options ? void 0 : options.whiskers) ? _a : 1.5;
|
|
9440
|
+
const includeValues = !!(null == options ? void 0 : options.includeValues), names = null != (_b = null == options ? void 0 : options.outputNames) ? _b : {}, keyName = null != (_c = names.key) ? _c : common_isArray(groupField) ? null : null != (_d = groupField) ? _d : "key", countName = null != (_e = names.count) ? _e : "count", meanName = null != (_f = names.mean) ? _f : "mean", q1Name = null != (_g = names.q1) ? _g : "q1", medianName = null != (_h = names.median) ? _h : "median", q3Name = null != (_j = names.q3) ? _j : "q3", iqrName = null != (_k = names.iqr) ? _k : "iqr", minName = null != (_l = names.min) ? _l : "min", maxName = null != (_m = names.max) ? _m : "max", lowerWhiskerName = null != (_o = names.lowerWhisker) ? _o : "lowerWhisker", upperWhiskerName = null != (_p = names.upperWhisker) ? _p : "upperWhisker", outliersName = null != (_q = names.outliers) ? _q : "outliers", valuesName = null != (_r = names.values) ? _r : "values", groups = new Map, rawValues = new Map, keyToGroup = new Map, n = data.length;
|
|
9441
|
+
for(let i = 0; i < n; i++){
|
|
9442
|
+
const d = data[i], v = d[field];
|
|
9443
|
+
if (common_isNil(v)) continue;
|
|
9444
|
+
const num = +v;
|
|
9445
|
+
if (!Number.isFinite(num)) continue;
|
|
9446
|
+
let key;
|
|
9447
|
+
key = common_isArray(groupField) ? groupField.map((f)=>String(d[f])).join("||") : groupField ? String(d[groupField]) : "___all", groups.has(key) || (groups.set(key, []), includeValues && rawValues.set(key, []), common_isArray(groupField) ? keyToGroup.set(key, Object.fromEntries(groupField.map((f)=>[
|
|
9448
|
+
f,
|
|
9449
|
+
d[f]
|
|
9450
|
+
]))) : keyToGroup.set(key, groupField ? d[groupField] : null));
|
|
9451
|
+
const arr = groups.get(key);
|
|
9452
|
+
if (arr && arr.push(num), includeValues) {
|
|
9453
|
+
const rv = rawValues.get(key);
|
|
9454
|
+
rv && rv.push(d);
|
|
9455
|
+
}
|
|
9456
|
+
}
|
|
9457
|
+
if (common_isArray(whiskers)) whiskers = [
|
|
9458
|
+
clamp(Math.min.apply(null, whiskers), 0, 1),
|
|
9459
|
+
clamp(Math.max.apply(null, whiskers), 0, 1)
|
|
9282
9460
|
];
|
|
9283
|
-
|
|
9284
|
-
|
|
9285
|
-
|
|
9286
|
-
|
|
9287
|
-
|
|
9288
|
-
|
|
9289
|
-
|
|
9290
|
-
|
|
9291
|
-
|
|
9292
|
-
|
|
9293
|
-
|
|
9294
|
-
|
|
9295
|
-
|
|
9296
|
-
|
|
9297
|
-
|
|
9298
|
-
|
|
9299
|
-
|
|
9300
|
-
|
|
9301
|
-
|
|
9302
|
-
|
|
9303
|
-
|
|
9304
|
-
|
|
9305
|
-
|
|
9306
|
-
|
|
9307
|
-
|
|
9461
|
+
const out = [];
|
|
9462
|
+
for (const [key, vals] of groups){
|
|
9463
|
+
if (!vals || 0 === vals.length) continue;
|
|
9464
|
+
const sorted = vals.slice().sort((a, b)=>a - b), count = sorted.length, dataMin = sorted[0], dataMax = sorted[sorted.length - 1];
|
|
9465
|
+
let sum = 0;
|
|
9466
|
+
for(let i = 0; i < sorted.length; i++)sum += sorted[i];
|
|
9467
|
+
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;
|
|
9468
|
+
let lowerWhisker = dataMin;
|
|
9469
|
+
for(let i = 0; i < sorted.length; i++)if (sorted[i] >= lowerBound) {
|
|
9470
|
+
lowerWhisker = sorted[i];
|
|
9471
|
+
break;
|
|
9472
|
+
}
|
|
9473
|
+
let upperWhisker = dataMax;
|
|
9474
|
+
for(let i = sorted.length - 1; i >= 0; i--)if (sorted[i] <= upperBound) {
|
|
9475
|
+
upperWhisker = sorted[i];
|
|
9476
|
+
break;
|
|
9477
|
+
}
|
|
9478
|
+
const outliers = [];
|
|
9479
|
+
for(let i = 0; i < sorted.length; i++)(sorted[i] < lowerWhisker || sorted[i] > upperWhisker) && outliers.push(sorted[i]);
|
|
9480
|
+
const obj = {}, representative = keyToGroup.get(key);
|
|
9481
|
+
if (null !== keyName) obj[keyName] = representative;
|
|
9482
|
+
else if (common_isArray(groupField)) {
|
|
9483
|
+
const groupObj = representative || {};
|
|
9484
|
+
for (const f of groupField)obj[f] = groupObj[f];
|
|
9485
|
+
}
|
|
9486
|
+
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] = lowerWhisker, obj[upperWhiskerName] = upperWhisker, obj[outliersName] = outliers, includeValues && (obj[valuesName] = rawValues.get(key) || []), out.push(obj);
|
|
9487
|
+
}
|
|
9488
|
+
return out;
|
|
9489
|
+
};
|
|
9490
|
+
const reshapeWithBoxplotEncoding = (advancedVSeed, context)=>{
|
|
9491
|
+
const result = {
|
|
9492
|
+
...advancedVSeed
|
|
9493
|
+
};
|
|
9494
|
+
const { vseed } = context;
|
|
9495
|
+
const { dataset, chartType } = vseed;
|
|
9496
|
+
const { dimensions = [], measures = [], encoding = {}, config } = advancedVSeed;
|
|
9497
|
+
const uniqDims = T(dimensions, (item)=>item.id);
|
|
9498
|
+
const whiskers = config?.[chartType]?.whiskers;
|
|
9499
|
+
let newDatasets = [];
|
|
9500
|
+
let foldInfo = {};
|
|
9501
|
+
let unfoldInfo = {};
|
|
9502
|
+
const allMeasures = findAllMeasures(measures);
|
|
9503
|
+
if (encoding.value?.length) encoding.value.forEach((f)=>{
|
|
9504
|
+
const m = allMeasures.find((m)=>m.id === f);
|
|
9505
|
+
const boxPlotData = boxplot_boxplot(dataset, {
|
|
9506
|
+
field: f,
|
|
9507
|
+
groupField: [
|
|
9508
|
+
...encoding.x ?? [],
|
|
9509
|
+
...encoding.color ?? []
|
|
9510
|
+
],
|
|
9511
|
+
whiskers,
|
|
9512
|
+
outputNames: {
|
|
9513
|
+
q1: "__Q1__",
|
|
9514
|
+
q3: "__Q3__",
|
|
9515
|
+
min: MinMeasureId,
|
|
9516
|
+
max: MaxMeasureId,
|
|
9517
|
+
median: MedianMeasureId,
|
|
9518
|
+
outliers: OutliersMeasureId
|
|
9519
|
+
}
|
|
9520
|
+
});
|
|
9521
|
+
boxPlotData.forEach((datum)=>{
|
|
9522
|
+
datum[FoldMeasureId] = f;
|
|
9523
|
+
datum[FoldMeasureName] = m?.alias ?? f;
|
|
9524
|
+
});
|
|
9525
|
+
const res = unfoldDimensions(boxPlotData, uniqDims, encoding, {
|
|
9526
|
+
foldMeasureId: FoldMeasureId,
|
|
9527
|
+
separator: "-",
|
|
9528
|
+
colorItemAsId: false
|
|
9529
|
+
});
|
|
9530
|
+
res.dataset.forEach((d)=>{
|
|
9531
|
+
newDatasets.push(d);
|
|
9532
|
+
});
|
|
9533
|
+
unfoldInfo = res.unfoldInfo;
|
|
9308
9534
|
});
|
|
9309
|
-
|
|
9310
|
-
|
|
9311
|
-
|
|
9312
|
-
|
|
9313
|
-
|
|
9314
|
-
|
|
9315
|
-
|
|
9535
|
+
else if (encoding.q1?.length && encoding.q3?.length && encoding.min?.length && encoding.max?.length && encoding.median?.length) {
|
|
9536
|
+
const res = unfoldDimensions(dataset, uniqDims, encoding, {
|
|
9537
|
+
foldMeasureId: FoldMeasureId,
|
|
9538
|
+
separator: "-",
|
|
9539
|
+
colorItemAsId: false
|
|
9540
|
+
});
|
|
9541
|
+
res.dataset.forEach((datum)=>{
|
|
9542
|
+
datum[MaxMeasureId] = datum[encoding.max[0]];
|
|
9543
|
+
datum[MinMeasureId] = datum[encoding.min[0]];
|
|
9544
|
+
datum["__Q1__"] = datum[encoding.q1[0]];
|
|
9545
|
+
datum["__Q3__"] = datum[encoding.q3[0]];
|
|
9546
|
+
datum[MedianMeasureId] = datum[encoding.median[0]];
|
|
9547
|
+
});
|
|
9548
|
+
newDatasets = res.dataset;
|
|
9549
|
+
foldInfo = {};
|
|
9550
|
+
unfoldInfo = res.unfoldInfo;
|
|
9551
|
+
}
|
|
9552
|
+
return {
|
|
9553
|
+
...result,
|
|
9554
|
+
dataset: newDatasets,
|
|
9555
|
+
datasetReshapeInfo: [
|
|
9556
|
+
{
|
|
9557
|
+
id: String(chartType),
|
|
9558
|
+
index: 0,
|
|
9559
|
+
foldInfo,
|
|
9560
|
+
unfoldInfo
|
|
9561
|
+
}
|
|
9562
|
+
],
|
|
9563
|
+
dimensions,
|
|
9564
|
+
measures
|
|
9565
|
+
};
|
|
9566
|
+
};
|
|
9567
|
+
const pivotReshapeWithBoxplotEncoding = (advancedVSeed, context)=>{
|
|
9568
|
+
const result = {
|
|
9569
|
+
...advancedVSeed
|
|
9570
|
+
};
|
|
9571
|
+
const { vseed } = context;
|
|
9572
|
+
const { dataset, chartType } = vseed;
|
|
9573
|
+
const { dimensions = [], measures = [], encoding = {}, config } = advancedVSeed;
|
|
9574
|
+
const uniqDims = T(dimensions, (item)=>item.id);
|
|
9575
|
+
const chartConfig = config?.[chartType];
|
|
9576
|
+
const whiskers = chartConfig?.whiskers;
|
|
9577
|
+
const measureGroups = [];
|
|
9578
|
+
if (measures) measures.forEach((measure)=>{
|
|
9579
|
+
if (measure.children && measure.children.length > 0) measureGroups.push(measure);
|
|
9580
|
+
});
|
|
9581
|
+
const rowColumnFields = T(dimensions.filter((dim)=>'row' === dim.encoding || 'column' === dim.encoding), (item)=>item.id);
|
|
9582
|
+
const datasets = [];
|
|
9583
|
+
const datasetReshapeInfo = [];
|
|
9584
|
+
measureGroups.forEach((measureGroup, index)=>{
|
|
9585
|
+
const subMeasures = measureGroup.children;
|
|
9586
|
+
if (!subMeasures) return;
|
|
9587
|
+
const groupId = measureGroup.id;
|
|
9588
|
+
let newDatasets = [];
|
|
9589
|
+
let foldInfo = {};
|
|
9590
|
+
let unfoldInfo = {};
|
|
9591
|
+
if (encoding.value?.length) encoding.value.forEach((f)=>{
|
|
9592
|
+
const m = subMeasures.find((m)=>m.id === f);
|
|
9593
|
+
const boxPlotData = boxplot_boxplot(dataset, {
|
|
9594
|
+
field: f,
|
|
9595
|
+
groupField: [
|
|
9596
|
+
...encoding.x ?? [],
|
|
9597
|
+
...encoding.color ?? [],
|
|
9598
|
+
...rowColumnFields.map((item)=>item.id)
|
|
9599
|
+
],
|
|
9600
|
+
whiskers,
|
|
9601
|
+
outputNames: {
|
|
9602
|
+
q1: "__Q1__",
|
|
9603
|
+
q3: "__Q3__",
|
|
9604
|
+
min: MinMeasureId,
|
|
9605
|
+
max: MaxMeasureId,
|
|
9606
|
+
median: MedianMeasureId,
|
|
9607
|
+
outliers: OutliersMeasureId
|
|
9608
|
+
}
|
|
9609
|
+
});
|
|
9610
|
+
boxPlotData.forEach((datum)=>{
|
|
9611
|
+
datum[FoldMeasureId] = f;
|
|
9612
|
+
datum[FoldMeasureName] = m?.alias ?? f;
|
|
9613
|
+
});
|
|
9614
|
+
const res = unfoldDimensions(boxPlotData, uniqDims, encoding, {
|
|
9615
|
+
foldMeasureId: FoldMeasureId,
|
|
9616
|
+
separator: "-",
|
|
9617
|
+
colorItemAsId: false
|
|
9618
|
+
});
|
|
9619
|
+
res.dataset.forEach((d)=>{
|
|
9620
|
+
newDatasets.push(d);
|
|
9621
|
+
});
|
|
9622
|
+
unfoldInfo = res.unfoldInfo;
|
|
9623
|
+
});
|
|
9624
|
+
else if (encoding.q1?.length && encoding.q3?.length && encoding.min?.length && encoding.max?.length && encoding.median?.length) {
|
|
9625
|
+
const res = unfoldDimensions(dataset, uniqDims, encoding, {
|
|
9626
|
+
foldMeasureId: FoldMeasureId,
|
|
9627
|
+
separator: "-",
|
|
9628
|
+
colorItemAsId: false
|
|
9629
|
+
});
|
|
9630
|
+
res.dataset.forEach((datum)=>{
|
|
9631
|
+
datum[MaxMeasureId] = datum[encoding.max[0]];
|
|
9632
|
+
datum[MinMeasureId] = datum[encoding.min[0]];
|
|
9633
|
+
datum["__Q1__"] = datum[encoding.q1[0]];
|
|
9634
|
+
datum["__Q3__"] = datum[encoding.q3[0]];
|
|
9635
|
+
datum[MedianMeasureId] = datum[encoding.median[0]];
|
|
9636
|
+
});
|
|
9637
|
+
newDatasets = res.dataset;
|
|
9638
|
+
foldInfo = {};
|
|
9639
|
+
unfoldInfo = res.unfoldInfo;
|
|
9640
|
+
}
|
|
9641
|
+
const reshapeInfo = {
|
|
9642
|
+
id: groupId,
|
|
9643
|
+
index,
|
|
9644
|
+
foldInfo,
|
|
9645
|
+
unfoldInfo
|
|
9646
|
+
};
|
|
9647
|
+
datasets.push(newDatasets);
|
|
9648
|
+
datasetReshapeInfo.push(reshapeInfo);
|
|
9649
|
+
});
|
|
9650
|
+
console.log(datasets);
|
|
9651
|
+
return {
|
|
9652
|
+
...result,
|
|
9653
|
+
dataset: datasets,
|
|
9654
|
+
datasetReshapeInfo: datasetReshapeInfo
|
|
9655
|
+
};
|
|
9656
|
+
};
|
|
9657
|
+
const boxplotAdvancedPipeline = [
|
|
9658
|
+
initAdvancedVSeed_initAdvancedVSeed,
|
|
9659
|
+
default_defaultMeasures_defaultMeasures,
|
|
9660
|
+
defaultDimensions_defaultDimensions,
|
|
9661
|
+
defaultMeasureName_defaultMeasureName,
|
|
9662
|
+
boxplotConfig,
|
|
9663
|
+
encodingAdapter([
|
|
9664
|
+
defaultEncodingForBoxplot,
|
|
9665
|
+
buildMeasures
|
|
9666
|
+
], [
|
|
9667
|
+
encodingForBoxplot,
|
|
9668
|
+
buildMeasures,
|
|
9669
|
+
deleteEncodingForMeasure([
|
|
9670
|
+
'tooltip',
|
|
9671
|
+
'label',
|
|
9672
|
+
'color'
|
|
9673
|
+
]),
|
|
9674
|
+
deleteTooltipAndLabelDimension
|
|
9675
|
+
]),
|
|
9676
|
+
pivotAdapter([
|
|
9677
|
+
reshapeWithBoxplotEncoding
|
|
9678
|
+
], [
|
|
9679
|
+
pivotReshapeWithBoxplotEncoding
|
|
9680
|
+
]),
|
|
9681
|
+
sortLegend_sortLegend,
|
|
9682
|
+
theme_theme,
|
|
9683
|
+
markStyle_markStyle,
|
|
9684
|
+
annotation_annotation
|
|
9685
|
+
];
|
|
9686
|
+
const initBoxplot = (spec, context)=>{
|
|
9687
|
+
const result = {
|
|
9688
|
+
...spec
|
|
9689
|
+
};
|
|
9690
|
+
const { advancedVSeed } = context;
|
|
9691
|
+
const { datasetReshapeInfo, encoding } = advancedVSeed;
|
|
9692
|
+
const { unfoldInfo } = datasetReshapeInfo[0];
|
|
9693
|
+
result.type = 'boxPlot';
|
|
9694
|
+
result.minField = MinMeasureId;
|
|
9695
|
+
result.q1Field = "__Q1__";
|
|
9696
|
+
result.medianField = MedianMeasureId;
|
|
9697
|
+
result.maxField = MaxMeasureId;
|
|
9698
|
+
result.q3Field = "__Q3__";
|
|
9699
|
+
result.outliersField = OutliersMeasureId;
|
|
9700
|
+
result.xField = [
|
|
9701
|
+
unfoldInfo.encodingX
|
|
9702
|
+
];
|
|
9703
|
+
result.seriesField = unfoldInfo.encodingColorId;
|
|
9704
|
+
const sameDimensionsMode = chunk_HGKLN5KY_k(encoding.x, encoding.color);
|
|
9705
|
+
if (!sameDimensionsMode) {
|
|
9706
|
+
result.xField.push(unfoldInfo.encodingColor);
|
|
9707
|
+
if (encoding.color?.[0] === MeasureName && encoding.value?.length === 1) result.xField.pop();
|
|
9708
|
+
}
|
|
9709
|
+
result.padding = 0;
|
|
9710
|
+
result.region = [
|
|
9711
|
+
{
|
|
9712
|
+
clip: true
|
|
9713
|
+
}
|
|
9714
|
+
];
|
|
9715
|
+
result.animation = true;
|
|
9716
|
+
return result;
|
|
9717
|
+
};
|
|
9718
|
+
const datasetBoxplot = (spec, context)=>{
|
|
9719
|
+
const { advancedVSeed, vseed } = context;
|
|
9720
|
+
const { datasetReshapeInfo } = advancedVSeed;
|
|
9721
|
+
const { id } = datasetReshapeInfo[0];
|
|
9722
|
+
const fields = {};
|
|
9723
|
+
return {
|
|
9724
|
+
...spec,
|
|
9725
|
+
data: {
|
|
9726
|
+
id,
|
|
9727
|
+
values: isPivotChart(vseed) ? void 0 : advancedVSeed.dataset.flat(),
|
|
9728
|
+
fields: fields
|
|
9729
|
+
}
|
|
9730
|
+
};
|
|
9731
|
+
};
|
|
9732
|
+
const boxPlotMeasureKeys = [
|
|
9733
|
+
MaxMeasureId,
|
|
9734
|
+
"__Q3__",
|
|
9735
|
+
MedianMeasureId,
|
|
9736
|
+
"__Q1__",
|
|
9737
|
+
MinMeasureId
|
|
9738
|
+
];
|
|
9739
|
+
const VCHART_OUTLIER_KEY = '__VCHART_BOX_PLOT_OUTLIER_VALUE';
|
|
9740
|
+
const tooltipBoxplot = (spec, context)=>{
|
|
9741
|
+
const result = {
|
|
9742
|
+
...spec
|
|
9743
|
+
};
|
|
9744
|
+
const { advancedVSeed, vseed } = context;
|
|
9745
|
+
const { chartType, dimensions, encoding } = advancedVSeed;
|
|
9746
|
+
const baseConfig = advancedVSeed.config[chartType];
|
|
9747
|
+
const { tooltip = {
|
|
9748
|
+
enable: true
|
|
9749
|
+
} } = baseConfig;
|
|
9750
|
+
const { enable } = tooltip;
|
|
9751
|
+
const meas = findAllMeasures(vseed.measures);
|
|
9752
|
+
const valueMeasure = meas.find((item)=>'value' === item.encoding || chunk_JK3VNB42_n(item.encoding));
|
|
9753
|
+
const defaultFormatter = valueMeasure ? createFormatterByMeasure(valueMeasure) : (v)=>v;
|
|
9754
|
+
result.tooltip = {
|
|
9755
|
+
visible: enable,
|
|
9756
|
+
mark: {
|
|
9757
|
+
title: {
|
|
9758
|
+
visible: false
|
|
9759
|
+
},
|
|
9760
|
+
content: tooltipBoxplot_createMarkContent(encoding.tooltip || [], dimensions, encoding),
|
|
9761
|
+
updateContent: (prev, data)=>{
|
|
9762
|
+
const datum = data?.[0]?.datum?.[0];
|
|
9763
|
+
if (!chunk_JK3VNB42_n(datum?.[VCHART_OUTLIER_KEY])) {
|
|
9764
|
+
const tooltipItems = (prev ?? []).filter((item)=>!boxPlotMeasureKeys.includes(item.key));
|
|
9765
|
+
const outerlierMeasure = meas.find((item)=>item.id === OutliersMeasureId);
|
|
9766
|
+
const formatter = outerlierMeasure ? createFormatterByMeasure(outerlierMeasure) : defaultFormatter;
|
|
9767
|
+
tooltipItems.push({
|
|
9768
|
+
...tooltipItems[0],
|
|
9769
|
+
key: outerlierMeasure?.alias ?? OutliersMeasureId,
|
|
9770
|
+
value: formatter(datum?.[VCHART_OUTLIER_KEY])
|
|
9771
|
+
});
|
|
9772
|
+
return tooltipItems;
|
|
9773
|
+
}
|
|
9774
|
+
return (prev ?? []).map((entry)=>{
|
|
9775
|
+
if (boxPlotMeasureKeys.includes(entry.key)) {
|
|
9776
|
+
const mea = meas.find((item)=>item.id === entry.key);
|
|
9777
|
+
const formatter = mea ? createFormatterByMeasure(mea) : defaultFormatter;
|
|
9778
|
+
return {
|
|
9779
|
+
...entry,
|
|
9780
|
+
value: formatter(datum?.[entry.key]),
|
|
9781
|
+
key: mea?.alias ?? entry.key
|
|
9782
|
+
};
|
|
9783
|
+
}
|
|
9784
|
+
return entry;
|
|
9785
|
+
});
|
|
9786
|
+
}
|
|
9787
|
+
},
|
|
9788
|
+
dimension: {
|
|
9789
|
+
visible: false
|
|
9790
|
+
}
|
|
9791
|
+
};
|
|
9792
|
+
return result;
|
|
9793
|
+
};
|
|
9794
|
+
const tooltipBoxplot_createMarkContent = (tooltip, dimensions, encoding)=>{
|
|
9795
|
+
const dims = C(dimensions.filter((item)=>tooltip.includes(item.id)), T((item)=>item.id), T((item)=>item.alias));
|
|
9796
|
+
const dimContent = dims.map((item)=>({
|
|
9797
|
+
visible: true,
|
|
9798
|
+
hasShape: true,
|
|
9799
|
+
shapeType: 'rectRound',
|
|
9800
|
+
key: item.alias ?? item.id,
|
|
9801
|
+
value: (datum)=>{
|
|
9802
|
+
if (!chunk_JK3VNB42_n(datum?.[VCHART_OUTLIER_KEY])) {
|
|
9803
|
+
if (encoding.color?.includes(item.id)) return datum?.[ColorEncoding];
|
|
9804
|
+
if (encoding.x?.includes(item.id)) return datum?.[XEncoding];
|
|
9805
|
+
}
|
|
9806
|
+
return datum?.[item.id];
|
|
9807
|
+
}
|
|
9808
|
+
}));
|
|
9809
|
+
const defaultContent = boxPlotMeasureKeys.map((key)=>({
|
|
9810
|
+
visible: true,
|
|
9811
|
+
hasShape: true,
|
|
9812
|
+
shapeType: 'rectRound',
|
|
9813
|
+
key,
|
|
9814
|
+
value: (datum)=>{
|
|
9815
|
+
if (!datum) return '';
|
|
9816
|
+
return datum[key];
|
|
9817
|
+
}
|
|
9818
|
+
}));
|
|
9819
|
+
return [
|
|
9820
|
+
...dimContent,
|
|
9821
|
+
defaultContent
|
|
9822
|
+
];
|
|
9823
|
+
};
|
|
9824
|
+
const pipeline_boxplot_boxplot = [
|
|
9825
|
+
initBoxplot,
|
|
9826
|
+
stackCornerRadius_stackCornerRadius,
|
|
9827
|
+
colorAdapter(color_color, linearColor),
|
|
9828
|
+
background_backgroundColor,
|
|
9829
|
+
datasetBoxplot,
|
|
9830
|
+
progressive,
|
|
9831
|
+
xBand,
|
|
9832
|
+
yLinear,
|
|
9833
|
+
label_label,
|
|
9834
|
+
tooltipBoxplot,
|
|
9835
|
+
colorAdapter(discreteLegend, colorLegend),
|
|
9836
|
+
verticalCrosshairRect,
|
|
9837
|
+
colorBarStyleFill(barStyle_barStyle),
|
|
9838
|
+
annotationPoint_annotationPoint,
|
|
9839
|
+
annotationVerticalLine_annotationVerticalLine,
|
|
9840
|
+
annotationHorizontalLine_annotationHorizontalLine,
|
|
9841
|
+
annotationAreaBand
|
|
9842
|
+
];
|
|
9843
|
+
const pivotBoxplot = [
|
|
9844
|
+
initPivot,
|
|
9845
|
+
pivotGridStyle,
|
|
9846
|
+
datasetPivot,
|
|
9847
|
+
pivotIndicators_pivotIndicators([
|
|
9848
|
+
initBoxplot,
|
|
9849
|
+
stackCornerRadius_stackCornerRadius,
|
|
9850
|
+
colorAdapter(color_color, linearColor),
|
|
9851
|
+
background_backgroundColor,
|
|
9852
|
+
datasetBoxplot,
|
|
9853
|
+
progressive,
|
|
9854
|
+
xBand,
|
|
9855
|
+
yLinear,
|
|
9856
|
+
label_label,
|
|
9857
|
+
tooltipBoxplot,
|
|
9858
|
+
colorBarStyleFill(barStyle_barStyle),
|
|
9859
|
+
verticalCrosshairRect,
|
|
9860
|
+
annotationPoint_annotationPoint,
|
|
9861
|
+
annotationVerticalLine_annotationVerticalLine,
|
|
9862
|
+
annotationHorizontalLine_annotationHorizontalLine,
|
|
9863
|
+
annotationAreaBand
|
|
9864
|
+
]),
|
|
9865
|
+
pivotRowDimensions,
|
|
9866
|
+
pivotColumnDimensions,
|
|
9867
|
+
colorAdapter(pivotDiscreteLegend, pivotColorLegend)
|
|
9868
|
+
];
|
|
9869
|
+
const boxplotSpecPipeline = [
|
|
9870
|
+
pivotAdapter_pivotAdapter(pipeline_boxplot_boxplot, pivotBoxplot)
|
|
9871
|
+
];
|
|
9872
|
+
const registerBoxplot = ()=>{
|
|
9873
|
+
Builder._advancedPipelineMap.boxPlot = boxplotAdvancedPipeline;
|
|
9874
|
+
Builder._specPipelineMap.boxPlot = boxplotSpecPipeline;
|
|
9875
|
+
};
|
|
9876
|
+
const histogramConfig = (advancedVSeed, context)=>{
|
|
9877
|
+
const { vseed } = context;
|
|
9878
|
+
const { chartType } = vseed;
|
|
9879
|
+
const result = {
|
|
9880
|
+
...advancedVSeed
|
|
9881
|
+
};
|
|
9882
|
+
const pickedConfig = chunk_2T7K3PFL_i(vseed, [
|
|
9883
|
+
'backgroundColor',
|
|
9884
|
+
'color',
|
|
9885
|
+
'label',
|
|
9886
|
+
'legend',
|
|
9887
|
+
'tooltip',
|
|
9888
|
+
'xAxis',
|
|
9889
|
+
'yAxis',
|
|
9890
|
+
'crosshairRect',
|
|
9891
|
+
'binCount',
|
|
9892
|
+
'binStep',
|
|
9893
|
+
'binValueType'
|
|
9894
|
+
]);
|
|
9895
|
+
const config = replaceNullToUndefined(pickedConfig);
|
|
9896
|
+
result.config = {
|
|
9897
|
+
...result.config || {},
|
|
9898
|
+
[chartType]: {
|
|
9899
|
+
...config
|
|
9900
|
+
}
|
|
9901
|
+
};
|
|
9902
|
+
return result;
|
|
9903
|
+
};
|
|
9904
|
+
const defaultEncodingForHistogram = (advancedVSeed)=>{
|
|
9905
|
+
const { measures: vseedMeasures = [], dimensions = [] } = advancedVSeed;
|
|
9906
|
+
const measures = findAllMeasures(vseedMeasures);
|
|
9907
|
+
const encoding = {};
|
|
9908
|
+
histogram_generateDefaultDimensionEncoding(dimensions, encoding);
|
|
9909
|
+
histogram_generateDefaultMeasureEncoding(measures, encoding);
|
|
9910
|
+
return {
|
|
9911
|
+
...advancedVSeed,
|
|
9912
|
+
encoding
|
|
9913
|
+
};
|
|
9914
|
+
};
|
|
9915
|
+
const encodingForHistogram = (advancedVSeed)=>{
|
|
9916
|
+
const { measures: vseedMeasures = [], dimensions = [] } = advancedVSeed;
|
|
9917
|
+
const measures = findAllMeasures(vseedMeasures);
|
|
9918
|
+
const hasDimensionEncoding = dimensions.some((item)=>item.encoding);
|
|
9919
|
+
const hasMeasureEncoding = measures.some((item)=>item.encoding);
|
|
9920
|
+
const encoding = {};
|
|
9921
|
+
if (hasDimensionEncoding) histogram_generateDimensionEncoding(dimensions, encoding, false);
|
|
9922
|
+
else histogram_generateDefaultDimensionEncoding(dimensions, encoding);
|
|
9923
|
+
if (hasMeasureEncoding) histogram_generateMeasureEncoding(measures, encoding);
|
|
9924
|
+
else histogram_generateDefaultMeasureEncoding(measures, encoding);
|
|
9925
|
+
return {
|
|
9926
|
+
...advancedVSeed,
|
|
9927
|
+
encoding
|
|
9928
|
+
};
|
|
9929
|
+
};
|
|
9930
|
+
const histogram_generateDefaultDimensionEncoding = (dimensions, encoding)=>{
|
|
9931
|
+
const dimensionsWithoutMeasureName = dimensions.filter((item)=>item.id !== MeasureName);
|
|
9932
|
+
const uniqueDimIds = chunk_QJLMYOTX_i(dimensionsWithoutMeasureName.map((d)=>d.id));
|
|
9933
|
+
encoding.detail = encoding.color;
|
|
9934
|
+
encoding.tooltip = uniqueDimIds.filter((d)=>d !== MeasureName);
|
|
9935
|
+
encoding.label = [];
|
|
9936
|
+
encoding.row = [];
|
|
9937
|
+
encoding.column = [];
|
|
9938
|
+
};
|
|
9939
|
+
const histogram_generateDimensionEncoding = (dimensions, encoding, isMultiMeasure)=>{
|
|
9940
|
+
addColorToEncoding(dimensions, encoding, isMultiMeasure);
|
|
9941
|
+
encoding.detail = chunk_QJLMYOTX_i(dimensions.filter((item)=>'detail' === item.encoding).map((item)=>item.id));
|
|
9942
|
+
if (encoding.detail?.length === 0) encoding.detail = encoding.color;
|
|
9943
|
+
encoding.tooltip = chunk_QJLMYOTX_i(dimensions.map((item)=>item.id));
|
|
9944
|
+
encoding.tooltip = encoding.tooltip?.filter((d)=>d !== MeasureName);
|
|
9945
|
+
encoding.label = chunk_QJLMYOTX_i(dimensions.filter((item)=>'label' === item.encoding).map((item)=>item.id));
|
|
9946
|
+
encoding.label = encoding.label?.filter((d)=>d !== MeasureName);
|
|
9947
|
+
};
|
|
9948
|
+
const histogram_generateDefaultMeasureEncoding = (measures, encoding)=>{
|
|
9949
|
+
encoding.value = chunk_QJLMYOTX_i(measures.filter((item)=>'value' === item.encoding || !item.encoding).map((item)=>item.id));
|
|
9950
|
+
encoding.x0 = chunk_QJLMYOTX_i(measures.filter((item)=>'x0' === item.encoding).map((item)=>item.id));
|
|
9951
|
+
encoding.x1 = chunk_QJLMYOTX_i(measures.filter((item)=>'x1' === item.encoding).map((item)=>item.id));
|
|
9952
|
+
encoding.y = chunk_QJLMYOTX_i(measures.filter((item)=>'yAxis' === item.encoding).map((item)=>item.id));
|
|
9953
|
+
};
|
|
9954
|
+
const histogram_generateMeasureEncoding = (measures, encoding)=>{
|
|
9955
|
+
encoding.value = chunk_QJLMYOTX_i(measures.filter((item)=>'value' === item.encoding || !item.encoding).map((item)=>item.id));
|
|
9956
|
+
encoding.x0 = chunk_QJLMYOTX_i(measures.filter((item)=>'x0' === item.encoding).map((item)=>item.id));
|
|
9957
|
+
encoding.x1 = chunk_QJLMYOTX_i(measures.filter((item)=>'x1' === item.encoding).map((item)=>item.id));
|
|
9958
|
+
encoding.y = chunk_QJLMYOTX_i(measures.filter((item)=>'yAxis' === item.encoding).map((item)=>item.id));
|
|
9959
|
+
const color = chunk_QJLMYOTX_i(measures.filter((item)=>'color' === item.encoding).map((item)=>item.id));
|
|
9960
|
+
if (color.length > 0) encoding.color = [
|
|
9961
|
+
color[0]
|
|
9962
|
+
];
|
|
9963
|
+
const label = chunk_QJLMYOTX_i(measures.filter((item)=>'label' === item.encoding).map((item)=>item.id));
|
|
9964
|
+
encoding.label = chunk_QJLMYOTX_i([
|
|
9965
|
+
...encoding.label || [],
|
|
9966
|
+
...label
|
|
9967
|
+
]);
|
|
9968
|
+
const tooltip = chunk_QJLMYOTX_i(measures.filter((item)=>'tooltip' === item.encoding).map((item)=>item.id));
|
|
9969
|
+
encoding.tooltip = chunk_QJLMYOTX_i([
|
|
9970
|
+
...encoding.tooltip || [],
|
|
9971
|
+
...label,
|
|
9972
|
+
...tooltip
|
|
9973
|
+
]);
|
|
9974
|
+
};
|
|
9975
|
+
const bin_bin = (data, options)=>{
|
|
9976
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
9977
|
+
const field = null == options ? void 0 : options.field;
|
|
9978
|
+
if (!field) return [];
|
|
9979
|
+
const countField = options.countField, n = data.length;
|
|
9980
|
+
let thresholds, min = 1 / 0, max = -1 / 0;
|
|
9981
|
+
if (options.extent) min = options.extent[0], max = options.extent[1];
|
|
9982
|
+
else for(let i = 0; i < n; i++){
|
|
9983
|
+
const v = data[i][field];
|
|
9984
|
+
if (common_isNil(v)) continue;
|
|
9985
|
+
const num = +v;
|
|
9986
|
+
Number.isFinite(num) && (num < min && (min = num), num > max && (max = num));
|
|
9987
|
+
}
|
|
9988
|
+
if (!Number.isFinite(min) || !Number.isFinite(max) || 0 === n) return [];
|
|
9989
|
+
if (options.thresholds && options.thresholds.length) thresholds = options.thresholds.slice(), thresholds.sort((a, b)=>a - b);
|
|
9990
|
+
else if ("number" == typeof options.step && options.step > 0) {
|
|
9991
|
+
const stepSize = options.step;
|
|
9992
|
+
let startMin = min;
|
|
9993
|
+
for(options.extent || (startMin = Math.floor(min / stepSize) * stepSize), thresholds = [
|
|
9994
|
+
startMin
|
|
9995
|
+
]; startMin < max;)startMin += stepSize, thresholds.push(startMin);
|
|
9996
|
+
} else {
|
|
9997
|
+
const bins = options.bins && options.bins > 0 ? Math.floor(options.bins) : 10;
|
|
9998
|
+
if (max - min > 1) {
|
|
9999
|
+
const start = Math.floor(min), stepSizeInt = Math.ceil((max - start) / bins);
|
|
10000
|
+
thresholds = new Array(bins + 1);
|
|
10001
|
+
for(let i = 0; i <= bins; i++)thresholds[i] = i === bins ? max : start + stepSizeInt * i;
|
|
10002
|
+
} else {
|
|
10003
|
+
const stepSize = (max - min) / bins;
|
|
10004
|
+
thresholds = new Array(bins + 1);
|
|
10005
|
+
for(let i = 0; i <= bins; i++)thresholds[i] = i === bins ? max : min + stepSize * i;
|
|
10006
|
+
}
|
|
10007
|
+
}
|
|
10008
|
+
const numBins = Math.max(0, thresholds.length - 1);
|
|
10009
|
+
if (0 === numBins) return [];
|
|
10010
|
+
const x0Name = null != (_b = null == (_a = options.outputNames) ? void 0 : _a.x0) ? _b : "x0", x1Name = null != (_d = null == (_c = options.outputNames) ? void 0 : _c.x1) ? _d : "x1", countName = null != (_f = null == (_e = options.outputNames) ? void 0 : _e.count) ? _f : "count", valuesName = null != (_h = null == (_g = options.outputNames) ? void 0 : _g.values) ? _h : "values", percentageName = null != (_k = null == (_j = options.outputNames) ? void 0 : _j.percentage) ? _k : "percentage", out = [];
|
|
10011
|
+
if (!options.groupField) for(let i = 0; i < numBins; i++){
|
|
10012
|
+
const rec = {
|
|
10013
|
+
[x0Name]: thresholds[i],
|
|
10014
|
+
[x1Name]: thresholds[i + 1],
|
|
10015
|
+
[countName]: 0
|
|
10016
|
+
};
|
|
10017
|
+
options.includeValues && (rec[valuesName] = []), out.push(rec);
|
|
10018
|
+
}
|
|
10019
|
+
const groupField = options.groupField, usingGroup = !!groupField, binGroupCounts = usingGroup ? new Array(numBins).fill(0).map(()=>new Map) : [], binGroupValues = usingGroup ? new Array(numBins).fill(0).map(()=>new Map) : [], binGroupRepr = usingGroup ? new Array(numBins).fill(0).map(()=>new Map) : [];
|
|
10020
|
+
for(let i = 0; i < n; i++){
|
|
10021
|
+
const v = data[i][field];
|
|
10022
|
+
if (null == v) continue;
|
|
10023
|
+
const num = +v;
|
|
10024
|
+
if (Number.isFinite(num)) for(let j = 0; j < numBins; j++){
|
|
10025
|
+
const left = thresholds[j], right = thresholds[j + 1];
|
|
10026
|
+
if (num >= left && num < right || j === numBins - 1 && num <= right) {
|
|
10027
|
+
const datumCount = null != (_l = data[i][countField]) ? _l : 1;
|
|
10028
|
+
if (usingGroup) {
|
|
10029
|
+
let gk;
|
|
10030
|
+
gk = common_isArray(groupField) ? groupField.map((f)=>String(data[i][f])).join("||") : String(data[i][groupField]);
|
|
10031
|
+
const m = binGroupCounts[j], prev = null != (_m = m.get(gk)) ? _m : 0;
|
|
10032
|
+
m.set(gk, prev + datumCount);
|
|
10033
|
+
const repMap = binGroupRepr[j];
|
|
10034
|
+
if (repMap.has(gk) || (common_isArray(groupField) ? repMap.set(gk, Object.fromEntries(groupField.map((f)=>[
|
|
10035
|
+
f,
|
|
10036
|
+
data[i][f]
|
|
10037
|
+
]))) : repMap.set(gk, data[i][groupField])), options && options.includeValues) {
|
|
10038
|
+
const vv = binGroupValues[j];
|
|
10039
|
+
vv.has(gk) || vv.set(gk, []);
|
|
10040
|
+
const arr = vv.get(gk);
|
|
10041
|
+
arr && arr.push(data[i]);
|
|
10042
|
+
}
|
|
10043
|
+
} else out[j][countName] += datumCount;
|
|
10044
|
+
options && options.includeValues && !usingGroup && out[j][valuesName].push(data[i]);
|
|
10045
|
+
break;
|
|
10046
|
+
}
|
|
10047
|
+
}
|
|
10048
|
+
}
|
|
10049
|
+
let totalCount = 0;
|
|
10050
|
+
const finalOut = [];
|
|
10051
|
+
if (usingGroup) {
|
|
10052
|
+
for(let j = 0; j < numBins; j++){
|
|
10053
|
+
const m = binGroupCounts[j];
|
|
10054
|
+
for (const [gk, sum] of m){
|
|
10055
|
+
totalCount += sum;
|
|
10056
|
+
const rec = {
|
|
10057
|
+
[x0Name]: thresholds[j],
|
|
10058
|
+
[x1Name]: thresholds[j + 1],
|
|
10059
|
+
[countName]: sum
|
|
10060
|
+
}, repr = binGroupRepr[j].get(gk);
|
|
10061
|
+
if (common_isArray(groupField)) for (const f of groupField)rec[f] = repr[f];
|
|
10062
|
+
else rec[groupField] = repr;
|
|
10063
|
+
options && options.includeValues && (rec[valuesName] = binGroupValues[j].get(gk) || []), finalOut.push(rec);
|
|
10064
|
+
}
|
|
10065
|
+
}
|
|
10066
|
+
for (const r of finalOut)r[percentageName] = totalCount > 0 ? r[countName] / totalCount : 0;
|
|
10067
|
+
} else {
|
|
10068
|
+
for(let i = 0, len = out.length; i < len; i++)totalCount += out[i][countName];
|
|
10069
|
+
for(let i = 0, len = out.length; i < len; i++)out[i][percentageName] = totalCount > 0 ? out[i][countName] / totalCount : 0, finalOut.push(out[i]);
|
|
10070
|
+
}
|
|
10071
|
+
return finalOut;
|
|
10072
|
+
};
|
|
10073
|
+
const reshapeWithHistogramEncoding = (advancedVSeed, context)=>{
|
|
10074
|
+
const result = {
|
|
10075
|
+
...advancedVSeed
|
|
10076
|
+
};
|
|
10077
|
+
const { vseed } = context;
|
|
10078
|
+
const { dataset, chartType } = vseed;
|
|
10079
|
+
const { dimensions = [], measures = [], encoding = {}, config } = advancedVSeed;
|
|
10080
|
+
const uniqDims = T(dimensions, (item)=>item.id);
|
|
10081
|
+
const chartConfig = config?.[chartType];
|
|
10082
|
+
const binCount = chartConfig?.binCount;
|
|
10083
|
+
const binStep = chartConfig?.binStep;
|
|
10084
|
+
const binValueType = chartConfig?.binValueType;
|
|
10085
|
+
let newDatasets = [];
|
|
10086
|
+
let foldInfo = {};
|
|
10087
|
+
let unfoldInfo = {};
|
|
10088
|
+
const colorMeasureId = getColorMeasureId(advancedVSeed, vseed);
|
|
10089
|
+
const allMeasures = findAllMeasures(measures);
|
|
10090
|
+
if (encoding.value?.length) {
|
|
10091
|
+
const valueField = encoding.value[0];
|
|
10092
|
+
const m = allMeasures.find((m)=>m.id === valueField);
|
|
10093
|
+
const binData = bin_bin(dataset, {
|
|
10094
|
+
field: valueField,
|
|
10095
|
+
groupField: [
|
|
10096
|
+
...encoding.x ?? [],
|
|
10097
|
+
...encoding.color ?? []
|
|
10098
|
+
],
|
|
10099
|
+
bins: binCount,
|
|
10100
|
+
step: binStep,
|
|
10101
|
+
outputNames: {
|
|
10102
|
+
x0: BinStartMeasureId,
|
|
10103
|
+
x1: BinEndMeasureId,
|
|
10104
|
+
count: BinCountMeasureId,
|
|
10105
|
+
percentage: BinPercentageMeasureId
|
|
10106
|
+
}
|
|
10107
|
+
});
|
|
10108
|
+
binData.forEach((datum)=>{
|
|
10109
|
+
datum[FoldMeasureId] = valueField;
|
|
10110
|
+
datum[FoldMeasureName] = m?.alias ?? valueField;
|
|
10111
|
+
datum[FoldMeasureValue] = 'percentage' === binValueType ? datum[BinPercentageMeasureId] : datum[BinCountMeasureId];
|
|
10112
|
+
});
|
|
10113
|
+
const res = unfoldDimensions(binData, uniqDims, encoding, {
|
|
10114
|
+
foldMeasureId: FoldMeasureId,
|
|
10115
|
+
separator: "-",
|
|
10116
|
+
colorItemAsId: false
|
|
10117
|
+
});
|
|
10118
|
+
res.dataset.forEach((d)=>{
|
|
10119
|
+
newDatasets.push(d);
|
|
10120
|
+
});
|
|
10121
|
+
unfoldInfo = res.unfoldInfo;
|
|
10122
|
+
} else if (encoding.x0?.length && encoding.x1?.length && encoding.y?.length) {
|
|
10123
|
+
const res = dataReshapeByEncoding(dataset, T(dimensions, (item)=>item.id), findAllMeasures(measures).filter((item)=>encoding.y?.includes(item.id)).slice(0, 1), encoding, {
|
|
10124
|
+
colorItemAsId: false,
|
|
10125
|
+
colorMeasureId
|
|
10126
|
+
});
|
|
10127
|
+
res.dataset.forEach((datum)=>{
|
|
10128
|
+
datum[BinStartMeasureId] = datum[encoding.x0[0]];
|
|
10129
|
+
datum[BinEndMeasureId] = datum[encoding.x1[0]];
|
|
10130
|
+
datum[FoldMeasureId] = datum[encoding.y[0]];
|
|
10131
|
+
});
|
|
10132
|
+
newDatasets = res.dataset;
|
|
10133
|
+
foldInfo = res.foldInfo;
|
|
10134
|
+
unfoldInfo = res.unfoldInfo;
|
|
10135
|
+
}
|
|
10136
|
+
return {
|
|
10137
|
+
...result,
|
|
10138
|
+
dataset: newDatasets,
|
|
10139
|
+
datasetReshapeInfo: [
|
|
10140
|
+
{
|
|
10141
|
+
id: String(chartType),
|
|
10142
|
+
index: 0,
|
|
10143
|
+
foldInfo,
|
|
10144
|
+
unfoldInfo
|
|
10145
|
+
}
|
|
10146
|
+
],
|
|
10147
|
+
dimensions,
|
|
10148
|
+
measures
|
|
10149
|
+
};
|
|
10150
|
+
};
|
|
10151
|
+
const pivotReshapeWithHistogramEncoding = (advancedVSeed, context)=>{
|
|
10152
|
+
const result = {
|
|
10153
|
+
...advancedVSeed
|
|
10154
|
+
};
|
|
10155
|
+
const { vseed } = context;
|
|
10156
|
+
const { dataset, chartType } = vseed;
|
|
10157
|
+
const { dimensions = [], measures = [], encoding = {}, config } = advancedVSeed;
|
|
10158
|
+
const colorMeasureId = getColorMeasureId(advancedVSeed, vseed);
|
|
10159
|
+
const uniqDims = T(dimensions, (item)=>item.id);
|
|
10160
|
+
const chartConfig = config?.[chartType];
|
|
10161
|
+
const binCount = chartConfig?.binCount;
|
|
10162
|
+
const binStep = chartConfig?.binStep;
|
|
10163
|
+
const binValueType = chartConfig?.binValueType;
|
|
10164
|
+
const measureGroups = [];
|
|
10165
|
+
if (measures) measures.forEach((measure)=>{
|
|
10166
|
+
if (measure.children && measure.children.length > 0) measureGroups.push(measure);
|
|
10167
|
+
});
|
|
10168
|
+
const rowColumnFields = T(dimensions.filter((dim)=>'row' === dim.encoding || 'column' === dim.encoding), (item)=>item.id);
|
|
10169
|
+
const datasets = [];
|
|
10170
|
+
const datasetReshapeInfo = [];
|
|
10171
|
+
measureGroups.forEach((measureGroup, index)=>{
|
|
10172
|
+
const subMeasures = measureGroup.children;
|
|
10173
|
+
if (!subMeasures) return;
|
|
10174
|
+
const groupId = measureGroup.id;
|
|
10175
|
+
let newDatasets = [];
|
|
10176
|
+
let foldInfo = {};
|
|
10177
|
+
let unfoldInfo = {};
|
|
10178
|
+
if (encoding.value?.length) {
|
|
10179
|
+
const valueField = encoding.value[0];
|
|
10180
|
+
const m = subMeasures.find((m)=>m.id === valueField);
|
|
10181
|
+
const binData = bin_bin(dataset, {
|
|
10182
|
+
field: valueField,
|
|
10183
|
+
groupField: [
|
|
10184
|
+
...encoding.x ?? [],
|
|
10185
|
+
...encoding.color ?? [],
|
|
10186
|
+
...rowColumnFields.map((item)=>item.id)
|
|
10187
|
+
],
|
|
10188
|
+
bins: binCount,
|
|
10189
|
+
step: binStep,
|
|
10190
|
+
outputNames: {
|
|
10191
|
+
x0: BinStartMeasureId,
|
|
10192
|
+
x1: BinEndMeasureId,
|
|
10193
|
+
count: BinCountMeasureId,
|
|
10194
|
+
percentage: BinPercentageMeasureId
|
|
10195
|
+
}
|
|
10196
|
+
});
|
|
10197
|
+
binData.forEach((datum)=>{
|
|
10198
|
+
datum[FoldMeasureId] = valueField;
|
|
10199
|
+
datum[FoldMeasureName] = m?.alias ?? valueField;
|
|
10200
|
+
datum[FoldMeasureValue] = 'percentage' === binValueType ? datum[BinPercentageMeasureId] : datum[BinCountMeasureId];
|
|
10201
|
+
});
|
|
10202
|
+
const res = unfoldDimensions(binData, uniqDims, encoding, {
|
|
10203
|
+
foldMeasureId: FoldMeasureId,
|
|
10204
|
+
separator: "-",
|
|
10205
|
+
colorItemAsId: false
|
|
10206
|
+
});
|
|
10207
|
+
res.dataset.forEach((d)=>{
|
|
10208
|
+
newDatasets.push(d);
|
|
10209
|
+
});
|
|
10210
|
+
unfoldInfo = res.unfoldInfo;
|
|
10211
|
+
} else if (encoding.x0?.length && encoding.x1?.length && encoding.y?.length) {
|
|
10212
|
+
const res = dataReshapeByEncoding(dataset, T(dimensions, (item)=>item.id), subMeasures.filter((item)=>encoding.y?.includes(item.id)).slice(0, 1), encoding, {
|
|
10213
|
+
colorItemAsId: false,
|
|
10214
|
+
colorMeasureId
|
|
10215
|
+
});
|
|
10216
|
+
res.dataset.forEach((datum)=>{
|
|
10217
|
+
datum[BinStartMeasureId] = datum[encoding.x0[0]];
|
|
10218
|
+
datum[BinEndMeasureId] = datum[encoding.x1[0]];
|
|
10219
|
+
datum[FoldMeasureId] = datum[encoding.y[0]];
|
|
10220
|
+
});
|
|
10221
|
+
newDatasets = res.dataset;
|
|
10222
|
+
foldInfo = res.foldInfo;
|
|
10223
|
+
unfoldInfo = res.unfoldInfo;
|
|
10224
|
+
}
|
|
10225
|
+
const reshapeInfo = {
|
|
10226
|
+
id: groupId,
|
|
10227
|
+
index,
|
|
10228
|
+
foldInfo,
|
|
10229
|
+
unfoldInfo
|
|
10230
|
+
};
|
|
10231
|
+
datasets.push(newDatasets);
|
|
10232
|
+
datasetReshapeInfo.push(reshapeInfo);
|
|
10233
|
+
});
|
|
10234
|
+
return {
|
|
10235
|
+
...result,
|
|
10236
|
+
dataset: datasets,
|
|
10237
|
+
datasetReshapeInfo: datasetReshapeInfo
|
|
10238
|
+
};
|
|
10239
|
+
};
|
|
10240
|
+
const regressionLine = (advancedVSeed, context)=>{
|
|
10241
|
+
const { vseed } = context;
|
|
10242
|
+
if ('histogramRegressionLine' in vseed && 'histogram' === vseed.chartType) advancedVSeed.histogramRegressionLine = vseed.histogramRegressionLine;
|
|
10243
|
+
return advancedVSeed;
|
|
10244
|
+
};
|
|
10245
|
+
const histogramAdvancedPipeline = [
|
|
10246
|
+
initAdvancedVSeed_initAdvancedVSeed,
|
|
10247
|
+
default_defaultMeasures_defaultMeasures,
|
|
10248
|
+
defaultDimensions_defaultDimensions,
|
|
10249
|
+
defaultMeasureName_defaultMeasureName,
|
|
10250
|
+
histogramConfig,
|
|
10251
|
+
encodingAdapter([
|
|
10252
|
+
defaultEncodingForHistogram,
|
|
10253
|
+
buildMeasures
|
|
10254
|
+
], [
|
|
10255
|
+
encodingForHistogram,
|
|
10256
|
+
buildMeasures,
|
|
10257
|
+
deleteEncodingForMeasure([
|
|
10258
|
+
'tooltip',
|
|
10259
|
+
'label',
|
|
10260
|
+
'color'
|
|
10261
|
+
]),
|
|
10262
|
+
deleteTooltipAndLabelDimension
|
|
10263
|
+
]),
|
|
10264
|
+
pivotAdapter([
|
|
10265
|
+
reshapeWithHistogramEncoding
|
|
10266
|
+
], [
|
|
10267
|
+
pivotReshapeWithHistogramEncoding
|
|
10268
|
+
]),
|
|
10269
|
+
sortLegend_sortLegend,
|
|
10270
|
+
theme_theme,
|
|
10271
|
+
markStyle_markStyle,
|
|
10272
|
+
annotation_annotation,
|
|
10273
|
+
regressionLine
|
|
10274
|
+
];
|
|
10275
|
+
const initHistogram = (spec)=>{
|
|
10276
|
+
const result = {
|
|
10277
|
+
...spec
|
|
10278
|
+
};
|
|
10279
|
+
result.type = 'histogram';
|
|
10280
|
+
result.xField = BinStartMeasureId;
|
|
10281
|
+
result.x2Field = BinEndMeasureId;
|
|
10282
|
+
result.yField = FoldMeasureValue;
|
|
10283
|
+
result.padding = 0;
|
|
10284
|
+
result.region = [
|
|
10285
|
+
{
|
|
10286
|
+
clip: true
|
|
10287
|
+
}
|
|
10288
|
+
];
|
|
10289
|
+
result.animation = true;
|
|
10290
|
+
return result;
|
|
10291
|
+
};
|
|
10292
|
+
const datasetHistogram = (spec, context)=>{
|
|
10293
|
+
const { advancedVSeed, vseed } = context;
|
|
10294
|
+
const { datasetReshapeInfo } = advancedVSeed;
|
|
10295
|
+
const { id } = datasetReshapeInfo[0];
|
|
10296
|
+
const fields = {};
|
|
10297
|
+
return {
|
|
10298
|
+
...spec,
|
|
10299
|
+
data: {
|
|
10300
|
+
id,
|
|
10301
|
+
values: isPivotChart(vseed) ? void 0 : advancedVSeed.dataset.flat(),
|
|
10302
|
+
fields: fields
|
|
10303
|
+
}
|
|
10304
|
+
};
|
|
10305
|
+
};
|
|
10306
|
+
const tooltipHistogram_VCHART_OUTLIER_KEY = '__VCHART_BOX_PLOT_OUTLIER_VALUE';
|
|
10307
|
+
const tooltipHistogram = (spec, context)=>{
|
|
10308
|
+
const result = {
|
|
10309
|
+
...spec
|
|
10310
|
+
};
|
|
10311
|
+
const { advancedVSeed } = context;
|
|
10312
|
+
const { chartType, dimensions, encoding } = advancedVSeed;
|
|
10313
|
+
const baseConfig = advancedVSeed.config[chartType];
|
|
10314
|
+
const { tooltip = {
|
|
10315
|
+
enable: true
|
|
10316
|
+
} } = baseConfig;
|
|
10317
|
+
const { enable } = tooltip;
|
|
10318
|
+
result.tooltip = {
|
|
10319
|
+
visible: enable,
|
|
10320
|
+
mark: {
|
|
10321
|
+
title: {
|
|
10322
|
+
visible: false
|
|
10323
|
+
},
|
|
10324
|
+
content: tooltipHistogram_createMarkContent(encoding.tooltip || [], dimensions, encoding)
|
|
10325
|
+
},
|
|
10326
|
+
dimension: {
|
|
10327
|
+
title: {
|
|
10328
|
+
visible: false
|
|
10329
|
+
},
|
|
10330
|
+
content: tooltipHistogram_createMarkContent(encoding.tooltip || [], dimensions, encoding)
|
|
10331
|
+
}
|
|
10332
|
+
};
|
|
10333
|
+
return result;
|
|
10334
|
+
};
|
|
10335
|
+
const tooltipHistogram_createMarkContent = (tooltip, dimensions, encoding)=>{
|
|
10336
|
+
const dims = C(dimensions.filter((item)=>tooltip.includes(item.id)), T((item)=>item.id), T((item)=>item.alias));
|
|
10337
|
+
const dimContent = dims.map((item)=>({
|
|
10338
|
+
visible: true,
|
|
10339
|
+
hasShape: true,
|
|
10340
|
+
shapeType: 'rectRound',
|
|
10341
|
+
key: item.alias ?? item.id,
|
|
10342
|
+
value: (datum)=>{
|
|
10343
|
+
if (!chunk_JK3VNB42_n(datum?.[tooltipHistogram_VCHART_OUTLIER_KEY])) {
|
|
10344
|
+
if (encoding.color?.includes(item.id)) return datum?.[ColorEncoding];
|
|
10345
|
+
if (encoding.x?.includes(item.id)) return datum?.[XEncoding];
|
|
10346
|
+
}
|
|
10347
|
+
return datum?.[item.id];
|
|
10348
|
+
}
|
|
10349
|
+
}));
|
|
10350
|
+
const defaultContent = [
|
|
10351
|
+
{
|
|
10352
|
+
visible: true,
|
|
10353
|
+
hasShape: true,
|
|
10354
|
+
shapeType: 'rectRound',
|
|
10355
|
+
key: (datum)=>{
|
|
10356
|
+
if (!datum) return '';
|
|
10357
|
+
return `${datum[BinStartMeasureId]} ~ ${datum[BinEndMeasureId]}`;
|
|
10358
|
+
},
|
|
10359
|
+
value: (datum)=>{
|
|
10360
|
+
if (!datum) return '';
|
|
10361
|
+
return datum[FoldMeasureValue];
|
|
10362
|
+
}
|
|
10363
|
+
}
|
|
10364
|
+
];
|
|
10365
|
+
return [
|
|
10366
|
+
...dimContent,
|
|
10367
|
+
defaultContent
|
|
10368
|
+
];
|
|
10369
|
+
};
|
|
10370
|
+
const gaussian = (u)=>1 / Math.sqrt(2 * Math.PI) * Math.exp(-0.5 * u * u);
|
|
10371
|
+
function scott(n, std, dim = 1) {
|
|
10372
|
+
return n <= 0 || 0 === std ? 0 : std * Math.pow(n, -1 / (dim + 4));
|
|
10373
|
+
}
|
|
10374
|
+
function silverman(n, std, dim = 1) {
|
|
10375
|
+
if (n <= 0 || 0 === std) return 0;
|
|
10376
|
+
return Math.pow(4 / (dim + 2), 1 / (dim + 4)) * std * Math.pow(n, -1 / (dim + 4));
|
|
10377
|
+
}
|
|
10378
|
+
function kde_std(values) {
|
|
10379
|
+
const n = values.length;
|
|
10380
|
+
if (0 === n) return 0;
|
|
10381
|
+
let mean = 0;
|
|
10382
|
+
for(let i = 0; i < n; i++)mean += values[i];
|
|
10383
|
+
mean /= n;
|
|
10384
|
+
let s = 0;
|
|
10385
|
+
for(let i = 0; i < n; i++){
|
|
10386
|
+
const d = values[i] - mean;
|
|
10387
|
+
s += d * d;
|
|
10388
|
+
}
|
|
10389
|
+
return Math.sqrt(s / n);
|
|
10390
|
+
}
|
|
10391
|
+
function kde_kde(data, options = {}) {
|
|
10392
|
+
const n = data.length, kernel = options.kernel || gaussian;
|
|
10393
|
+
let h = options.bandwidth;
|
|
10394
|
+
if (!h || h <= 0) {
|
|
10395
|
+
const sd = kde_std(data) || 0, method = options.bandwidthMethod || "scott";
|
|
10396
|
+
h = "silverman" === method ? silverman(n, sd, 1) : scott(n, sd, 1);
|
|
10397
|
+
}
|
|
10398
|
+
if (!h || h <= 0) return {
|
|
10399
|
+
bandwidth: 0,
|
|
10400
|
+
kernel: kernel,
|
|
10401
|
+
evaluate: (x)=>{
|
|
10402
|
+
if (Array.isArray(x)) {
|
|
10403
|
+
const out = [];
|
|
10404
|
+
for(let i = 0; i < x.length; i++)out.push(0);
|
|
10405
|
+
return out;
|
|
10406
|
+
}
|
|
10407
|
+
return 0;
|
|
10408
|
+
},
|
|
10409
|
+
evaluateGrid: (N)=>{
|
|
10410
|
+
const out = [];
|
|
10411
|
+
if (N <= 0) return out;
|
|
10412
|
+
let min = 1 / 0, max = -1 / 0;
|
|
10413
|
+
for(let j = 0; j < n; j++){
|
|
10414
|
+
const v = data[j];
|
|
10415
|
+
v < min && (min = v), v > max && (max = v);
|
|
10416
|
+
}
|
|
10417
|
+
if (min === 1 / 0 || max === -1 / 0) {
|
|
10418
|
+
for(let i = 0; i < N; i++)out.push({
|
|
10419
|
+
x: 0,
|
|
10420
|
+
y: 0
|
|
10421
|
+
});
|
|
10422
|
+
return out;
|
|
10423
|
+
}
|
|
10424
|
+
for(let i = 0; i < N; i++)out.push({
|
|
10425
|
+
x: min,
|
|
10426
|
+
y: 0
|
|
10427
|
+
});
|
|
10428
|
+
return out;
|
|
10429
|
+
}
|
|
10430
|
+
};
|
|
10431
|
+
const invNh = 1 / (n * h);
|
|
10432
|
+
function evalPoint(x) {
|
|
10433
|
+
let sum = 0;
|
|
10434
|
+
for(let j = 0; j < n; j++)sum += kernel((x - data[j]) / h);
|
|
10435
|
+
return sum * invNh;
|
|
10436
|
+
}
|
|
10437
|
+
return {
|
|
10438
|
+
bandwidth: h,
|
|
10439
|
+
kernel: kernel,
|
|
10440
|
+
evaluate: function(x) {
|
|
10441
|
+
if (Array.isArray(x)) {
|
|
10442
|
+
const out = [];
|
|
10443
|
+
for(let i = 0; i < x.length; i++)out.push(evalPoint(x[i]));
|
|
10444
|
+
return out;
|
|
10445
|
+
}
|
|
10446
|
+
return evalPoint(x);
|
|
10447
|
+
},
|
|
10448
|
+
evaluateGrid (N) {
|
|
10449
|
+
const out = [];
|
|
10450
|
+
if (N <= 0) return out;
|
|
10451
|
+
let min = 1 / 0, max = -1 / 0;
|
|
10452
|
+
for(let i = 0; i < n; i++){
|
|
10453
|
+
const v = data[i];
|
|
10454
|
+
v < min && (min = v), v > max && (max = v);
|
|
10455
|
+
}
|
|
10456
|
+
if (min === 1 / 0 || max === -1 / 0) return out;
|
|
10457
|
+
if (min === max) {
|
|
10458
|
+
for(let i = 0; i < N; i++)out.push({
|
|
10459
|
+
x: min,
|
|
10460
|
+
y: evalPoint(min)
|
|
10461
|
+
});
|
|
10462
|
+
return out;
|
|
10463
|
+
}
|
|
10464
|
+
const step = (max - min) / (N - 1);
|
|
10465
|
+
for(let i = 0; i < N; i++){
|
|
10466
|
+
const x = i === N - 1 ? max : min + step * i;
|
|
10467
|
+
out.push({
|
|
10468
|
+
x: x,
|
|
10469
|
+
y: evalPoint(x)
|
|
10470
|
+
});
|
|
10471
|
+
}
|
|
10472
|
+
return out;
|
|
10473
|
+
}
|
|
10474
|
+
};
|
|
10475
|
+
}
|
|
10476
|
+
function ecdf(data) {
|
|
10477
|
+
const n = data.length, sorted = data.slice().sort((a, b)=>a - b);
|
|
10478
|
+
function evaluateSingle(x) {
|
|
10479
|
+
if (0 === n) return 0;
|
|
10480
|
+
let lo = 0, hi = n;
|
|
10481
|
+
for(; lo < hi;){
|
|
10482
|
+
const mid = lo + hi >>> 1;
|
|
10483
|
+
sorted[mid] <= x ? lo = mid + 1 : hi = mid;
|
|
10484
|
+
}
|
|
10485
|
+
return lo / n;
|
|
10486
|
+
}
|
|
10487
|
+
return {
|
|
10488
|
+
evaluate: function(x) {
|
|
10489
|
+
if (Array.isArray(x)) {
|
|
10490
|
+
const out = [];
|
|
10491
|
+
for(let i = 0; i < x.length; i++)out.push(evaluateSingle(x[i]));
|
|
10492
|
+
return out;
|
|
10493
|
+
}
|
|
10494
|
+
return evaluateSingle(x);
|
|
10495
|
+
},
|
|
10496
|
+
evaluateGrid: function(N) {
|
|
10497
|
+
const out = [];
|
|
10498
|
+
if (N <= 0) return out;
|
|
10499
|
+
if (0 === n) return out;
|
|
10500
|
+
const min = sorted[0], max = sorted[n - 1];
|
|
10501
|
+
if (min === max) {
|
|
10502
|
+
for(let i = 0; i < N; i++)out.push({
|
|
10503
|
+
x: min,
|
|
10504
|
+
y: 1
|
|
10505
|
+
});
|
|
10506
|
+
return out;
|
|
10507
|
+
}
|
|
10508
|
+
const step = (max - min) / (N - 1);
|
|
10509
|
+
for(let i = 0; i < N; i++){
|
|
10510
|
+
const x = i === N - 1 ? max : min + step * i;
|
|
10511
|
+
out.push({
|
|
10512
|
+
x: x,
|
|
10513
|
+
y: evaluateSingle(x)
|
|
10514
|
+
});
|
|
10515
|
+
}
|
|
10516
|
+
return out;
|
|
10517
|
+
},
|
|
10518
|
+
n: n
|
|
10519
|
+
};
|
|
10520
|
+
}
|
|
10521
|
+
const getRegressionByType = (type, data, kdeOptions)=>{
|
|
10522
|
+
switch(type){
|
|
10523
|
+
case 'kde':
|
|
10524
|
+
return kde_kde(data, kdeOptions);
|
|
10525
|
+
case 'ecdf':
|
|
10526
|
+
return ecdf(data);
|
|
10527
|
+
}
|
|
10528
|
+
};
|
|
10529
|
+
const histogramRegressionLine_histogramRegressionLine = (spec, context)=>{
|
|
10530
|
+
const result = {
|
|
10531
|
+
...spec
|
|
10532
|
+
};
|
|
10533
|
+
const { advancedVSeed, vseed } = context;
|
|
10534
|
+
const { chartType, encoding = {}, dimensions, histogramRegressionLine } = advancedVSeed;
|
|
10535
|
+
const { dataset } = vseed;
|
|
10536
|
+
const theme = advancedVSeed.config[chartType]?.histogramRegressionLine;
|
|
10537
|
+
if (!histogramRegressionLine) return result;
|
|
10538
|
+
const rowColumnFields = T(dimensions.filter((dim)=>'row' === dim.encoding || 'column' === dim.encoding), (item)=>item.id);
|
|
10539
|
+
const lineList = Array.isArray(histogramRegressionLine) ? histogramRegressionLine : [
|
|
10540
|
+
histogramRegressionLine
|
|
10541
|
+
];
|
|
10542
|
+
if (!result.customMark) result.customMark = [];
|
|
10543
|
+
lineList.forEach((line)=>{
|
|
10544
|
+
const { color, type, lineWidth, lineDash, text, textColor, textFontSize, textFontWeight } = line;
|
|
10545
|
+
result.customMark.push({
|
|
10546
|
+
type: 'line',
|
|
10547
|
+
interactive: false,
|
|
10548
|
+
zIndex: 500,
|
|
10549
|
+
style: {
|
|
10550
|
+
lineWidth: lineWidth ?? theme?.lineWidth,
|
|
10551
|
+
lineDash: lineDash ?? theme?.lineDash,
|
|
10552
|
+
stroke: color ?? ((datum, ctx)=>{
|
|
10553
|
+
const vchart = ctx.vchart;
|
|
10554
|
+
const chart = vchart.getChart();
|
|
10555
|
+
const series = chart.getAllSeries().filter((s)=>'bar' === s.type);
|
|
10556
|
+
return series.length ? series[0].getOption().globalScale.getScale('color')?.scale(series[0].getSeriesKeys()[0]) : void 0;
|
|
10557
|
+
}),
|
|
10558
|
+
points: (datum, ctx)=>{
|
|
10559
|
+
const vchart = ctx.vchart;
|
|
10560
|
+
const chart = vchart.getChart();
|
|
10561
|
+
const series = chart.getAllSeries().filter((s)=>'bar' === s.type);
|
|
10562
|
+
if (series && series.length) {
|
|
10563
|
+
const s = series[0];
|
|
10564
|
+
const region = s.getRegion().getLayoutStartPoint();
|
|
10565
|
+
const fieldX = s.fieldX?.[0];
|
|
10566
|
+
const scaleY = s.getYAxisHelper().getScale?.(0);
|
|
10567
|
+
const viewData = s.getViewData()?.latestData;
|
|
10568
|
+
if (!dataset || !dataset.length || !viewData || !viewData.length || !scaleY) return;
|
|
10569
|
+
const simpleData = dataset.filter((entry)=>rowColumnFields.length ? rowColumnFields.every((dim)=>entry[dim.id] === viewData[0][dim.id]) : true).map((d)=>d[encoding.value?.[0]]);
|
|
10570
|
+
const res = getRegressionByType(type, simpleData, 'kde' === type ? {
|
|
10571
|
+
bandwidth: Math.abs(viewData[0][BinEndMeasureId] - viewData[0][BinStartMeasureId])
|
|
10572
|
+
} : void 0);
|
|
10573
|
+
const N = Math.max(3, Math.floor(simpleData.length / 4));
|
|
10574
|
+
const lineData = res.evaluateGrid(N);
|
|
10575
|
+
const yRange = scaleY.range();
|
|
10576
|
+
const y0 = yRange[0];
|
|
10577
|
+
const y1 = yRange[yRange.length - 1];
|
|
10578
|
+
const scaleR = 'kde' === type ? (k)=>scaleY.scale(k * simpleData.length * res.bandwidth) : (e)=>y0 + (y1 - y0) * e;
|
|
10579
|
+
return lineData.map((ld)=>{
|
|
10580
|
+
const d = {
|
|
10581
|
+
[fieldX]: ld.x
|
|
10582
|
+
};
|
|
10583
|
+
return {
|
|
10584
|
+
x: s.dataToPositionX(d) + region.x,
|
|
10585
|
+
y: scaleR(ld.y) + region.y
|
|
10586
|
+
};
|
|
10587
|
+
});
|
|
10588
|
+
}
|
|
10589
|
+
return [];
|
|
10590
|
+
}
|
|
10591
|
+
}
|
|
10592
|
+
});
|
|
10593
|
+
if (!chunk_JK3VNB42_n(text)) result.customMark.push({
|
|
10594
|
+
type: 'text',
|
|
10595
|
+
interactive: false,
|
|
10596
|
+
zIndex: 500,
|
|
10597
|
+
style: {
|
|
10598
|
+
textAlign: 'end',
|
|
10599
|
+
fill: textColor ?? theme?.textColor,
|
|
10600
|
+
fontSize: textFontSize ?? theme?.textFontSize,
|
|
10601
|
+
fontWeight: textFontWeight ?? theme?.textFontWeight,
|
|
10602
|
+
text: text,
|
|
10603
|
+
x: (datum, ctx)=>{
|
|
10604
|
+
const vchart = ctx.vchart;
|
|
10605
|
+
const chart = vchart.getChart();
|
|
10606
|
+
const series = chart.getAllSeries().filter((s)=>'bar' === s.type);
|
|
10607
|
+
if (series && series.length) {
|
|
10608
|
+
const s = series[0];
|
|
10609
|
+
const startPoint = s.getRegion().getLayoutStartPoint();
|
|
10610
|
+
const fieldX = s.fieldX[0];
|
|
10611
|
+
const fieldX2 = s.fieldX2;
|
|
10612
|
+
const scaleY = s.getYAxisHelper().getScale?.(0);
|
|
10613
|
+
const viewData = s.getViewData()?.latestData;
|
|
10614
|
+
if (!dataset || !dataset.length || !viewData || !viewData.length || !scaleY) return;
|
|
10615
|
+
const maxX = Math.max.apply(null, viewData.map((d)=>Math.max(d[fieldX], d[fieldX2])));
|
|
10616
|
+
return startPoint.x + s.dataToPositionX({
|
|
10617
|
+
[fieldX]: maxX
|
|
10618
|
+
});
|
|
10619
|
+
}
|
|
10620
|
+
},
|
|
10621
|
+
y: (datum, ctx)=>{
|
|
10622
|
+
const vchart = ctx.vchart;
|
|
10623
|
+
const chart = vchart.getChart();
|
|
10624
|
+
const series = chart.getAllSeries().filter((s)=>'bar' === s.type);
|
|
10625
|
+
if (series && series.length) {
|
|
10626
|
+
const s = series[0];
|
|
10627
|
+
const startPoint = s.getRegion().getLayoutStartPoint();
|
|
10628
|
+
const fieldY = s.fieldY[0];
|
|
10629
|
+
const viewData = s.getViewData()?.latestData;
|
|
10630
|
+
if (!viewData || !viewData.length) return;
|
|
10631
|
+
return 'ecdf' === type ? startPoint.y + 12 : startPoint.y + s.dataToPositionY({
|
|
10632
|
+
[fieldY]: viewData[viewData.length - 1]?.[fieldY]
|
|
10633
|
+
});
|
|
10634
|
+
}
|
|
10635
|
+
}
|
|
10636
|
+
}
|
|
10637
|
+
});
|
|
10638
|
+
});
|
|
10639
|
+
return result;
|
|
10640
|
+
};
|
|
10641
|
+
const histogram = [
|
|
10642
|
+
initHistogram,
|
|
10643
|
+
colorAdapter(color_color, linearColor),
|
|
10644
|
+
background_backgroundColor,
|
|
10645
|
+
datasetHistogram,
|
|
10646
|
+
progressive,
|
|
10647
|
+
xLinear,
|
|
10648
|
+
yLinear,
|
|
10649
|
+
label_label,
|
|
10650
|
+
tooltipHistogram,
|
|
10651
|
+
colorAdapter(discreteLegend, colorLegend),
|
|
10652
|
+
verticalCrosshairRect,
|
|
10653
|
+
colorBarStyleFill(barStyle_barStyle),
|
|
10654
|
+
annotationPoint_annotationPoint,
|
|
10655
|
+
annotationVerticalLine_annotationVerticalLine,
|
|
10656
|
+
annotationHorizontalLine_annotationHorizontalLine,
|
|
10657
|
+
annotationAreaBand,
|
|
10658
|
+
histogramRegressionLine_histogramRegressionLine
|
|
10659
|
+
];
|
|
10660
|
+
const pivotHistogram = [
|
|
10661
|
+
initPivot,
|
|
10662
|
+
pivotGridStyle,
|
|
10663
|
+
datasetPivot,
|
|
10664
|
+
pivotIndicators_pivotIndicators([
|
|
10665
|
+
initHistogram,
|
|
10666
|
+
colorAdapter(color_color, linearColor),
|
|
10667
|
+
background_backgroundColor,
|
|
10668
|
+
datasetHistogram,
|
|
10669
|
+
progressive,
|
|
10670
|
+
xLinear,
|
|
10671
|
+
yLinear,
|
|
10672
|
+
label_label,
|
|
10673
|
+
tooltipHistogram,
|
|
10674
|
+
colorBarStyleFill(barStyle_barStyle),
|
|
10675
|
+
verticalCrosshairRect,
|
|
10676
|
+
annotationPoint_annotationPoint,
|
|
10677
|
+
annotationVerticalLine_annotationVerticalLine,
|
|
10678
|
+
annotationHorizontalLine_annotationHorizontalLine,
|
|
10679
|
+
annotationAreaBand,
|
|
10680
|
+
histogramRegressionLine_histogramRegressionLine
|
|
10681
|
+
]),
|
|
10682
|
+
pivotRowDimensions,
|
|
10683
|
+
pivotColumnDimensions,
|
|
10684
|
+
colorAdapter(pivotDiscreteLegend, pivotColorLegend)
|
|
10685
|
+
];
|
|
10686
|
+
const histogramSpecPipeline = [
|
|
10687
|
+
pivotAdapter_pivotAdapter(histogram, pivotHistogram)
|
|
10688
|
+
];
|
|
10689
|
+
const registerHistogram = ()=>{
|
|
10690
|
+
Builder._advancedPipelineMap.histogram = histogramAdvancedPipeline;
|
|
10691
|
+
Builder._specPipelineMap.histogram = histogramSpecPipeline;
|
|
10692
|
+
};
|
|
10693
|
+
const getDarkCrosshairLine = ()=>({
|
|
10694
|
+
visible: true,
|
|
10695
|
+
labelVisible: true,
|
|
10696
|
+
labelColor: '#ffffff',
|
|
10697
|
+
labelBackgroundColor: '#404349',
|
|
10698
|
+
lineColor: '#55595F'
|
|
10699
|
+
});
|
|
10700
|
+
const getDarkCrosshairRect = ()=>({
|
|
10701
|
+
visible: true,
|
|
10702
|
+
labelVisible: true,
|
|
10703
|
+
labelColor: '#4B4F54',
|
|
10704
|
+
labelBackgroundColor: '#ffffff',
|
|
10705
|
+
rectColor: '#E2E3E6'
|
|
10706
|
+
});
|
|
10707
|
+
const getLightCrosshairLine = ()=>({
|
|
10708
|
+
visible: true,
|
|
10709
|
+
labelVisible: true,
|
|
10710
|
+
labelColor: '#ffffff',
|
|
10711
|
+
labelBackgroundColor: '#21252C',
|
|
10712
|
+
lineColor: '#21252C'
|
|
10713
|
+
});
|
|
10714
|
+
const getLightCrosshairRect = ()=>({
|
|
10715
|
+
visible: true,
|
|
10716
|
+
labelVisible: true,
|
|
10717
|
+
labelColor: '#ffffff',
|
|
10718
|
+
labelBackgroundColor: '#364159',
|
|
10719
|
+
rectColor: '#3641594d'
|
|
10720
|
+
});
|
|
10721
|
+
const getLightColorScheme = ()=>[
|
|
10722
|
+
'#8D72F6',
|
|
10723
|
+
'#5766EC',
|
|
10724
|
+
'#66A3FE',
|
|
10725
|
+
'#51D5E6',
|
|
10726
|
+
'#4EC0B3',
|
|
10727
|
+
'#F9DF90',
|
|
10728
|
+
'#F9AD71',
|
|
10729
|
+
'#ED8888',
|
|
10730
|
+
'#E9A0C3',
|
|
10731
|
+
'#D77DD3'
|
|
10732
|
+
];
|
|
10733
|
+
const getDarkColorScheme = ()=>[
|
|
10734
|
+
'#2E62F1',
|
|
10735
|
+
'#4DC36A',
|
|
10736
|
+
'#FF8406',
|
|
10737
|
+
'#FFCC00',
|
|
10738
|
+
'#4F44CF',
|
|
10739
|
+
'#5AC8FA',
|
|
10740
|
+
'#003A8C',
|
|
10741
|
+
'#B08AE2',
|
|
10742
|
+
'#FF6341',
|
|
10743
|
+
'#98DD62'
|
|
10744
|
+
];
|
|
10745
|
+
const getLightLinearColorScheme = ()=>[
|
|
10746
|
+
'#C2CEFF',
|
|
10747
|
+
'#5766EC'
|
|
10748
|
+
];
|
|
10749
|
+
const getDarkLinearColorScheme = ()=>[
|
|
10750
|
+
'#A0CEFF',
|
|
10751
|
+
'#2E62F1'
|
|
10752
|
+
];
|
|
10753
|
+
const getLightColor = ()=>({
|
|
10754
|
+
linearColorScheme: getLightLinearColorScheme(),
|
|
10755
|
+
colorScheme: getLightColorScheme()
|
|
10756
|
+
});
|
|
10757
|
+
const getDarkColor = ()=>({
|
|
10758
|
+
linearColorScheme: getDarkLinearColorScheme(),
|
|
10759
|
+
colorScheme: getDarkColorScheme()
|
|
10760
|
+
});
|
|
10761
|
+
const getDefaultLabel = ()=>({
|
|
10762
|
+
enable: true,
|
|
10763
|
+
wrap: true,
|
|
10764
|
+
showValue: true,
|
|
10765
|
+
showValuePercent: false,
|
|
10766
|
+
labelColorSmartInvert: false,
|
|
10767
|
+
labelOverlap: true
|
|
10768
|
+
});
|
|
10769
|
+
const getDarkLabel = ()=>({
|
|
10770
|
+
...getDefaultLabel(),
|
|
10771
|
+
labelStroke: '#21252C'
|
|
10772
|
+
});
|
|
10773
|
+
const getLightLabel = ()=>({
|
|
10774
|
+
...getDefaultLabel(),
|
|
10775
|
+
labelStroke: '#fff'
|
|
10776
|
+
});
|
|
10777
|
+
const getDefaultLegend = ()=>({
|
|
10778
|
+
enable: true,
|
|
10779
|
+
border: true,
|
|
10780
|
+
maxSize: 1,
|
|
10781
|
+
shapeType: 'rectRound',
|
|
10782
|
+
position: 'rt',
|
|
10783
|
+
labelColor: '#646A73',
|
|
10784
|
+
labelFontSize: 12,
|
|
10785
|
+
labelFontWeight: 400
|
|
10786
|
+
});
|
|
10787
|
+
const getDefaultTableConfig = ()=>({
|
|
10788
|
+
bodyFontSize: 12,
|
|
10789
|
+
bodyBackgroundColor: 'transparent',
|
|
10790
|
+
headerFontSize: 12
|
|
10791
|
+
});
|
|
10792
|
+
const getLightTableConfig = ()=>({
|
|
10793
|
+
...getDefaultTableConfig(),
|
|
10794
|
+
borderColor: '#e3e5eb',
|
|
10795
|
+
bodyFontColor: '#141414',
|
|
10796
|
+
headerFontColor: '#21252c',
|
|
9316
10797
|
headerBackgroundColor: '#f6f7f9',
|
|
9317
10798
|
hoverBodyBackgroundColor: '#bedaff',
|
|
9318
10799
|
hoverBodyInlineBackgroundColor: '#bedaff33',
|
|
@@ -9323,11 +10804,9 @@
|
|
|
9323
10804
|
backgroundColor: 'transparent'
|
|
9324
10805
|
});
|
|
9325
10806
|
const getDarkTableConfig = ()=>({
|
|
10807
|
+
...getDefaultTableConfig(),
|
|
9326
10808
|
borderColor: '#4b4e53',
|
|
9327
|
-
bodyFontSize: 12,
|
|
9328
10809
|
bodyFontColor: '#fdfdfd',
|
|
9329
|
-
bodyBackgroundColor: 'transparent',
|
|
9330
|
-
headerFontSize: 12,
|
|
9331
10810
|
headerFontColor: '#fdfdfd',
|
|
9332
10811
|
headerBackgroundColor: '#36393e',
|
|
9333
10812
|
hoverBodyBackgroundColor: '#4284ff66',
|
|
@@ -9338,10 +10817,12 @@
|
|
|
9338
10817
|
selectedBackgroundColor: '#4284ff33'
|
|
9339
10818
|
});
|
|
9340
10819
|
const pickPivotChartGridConfig = (tableConfig)=>({
|
|
10820
|
+
outlineBorderLineWidth: 0,
|
|
10821
|
+
frameCornerRadius: 0,
|
|
9341
10822
|
borderColor: tableConfig.borderColor,
|
|
9342
10823
|
bodyFontColor: tableConfig.bodyFontColor,
|
|
9343
10824
|
headerFontColor: tableConfig.headerFontColor,
|
|
9344
|
-
headerBackgroundColor:
|
|
10825
|
+
headerBackgroundColor: 'transparent',
|
|
9345
10826
|
hoverHeaderBackgroundColor: tableConfig.hoverHeaderBackgroundColor,
|
|
9346
10827
|
hoverHeaderInlineBackgroundColor: tableConfig.hoverHeaderInlineBackgroundColor
|
|
9347
10828
|
});
|
|
@@ -9519,48 +11000,48 @@
|
|
|
9519
11000
|
lineWidth: 1
|
|
9520
11001
|
}
|
|
9521
11002
|
});
|
|
9522
|
-
const
|
|
9523
|
-
textColor: '#ffffff',
|
|
11003
|
+
const getDefaultAnnotationPoint = ()=>({
|
|
9524
11004
|
textBackgroundVisible: true,
|
|
9525
|
-
textBackgroundColor: '#364159',
|
|
9526
|
-
textBackgroundBorderColor: '#3641594d',
|
|
9527
11005
|
textFontSize: 12,
|
|
9528
11006
|
textFontWeight: 400,
|
|
9529
11007
|
textBackgroundBorderRadius: 4,
|
|
9530
11008
|
textBackgroundBorderWidth: 1,
|
|
9531
11009
|
textBackgroundPadding: 2
|
|
9532
11010
|
});
|
|
9533
|
-
const
|
|
9534
|
-
|
|
11011
|
+
const getLightAnnotationPoint = ()=>({
|
|
11012
|
+
...getDefaultAnnotationPoint(),
|
|
11013
|
+
textColor: '#ffffff',
|
|
11014
|
+
textBackgroundColor: '#364159',
|
|
11015
|
+
textBackgroundBorderColor: '#3641594d'
|
|
11016
|
+
});
|
|
11017
|
+
const getDefaultAnnotationLine = ()=>({
|
|
11018
|
+
lineVisible: true,
|
|
9535
11019
|
lineWidth: 1,
|
|
9536
11020
|
lineStyle: 'solid',
|
|
9537
|
-
lineVisible: true,
|
|
9538
|
-
textColor: '#ffffff',
|
|
9539
11021
|
textFontSize: 12,
|
|
9540
11022
|
textFontWeight: 400,
|
|
9541
11023
|
startSymbolVisible: true,
|
|
9542
11024
|
endSymbolVisible: false,
|
|
9543
11025
|
textBackgroundVisible: true,
|
|
9544
|
-
textBackgroundColor: '#BCC1CB',
|
|
9545
|
-
textBackgroundBorderColor: '#BCC1CB',
|
|
9546
11026
|
textBackgroundBorderWidth: 1,
|
|
9547
11027
|
textBackgroundBorderRadius: 0,
|
|
9548
11028
|
textBackgroundPadding: 2
|
|
9549
11029
|
});
|
|
9550
|
-
const
|
|
9551
|
-
|
|
11030
|
+
const getLightAnnotationHorizontalLine = ()=>({
|
|
11031
|
+
...getDefaultAnnotationLine(),
|
|
11032
|
+
lineColor: '#BCC1CB',
|
|
9552
11033
|
textColor: '#ffffff',
|
|
11034
|
+
textBackgroundColor: '#BCC1CB',
|
|
11035
|
+
textBackgroundBorderColor: '#BCC1CB'
|
|
11036
|
+
});
|
|
11037
|
+
const getLightAnnotationVerticalLine = ()=>getLightAnnotationHorizontalLine();
|
|
11038
|
+
const getDefaultAnnotationArea = ()=>({
|
|
9553
11039
|
textFontSize: 12,
|
|
9554
11040
|
textFontWeight: 400,
|
|
9555
11041
|
textBackgroundVisible: true,
|
|
9556
|
-
textBackgroundColor: '#BCC1CB',
|
|
9557
|
-
textBackgroundBorderColor: '#BCC1CB',
|
|
9558
11042
|
textBackgroundBorderWidth: 1,
|
|
9559
11043
|
textBackgroundBorderRadius: 0,
|
|
9560
11044
|
textBackgroundPadding: 4,
|
|
9561
|
-
areaColor: '#BCC1CB',
|
|
9562
|
-
areaColorOpacity: 0.12,
|
|
9563
|
-
areaBorderColor: '#BCC1CB',
|
|
9564
11045
|
areaBorderWidth: 0,
|
|
9565
11046
|
areaBorderRadius: 0,
|
|
9566
11047
|
areaLineDash: [
|
|
@@ -9569,6 +11050,15 @@
|
|
|
9569
11050
|
],
|
|
9570
11051
|
outerPadding: 4
|
|
9571
11052
|
});
|
|
11053
|
+
const getLightAnnotationArea = ()=>({
|
|
11054
|
+
...getDefaultAnnotationArea(),
|
|
11055
|
+
textColor: '#ffffff',
|
|
11056
|
+
textBackgroundColor: '#BCC1CB',
|
|
11057
|
+
textBackgroundBorderColor: '#BCC1CB',
|
|
11058
|
+
areaColor: '#BCC1CB',
|
|
11059
|
+
areaColorOpacity: 0.12,
|
|
11060
|
+
areaBorderColor: '#BCC1CB'
|
|
11061
|
+
});
|
|
9572
11062
|
const getLightAnnotation = ()=>({
|
|
9573
11063
|
annotationPoint: getLightAnnotationPoint(),
|
|
9574
11064
|
annotationHorizontalLine: getLightAnnotationHorizontalLine(),
|
|
@@ -9576,52 +11066,27 @@
|
|
|
9576
11066
|
annotationArea: getLightAnnotationArea()
|
|
9577
11067
|
});
|
|
9578
11068
|
const getDarkAnnotationPoint = ()=>({
|
|
11069
|
+
...getDefaultAnnotationPoint(),
|
|
9579
11070
|
textColor: '#4B4F54',
|
|
9580
|
-
textBackgroundVisible: true,
|
|
9581
11071
|
textBackgroundColor: '#ffffff',
|
|
9582
|
-
textBackgroundBorderColor: '#ffffff'
|
|
9583
|
-
textFontSize: 12,
|
|
9584
|
-
textFontWeight: 400,
|
|
9585
|
-
textBackgroundBorderRadius: 4,
|
|
9586
|
-
textBackgroundBorderWidth: 1,
|
|
9587
|
-
textBackgroundPadding: 2
|
|
11072
|
+
textBackgroundBorderColor: '#ffffff'
|
|
9588
11073
|
});
|
|
9589
11074
|
const getDarkAnnotationHorizontalLine = ()=>({
|
|
11075
|
+
...getDefaultAnnotationLine(),
|
|
9590
11076
|
lineColor: '#55595F',
|
|
9591
|
-
lineWidth: 1,
|
|
9592
|
-
lineStyle: 'solid',
|
|
9593
|
-
lineVisible: true,
|
|
9594
|
-
textFontSize: 12,
|
|
9595
|
-
textFontWeight: 400,
|
|
9596
|
-
textBackgroundVisible: true,
|
|
9597
11077
|
textColor: '#E2E3E6',
|
|
9598
11078
|
textBackgroundColor: '#55595F',
|
|
9599
|
-
textBackgroundBorderColor: '#55595F'
|
|
9600
|
-
textBackgroundBorderWidth: 1,
|
|
9601
|
-
textBackgroundBorderRadius: 0,
|
|
9602
|
-
textBackgroundPadding: 2
|
|
11079
|
+
textBackgroundBorderColor: '#55595F'
|
|
9603
11080
|
});
|
|
9604
11081
|
const getDarkAnnotationVerticalLine = ()=>getDarkAnnotationHorizontalLine();
|
|
9605
11082
|
const getDarkAnnotationArea = ()=>({
|
|
11083
|
+
...getDefaultAnnotationArea(),
|
|
9606
11084
|
textColor: '#E2E3E6',
|
|
9607
|
-
textFontSize: 12,
|
|
9608
|
-
textFontWeight: 400,
|
|
9609
|
-
textBackgroundVisible: true,
|
|
9610
11085
|
textBackgroundColor: '#55595F',
|
|
9611
11086
|
textBackgroundBorderColor: '#55595F',
|
|
9612
|
-
textBackgroundBorderWidth: 1,
|
|
9613
|
-
textBackgroundBorderRadius: 0,
|
|
9614
|
-
textBackgroundPadding: 4,
|
|
9615
11087
|
areaColor: '#E2E3E6',
|
|
9616
11088
|
areaColorOpacity: 0.15,
|
|
9617
|
-
areaBorderColor: '#E2E3E6'
|
|
9618
|
-
areaBorderWidth: 0,
|
|
9619
|
-
areaBorderRadius: 0,
|
|
9620
|
-
areaLineDash: [
|
|
9621
|
-
2,
|
|
9622
|
-
2
|
|
9623
|
-
],
|
|
9624
|
-
outerPadding: 4
|
|
11089
|
+
areaBorderColor: '#E2E3E6'
|
|
9625
11090
|
});
|
|
9626
11091
|
const getDarkAnnotation = ()=>({
|
|
9627
11092
|
annotationPoint: getDarkAnnotationPoint(),
|
|
@@ -9643,6 +11108,19 @@
|
|
|
9643
11108
|
const getDarkHeatmapCellTheme = ()=>({
|
|
9644
11109
|
stroke: '#404349'
|
|
9645
11110
|
});
|
|
11111
|
+
const getDefaultHistogramRegressionLine = ()=>({
|
|
11112
|
+
lineWidth: 2,
|
|
11113
|
+
textFontSize: 12,
|
|
11114
|
+
textFontWeight: 400
|
|
11115
|
+
});
|
|
11116
|
+
const getLightHistogramRegressionLine = ()=>({
|
|
11117
|
+
...getDefaultHistogramRegressionLine(),
|
|
11118
|
+
textColor: '#364159'
|
|
11119
|
+
});
|
|
11120
|
+
const getDarkHistogramRegressionLine = ()=>({
|
|
11121
|
+
...getDefaultHistogramRegressionLine(),
|
|
11122
|
+
textColor: '#ffffff'
|
|
11123
|
+
});
|
|
9646
11124
|
const lightTheme = ()=>{
|
|
9647
11125
|
const linearAxis = getLightLinearAxis();
|
|
9648
11126
|
const bandAxis = getLightBandAxis();
|
|
@@ -9664,7 +11142,7 @@
|
|
|
9664
11142
|
const baseConfig = {
|
|
9665
11143
|
backgroundColor: 'transparent',
|
|
9666
11144
|
color: getLightColor(),
|
|
9667
|
-
label:
|
|
11145
|
+
label: getLightLabel(),
|
|
9668
11146
|
legend: getDefaultLegend(),
|
|
9669
11147
|
tooltip: getDefaultTooltip()
|
|
9670
11148
|
};
|
|
@@ -9889,6 +11367,23 @@
|
|
|
9889
11367
|
},
|
|
9890
11368
|
cell: getLightHeatmapCellTheme(),
|
|
9891
11369
|
pivotGrid: getLightPivotChartGridConfig()
|
|
11370
|
+
},
|
|
11371
|
+
histogram: {
|
|
11372
|
+
...baseConfig,
|
|
11373
|
+
xAxis: linearAxis,
|
|
11374
|
+
yAxis: linearAxis,
|
|
11375
|
+
crosshairRect,
|
|
11376
|
+
pivotGrid: getLightPivotChartGridConfig(),
|
|
11377
|
+
annotation: getLightAnnotation(),
|
|
11378
|
+
histogramRegressionLine: getLightHistogramRegressionLine()
|
|
11379
|
+
},
|
|
11380
|
+
boxPlot: {
|
|
11381
|
+
...baseConfig,
|
|
11382
|
+
xAxis: linearAxis,
|
|
11383
|
+
yAxis: linearAxis,
|
|
11384
|
+
crosshairRect,
|
|
11385
|
+
pivotGrid: getLightPivotChartGridConfig(),
|
|
11386
|
+
annotation: getLightAnnotation()
|
|
9892
11387
|
}
|
|
9893
11388
|
}
|
|
9894
11389
|
};
|
|
@@ -9914,7 +11409,7 @@
|
|
|
9914
11409
|
const baseConfig = {
|
|
9915
11410
|
backgroundColor: 'transparent',
|
|
9916
11411
|
color: getDarkColor(),
|
|
9917
|
-
label:
|
|
11412
|
+
label: getDarkLabel(),
|
|
9918
11413
|
legend: getDefaultLegend(),
|
|
9919
11414
|
tooltip: getDefaultTooltip()
|
|
9920
11415
|
};
|
|
@@ -10133,6 +11628,23 @@
|
|
|
10133
11628
|
},
|
|
10134
11629
|
cell: getDarkHeatmapCellTheme(),
|
|
10135
11630
|
pivotGrid: getDarkPivotChartGridConfig()
|
|
11631
|
+
},
|
|
11632
|
+
histogram: {
|
|
11633
|
+
...baseConfig,
|
|
11634
|
+
xAxis: linearAxis,
|
|
11635
|
+
yAxis: linearAxis,
|
|
11636
|
+
crosshairRect: crosshairRect,
|
|
11637
|
+
pivotGrid: getDarkPivotChartGridConfig(),
|
|
11638
|
+
annotation: getDarkAnnotation(),
|
|
11639
|
+
histogramRegressionLine: getDarkHistogramRegressionLine()
|
|
11640
|
+
},
|
|
11641
|
+
boxPlot: {
|
|
11642
|
+
...baseConfig,
|
|
11643
|
+
xAxis: bandAxis,
|
|
11644
|
+
yAxis: linearAxis,
|
|
11645
|
+
crosshairRect: crosshairRect,
|
|
11646
|
+
pivotGrid: getDarkPivotChartGridConfig(),
|
|
11647
|
+
annotation: getDarkAnnotation()
|
|
10136
11648
|
}
|
|
10137
11649
|
}
|
|
10138
11650
|
};
|
|
@@ -10171,6 +11683,8 @@
|
|
|
10171
11683
|
registerRadar();
|
|
10172
11684
|
registerFunnel();
|
|
10173
11685
|
registerHeatmap();
|
|
11686
|
+
registerBoxplot();
|
|
11687
|
+
registerHistogram();
|
|
10174
11688
|
registerLightTheme();
|
|
10175
11689
|
registerDarkTheme();
|
|
10176
11690
|
};
|
|
@@ -13483,7 +14997,9 @@
|
|
|
13483
14997
|
'donut',
|
|
13484
14998
|
'radar',
|
|
13485
14999
|
'funnel',
|
|
13486
|
-
'heatmap'
|
|
15000
|
+
'heatmap',
|
|
15001
|
+
'boxPlot',
|
|
15002
|
+
'histogram'
|
|
13487
15003
|
]);
|
|
13488
15004
|
const zDualChartType = schemas_object({
|
|
13489
15005
|
primary: schemas_enum([
|
|
@@ -13655,7 +15171,16 @@
|
|
|
13655
15171
|
label: schemas_array(schemas_string()).nullish(),
|
|
13656
15172
|
row: schemas_array(schemas_string()).nullish(),
|
|
13657
15173
|
column: schemas_array(schemas_string()).nullish(),
|
|
13658
|
-
group: schemas_array(schemas_string()).nullish().describe("\u5DF2\u5F03\u7528, \u8BF7\u4F7F\u7528\u989C\u8272\u66FF\u4EE3")
|
|
15174
|
+
group: schemas_array(schemas_string()).nullish().describe("\u5DF2\u5F03\u7528, \u8BF7\u4F7F\u7528\u989C\u8272\u66FF\u4EE3"),
|
|
15175
|
+
value: schemas_array(schemas_string()).nullish(),
|
|
15176
|
+
q1: schemas_array(schemas_string()).nullish(),
|
|
15177
|
+
q3: schemas_array(schemas_string()).nullish(),
|
|
15178
|
+
median: schemas_array(schemas_string()).nullish(),
|
|
15179
|
+
min: schemas_array(schemas_string()).nullish(),
|
|
15180
|
+
max: schemas_array(schemas_string()).nullish(),
|
|
15181
|
+
outliers: schemas_array(schemas_string()).nullish(),
|
|
15182
|
+
x0: schemas_array(schemas_string()).nullish(),
|
|
15183
|
+
x1: schemas_array(schemas_string()).nullish()
|
|
13659
15184
|
});
|
|
13660
15185
|
const EncodingEnum = {
|
|
13661
15186
|
x: 'x',
|
|
@@ -14180,7 +15705,9 @@
|
|
|
14180
15705
|
headerFontColor: schemas_string().nullish(),
|
|
14181
15706
|
headerBackgroundColor: schemas_string().nullish(),
|
|
14182
15707
|
hoverHeaderBackgroundColor: schemas_string().nullish(),
|
|
14183
|
-
hoverHeaderInlineBackgroundColor: schemas_string().nullish()
|
|
15708
|
+
hoverHeaderInlineBackgroundColor: schemas_string().nullish(),
|
|
15709
|
+
outlineBorderLineWidth: schemas_number().nullish(),
|
|
15710
|
+
frameCornerRadius: schemas_number().nullish()
|
|
14184
15711
|
});
|
|
14185
15712
|
const zLineConfig = schemas_object({
|
|
14186
15713
|
backgroundColor: zBackgroundColor.nullish(),
|
|
@@ -14200,6 +15727,8 @@
|
|
|
14200
15727
|
0,
|
|
14201
15728
|
0
|
|
14202
15729
|
]);
|
|
15730
|
+
const zBarMaxWidth = schemas_number().or(schemas_string());
|
|
15731
|
+
const zBarGapInGroup = schemas_number().or(schemas_string());
|
|
14203
15732
|
const zColumnConfig = schemas_object({
|
|
14204
15733
|
backgroundColor: zBackgroundColor.nullish(),
|
|
14205
15734
|
label: zLabel.nullish(),
|
|
@@ -14210,6 +15739,8 @@
|
|
|
14210
15739
|
yAxis: zYLinearAxis.nullish(),
|
|
14211
15740
|
crosshairRect: zCrosshairRect.nullish(),
|
|
14212
15741
|
stackCornerRadius: zStackCornerRadius.nullish(),
|
|
15742
|
+
barMaxWidth: zBarMaxWidth.nullish(),
|
|
15743
|
+
barGapInGroup: zBarGapInGroup.nullish(),
|
|
14213
15744
|
pivotGrid: zPivotChartGridConfig.nullish(),
|
|
14214
15745
|
annotation: zAnnotationConfig.nullish()
|
|
14215
15746
|
});
|
|
@@ -14327,6 +15858,50 @@
|
|
|
14327
15858
|
cell: zHeatmapCell.nullish()
|
|
14328
15859
|
});
|
|
14329
15860
|
const zPivotTableConfig = zTableConfig;
|
|
15861
|
+
const zWhiskersConfig = schemas_number().or(schemas_array(schemas_number())).default(1.5);
|
|
15862
|
+
const zBoxplotConfig = schemas_object({
|
|
15863
|
+
backgroundColor: zBackgroundColor.nullish(),
|
|
15864
|
+
label: zLabel.nullish(),
|
|
15865
|
+
color: zColor.nullish(),
|
|
15866
|
+
tooltip: zTooltip.nullish(),
|
|
15867
|
+
legend: zLegend.nullish(),
|
|
15868
|
+
xAxis: zXBandAxis.nullish(),
|
|
15869
|
+
yAxis: zYLinearAxis.nullish(),
|
|
15870
|
+
crosshairRect: zCrosshairRect.nullish(),
|
|
15871
|
+
pivotGrid: zPivotChartGridConfig.nullish(),
|
|
15872
|
+
annotation: zAnnotationConfig.nullish(),
|
|
15873
|
+
whiskers: zWhiskersConfig.nullish()
|
|
15874
|
+
});
|
|
15875
|
+
const zHistogramRegressionLine = schemas_object({
|
|
15876
|
+
type: union([
|
|
15877
|
+
literal('kde'),
|
|
15878
|
+
literal('ecdf')
|
|
15879
|
+
]).nullish(),
|
|
15880
|
+
color: schemas_string().nullish(),
|
|
15881
|
+
lineWidth: schemas_number().nullish(),
|
|
15882
|
+
lineDash: schemas_array(schemas_number()).nullish(),
|
|
15883
|
+
text: schemas_string().nullish(),
|
|
15884
|
+
textColor: schemas_string().nullish(),
|
|
15885
|
+
textFontSize: schemas_number().nullish(),
|
|
15886
|
+
textFontWeight: schemas_number().nullish()
|
|
15887
|
+
});
|
|
15888
|
+
const zHistogramConfig = schemas_object({
|
|
15889
|
+
backgroundColor: zBackgroundColor.nullish(),
|
|
15890
|
+
label: zLabel.nullish(),
|
|
15891
|
+
color: zColor.nullish(),
|
|
15892
|
+
tooltip: zTooltip.nullish(),
|
|
15893
|
+
legend: zLegend.nullish(),
|
|
15894
|
+
xAxis: zXBandAxis.nullish(),
|
|
15895
|
+
yAxis: zYLinearAxis.nullish(),
|
|
15896
|
+
crosshairRect: zCrosshairRect.nullish(),
|
|
15897
|
+
stackCornerRadius: zStackCornerRadius.nullish(),
|
|
15898
|
+
pivotGrid: zPivotChartGridConfig.nullish(),
|
|
15899
|
+
annotation: zAnnotationConfig.nullish(),
|
|
15900
|
+
binCount: schemas_number().positive().nullish(),
|
|
15901
|
+
binStep: schemas_number().positive().nullish(),
|
|
15902
|
+
binValueType: literal('count').or(literal('percentage')).nullish(),
|
|
15903
|
+
histogramRegressionLine: zHistogramRegressionLine.nullish()
|
|
15904
|
+
});
|
|
14330
15905
|
const zConfig = schemas_object({
|
|
14331
15906
|
table: zTableConfig.nullish(),
|
|
14332
15907
|
pivotTable: zPivotTableConfig.nullish(),
|
|
@@ -14347,7 +15922,9 @@
|
|
|
14347
15922
|
donut: zDonutConfig.nullish(),
|
|
14348
15923
|
radar: zRadarConfig.nullish(),
|
|
14349
15924
|
funnel: zFunnelConfig.nullish(),
|
|
14350
|
-
heatmap: zHeatmapConfig.nullish()
|
|
15925
|
+
heatmap: zHeatmapConfig.nullish(),
|
|
15926
|
+
boxPlot: zBoxplotConfig.nullish(),
|
|
15927
|
+
histogram: zHistogramConfig.nullish()
|
|
14351
15928
|
});
|
|
14352
15929
|
const zCustomThemeConfig = schemas_object({
|
|
14353
15930
|
config: zConfig.nullish()
|
|
@@ -14587,8 +16164,11 @@
|
|
|
14587
16164
|
tooltip: zTooltip.nullish(),
|
|
14588
16165
|
xAxis: zXBandAxis.nullish(),
|
|
14589
16166
|
yAxis: zYLinearAxis.nullish(),
|
|
16167
|
+
sort: zSort.nullish(),
|
|
16168
|
+
sortLegent: zSortLegend.nullish(),
|
|
14590
16169
|
crosshairRect: zCrosshairRect.nullish(),
|
|
14591
16170
|
stackCornerRadius: zStackCornerRadius.nullish(),
|
|
16171
|
+
barMaxWidth: zBarMaxWidth.nullish(),
|
|
14592
16172
|
theme: zTheme.nullish(),
|
|
14593
16173
|
barStyle: schemas_array(zBarStyle).or(zBarStyle).nullish(),
|
|
14594
16174
|
annotationPoint: schemas_array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
|
|
@@ -14612,6 +16192,8 @@
|
|
|
14612
16192
|
yAxis: zYLinearAxis.nullish(),
|
|
14613
16193
|
crosshairRect: zCrosshairRect.nullish(),
|
|
14614
16194
|
stackCornerRadius: zStackCornerRadius.nullish(),
|
|
16195
|
+
barMaxWidth: zBarMaxWidth.nullish(),
|
|
16196
|
+
barGapInGroup: zBarGapInGroup.nullish(),
|
|
14615
16197
|
theme: zTheme.nullish(),
|
|
14616
16198
|
barStyle: schemas_array(zBarStyle).or(zBarStyle).nullish(),
|
|
14617
16199
|
annotationPoint: schemas_array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
|
|
@@ -14635,6 +16217,7 @@
|
|
|
14635
16217
|
yAxis: zYLinearAxis.nullish(),
|
|
14636
16218
|
crosshairRect: zCrosshairRect.nullish(),
|
|
14637
16219
|
stackCornerRadius: zStackCornerRadius.nullish(),
|
|
16220
|
+
barMaxWidth: zBarMaxWidth.nullish(),
|
|
14638
16221
|
theme: zTheme.nullish(),
|
|
14639
16222
|
barStyle: schemas_array(zBarStyle).or(zBarStyle).nullish(),
|
|
14640
16223
|
annotationPoint: schemas_array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
|
|
@@ -14658,6 +16241,7 @@
|
|
|
14658
16241
|
yAxis: zYBandAxis.nullish(),
|
|
14659
16242
|
crosshairRect: zCrosshairRect.nullish(),
|
|
14660
16243
|
stackCornerRadius: zStackCornerRadius.nullish(),
|
|
16244
|
+
barMaxWidth: zBarMaxWidth.nullish(),
|
|
14661
16245
|
theme: zTheme.nullish(),
|
|
14662
16246
|
barStyle: schemas_array(zBarStyle).or(zBarStyle).nullish(),
|
|
14663
16247
|
annotationPoint: schemas_array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
|
|
@@ -14681,6 +16265,8 @@
|
|
|
14681
16265
|
yAxis: zYBandAxis.nullish(),
|
|
14682
16266
|
crosshairRect: zCrosshairRect.nullish(),
|
|
14683
16267
|
stackCornerRadius: zStackCornerRadius.nullish(),
|
|
16268
|
+
barMaxWidth: zBarMaxWidth.nullish(),
|
|
16269
|
+
barGapInGroup: zBarGapInGroup.nullish(),
|
|
14684
16270
|
theme: zTheme.nullish(),
|
|
14685
16271
|
barStyle: schemas_array(zBarStyle).or(zBarStyle).nullish(),
|
|
14686
16272
|
annotationPoint: schemas_array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
|
|
@@ -14704,6 +16290,7 @@
|
|
|
14704
16290
|
yAxis: zYBandAxis.nullish(),
|
|
14705
16291
|
crosshairRect: zCrosshairRect.nullish(),
|
|
14706
16292
|
stackCornerRadius: zStackCornerRadius.nullish(),
|
|
16293
|
+
barMaxWidth: zBarMaxWidth.nullish(),
|
|
14707
16294
|
theme: zTheme.nullish(),
|
|
14708
16295
|
barStyle: schemas_array(zBarStyle).or(zBarStyle).nullish(),
|
|
14709
16296
|
annotationPoint: schemas_array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
|
|
@@ -14805,6 +16392,8 @@
|
|
|
14805
16392
|
sort: zSort.nullish(),
|
|
14806
16393
|
sortLegend: zSortLegend.nullish(),
|
|
14807
16394
|
theme: zTheme.nullish(),
|
|
16395
|
+
barMaxWidth: zBarMaxWidth.nullish(),
|
|
16396
|
+
barGapInGroup: zBarGapInGroup.nullish(),
|
|
14808
16397
|
barStyle: schemas_array(zBarStyle).or(zBarStyle).nullish(),
|
|
14809
16398
|
pointStyle: schemas_array(zPointStyle).or(zPointStyle).nullish(),
|
|
14810
16399
|
lineStyle: schemas_array(zLineStyle).or(zLineStyle).nullish(),
|
|
@@ -14815,6 +16404,32 @@
|
|
|
14815
16404
|
annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
|
|
14816
16405
|
locale: zLocale.nullish()
|
|
14817
16406
|
});
|
|
16407
|
+
const zHistogram = schemas_object({
|
|
16408
|
+
chartType: literal('histogram'),
|
|
16409
|
+
dataset: zDataset.nullish(),
|
|
16410
|
+
encoding: zEncoding.nullish(),
|
|
16411
|
+
dimensions: zDimensions.nullish(),
|
|
16412
|
+
measures: zMeasureTree.nullish(),
|
|
16413
|
+
backgroundColor: zBackgroundColor.nullish(),
|
|
16414
|
+
color: zColor.nullish(),
|
|
16415
|
+
label: zLabel.nullish(),
|
|
16416
|
+
legend: zLegend.nullish(),
|
|
16417
|
+
tooltip: zTooltip.nullish(),
|
|
16418
|
+
xAxis: zXLinearAxis.nullish(),
|
|
16419
|
+
yAxis: zYLinearAxis.nullish(),
|
|
16420
|
+
crosshairRect: zCrosshairRect.nullish(),
|
|
16421
|
+
binCount: schemas_number().positive().nullish(),
|
|
16422
|
+
binStep: schemas_number().positive().nullish(),
|
|
16423
|
+
binValueType: literal('count').or(literal('percentage')).nullish(),
|
|
16424
|
+
theme: zTheme.nullish(),
|
|
16425
|
+
barStyle: schemas_array(zBarStyle).or(zBarStyle).nullish(),
|
|
16426
|
+
annotationPoint: schemas_array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
|
|
16427
|
+
annotationVerticalLine: schemas_array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
|
|
16428
|
+
annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
|
|
16429
|
+
annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
|
|
16430
|
+
histogramRegressionLine: schemas_array(zHistogramRegressionLine).or(zHistogramRegressionLine).nullish(),
|
|
16431
|
+
locale: zLocale.nullish()
|
|
16432
|
+
});
|
|
14818
16433
|
const zRose = schemas_object({
|
|
14819
16434
|
chartType: literal('rose'),
|
|
14820
16435
|
dataset: zDataset.nullish(),
|
|
@@ -14912,6 +16527,30 @@
|
|
|
14912
16527
|
theme: zTheme.nullish(),
|
|
14913
16528
|
locale: zLocale.nullish()
|
|
14914
16529
|
});
|
|
16530
|
+
const zBoxplot = schemas_object({
|
|
16531
|
+
chartType: literal('boxPlot'),
|
|
16532
|
+
dataset: zDataset.nullish(),
|
|
16533
|
+
encoding: zEncoding.nullish(),
|
|
16534
|
+
dimensions: zDimensions.nullish(),
|
|
16535
|
+
measures: zMeasureTree.nullish(),
|
|
16536
|
+
backgroundColor: zBackgroundColor.nullish(),
|
|
16537
|
+
color: zColor.nullish(),
|
|
16538
|
+
label: zLabel.nullish(),
|
|
16539
|
+
legend: zLegend.nullish(),
|
|
16540
|
+
tooltip: zTooltip.nullish(),
|
|
16541
|
+
xAxis: zXBandAxis.nullish(),
|
|
16542
|
+
yAxis: zYLinearAxis.nullish(),
|
|
16543
|
+
sort: zSort.nullish(),
|
|
16544
|
+
sortLegent: zSortLegend.nullish(),
|
|
16545
|
+
crosshairRect: zCrosshairRect.nullish(),
|
|
16546
|
+
theme: zTheme.nullish(),
|
|
16547
|
+
whiskers: zWhiskersConfig.nullish(),
|
|
16548
|
+
annotationPoint: schemas_array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
|
|
16549
|
+
annotationVerticalLine: schemas_array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
|
|
16550
|
+
annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
|
|
16551
|
+
annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
|
|
16552
|
+
locale: zLocale.nullish()
|
|
16553
|
+
});
|
|
14915
16554
|
const zVSeed = discriminatedUnion('chartType', [
|
|
14916
16555
|
zTable,
|
|
14917
16556
|
zPivotTable,
|
|
@@ -14932,7 +16571,9 @@
|
|
|
14932
16571
|
zRoseParallel,
|
|
14933
16572
|
zRadar,
|
|
14934
16573
|
zFunnel,
|
|
14935
|
-
zHeatmap
|
|
16574
|
+
zHeatmap,
|
|
16575
|
+
zBoxplot,
|
|
16576
|
+
zHistogram
|
|
14936
16577
|
]);
|
|
14937
16578
|
const zAdvancedVSeed = schemas_object({
|
|
14938
16579
|
chartType: zChartType,
|
|
@@ -14947,7 +16588,8 @@
|
|
|
14947
16588
|
markStyle: zMarkStyle,
|
|
14948
16589
|
customTheme: zCustomThemeConfig,
|
|
14949
16590
|
annotation: zAnnotation,
|
|
14950
|
-
locale: zLocale
|
|
16591
|
+
locale: zLocale,
|
|
16592
|
+
histogramRegressionLine: zHistogramRegressionLine.or(schemas_array(zHistogramRegressionLine)).nullish()
|
|
14951
16593
|
});
|
|
14952
16594
|
return __webpack_exports__;
|
|
14953
16595
|
})());
|