@visactor/vseed 0.1.37 → 0.1.39
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 +4147 -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/dualAxis.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/dualAxis.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.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 +0 -1
- package/dist/esm/pipeline/spec/chart/pipeline/bar.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/dualAxis.js +5 -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/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 +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/index.js +1 -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/init/pivot.js +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/pivot.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/label/label.d.ts +15 -4
- 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 +49 -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/init/pivotTable.js +1 -0
- package/dist/esm/pipeline/spec/table/pipes/init/pivotTable.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/init/table.js +1 -0
- package/dist/esm/pipeline/spec/table/pipes/init/table.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/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 +18 -0
- package/dist/esm/theme/dark/dark.js.map +1 -1
- package/dist/esm/theme/light/light.js +18 -0
- package/dist/esm/theme/light/light.js.map +1 -1
- package/dist/esm/types/advancedVSeed.d.ts +1441 -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/zBar.d.ts +9 -0
- package/dist/esm/types/chartType/barParallel/zBarParallel.d.ts +9 -0
- package/dist/esm/types/chartType/barPercent/zBarPercent.d.ts +9 -0
- 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/zColumn.d.ts +25 -0
- package/dist/esm/types/chartType/column/zColumn.js +3 -1
- package/dist/esm/types/chartType/column/zColumn.js.map +1 -1
- package/dist/esm/types/chartType/columnParallel/zColumnParallel.d.ts +9 -0
- package/dist/esm/types/chartType/columnPercent/zColumnPercent.d.ts +9 -0
- package/dist/esm/types/chartType/donut/zDonut.d.ts +9 -0
- 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/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 +6 -0
- package/dist/esm/types/properties/config/config.d.ts +697 -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 +1 -0
- package/dist/esm/types/properties/config/index.js +1 -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 +1935 -541
- package/dist/esm/types/vseed.d.ts +2 -2
- package/dist/esm/types/zVseed.d.ts +2717 -0
- package/dist/esm/types/zVseed.js +4 -2
- package/dist/esm/types/zVseed.js.map +1 -1
- package/dist/umd/index.js +1748 -140
- 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,8 +122,9 @@
|
|
|
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
130
|
registerRose: ()=>registerRose,
|
|
@@ -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,
|
|
@@ -211,12 +222,14 @@
|
|
|
211
222
|
selector: ()=>selector_selector,
|
|
212
223
|
isMeasures: ()=>isMeasures,
|
|
213
224
|
zYBandAxis: ()=>zYBandAxis,
|
|
225
|
+
BinPercentageMeasureId: ()=>BinPercentageMeasureId,
|
|
214
226
|
Separator: ()=>"-",
|
|
215
227
|
findAllMeasures: ()=>findAllMeasures,
|
|
216
228
|
zColorLegend: ()=>zColorLegend,
|
|
217
229
|
EncodingEnum: ()=>EncodingEnum,
|
|
218
230
|
preorderTraverse: ()=>preorderTraverse,
|
|
219
231
|
roseParallelSpecPipeline: ()=>roseParallelSpecPipeline,
|
|
232
|
+
registerHistogram: ()=>registerHistogram,
|
|
220
233
|
zRoseParallel: ()=>zRoseParallel,
|
|
221
234
|
MeasureName: ()=>MeasureName,
|
|
222
235
|
zNumFormat: ()=>zNumFormat,
|
|
@@ -251,9 +264,12 @@
|
|
|
251
264
|
roseParallelAdvancedPipeline: ()=>roseParallelAdvancedPipeline,
|
|
252
265
|
zPieConfig: ()=>zPieConfig,
|
|
253
266
|
Builder: ()=>Builder,
|
|
267
|
+
zWhiskersConfig: ()=>zWhiskersConfig,
|
|
254
268
|
radarSpecPipeline: ()=>radarSpecPipeline,
|
|
269
|
+
OutliersMeasureId: ()=>OutliersMeasureId,
|
|
255
270
|
zRadar: ()=>zRadar,
|
|
256
271
|
zTable: ()=>zTable,
|
|
272
|
+
histogramSpecPipeline: ()=>histogramSpecPipeline,
|
|
257
273
|
registerLine: ()=>registerLine,
|
|
258
274
|
registerCustomTheme: ()=>registerCustomTheme,
|
|
259
275
|
zMeasureGroup: ()=>zMeasureGroup,
|
|
@@ -271,6 +287,7 @@
|
|
|
271
287
|
zLinearColor: ()=>zLinearColor,
|
|
272
288
|
DUAL_AXIS_CHART_NON_COLUMN_Z_INDEX: ()=>1001,
|
|
273
289
|
zAreaStyle: ()=>zAreaStyle,
|
|
290
|
+
BinEndMeasureId: ()=>BinEndMeasureId,
|
|
274
291
|
zAnnotationArea: ()=>zAnnotationArea,
|
|
275
292
|
DetailEncoding: ()=>DetailEncoding,
|
|
276
293
|
isPivot: ()=>isPivot,
|
|
@@ -279,6 +296,7 @@
|
|
|
279
296
|
lightTheme: ()=>lightTheme,
|
|
280
297
|
registerColumnParallel: ()=>registerColumnParallel,
|
|
281
298
|
updateAdvanced: ()=>updateAdvanced,
|
|
299
|
+
histogramAdvancedPipeline: ()=>histogramAdvancedPipeline,
|
|
282
300
|
isAreaPercent: ()=>isAreaPercent,
|
|
283
301
|
zColumn: ()=>zColumn,
|
|
284
302
|
zCustomTheme: ()=>zCustomTheme,
|
|
@@ -288,15 +306,18 @@
|
|
|
288
306
|
ChartTypeEnum: ()=>ChartTypeEnum,
|
|
289
307
|
zVSeed: ()=>zVSeed,
|
|
290
308
|
radarAdvancedPipeline: ()=>radarAdvancedPipeline,
|
|
309
|
+
registerDualAxis: ()=>registerDualAxis,
|
|
291
310
|
registerBarParallel: ()=>registerBarParallel,
|
|
292
311
|
pivotTableSpecPipeline: ()=>pivotTableSpecPipeline,
|
|
293
312
|
DUAL_AXIS_LABEL_Z_INDEX: ()=>1002,
|
|
294
313
|
MeasureEncodingEnum: ()=>MeasureEncodingEnum,
|
|
295
314
|
FoldXMeasureValue: ()=>FoldXMeasureValue,
|
|
296
|
-
|
|
315
|
+
boxplotAdvancedPipeline: ()=>boxplotAdvancedPipeline,
|
|
297
316
|
zEncoding: ()=>zEncoding,
|
|
317
|
+
dualAxisAdvancedPipeline: ()=>dualAxisAdvancedPipeline,
|
|
298
318
|
ColorEncoding: ()=>ColorEncoding,
|
|
299
319
|
measureDepth: ()=>measureDepth,
|
|
320
|
+
BinCountMeasureId: ()=>BinCountMeasureId,
|
|
300
321
|
zAdvancedVSeed: ()=>zAdvancedVSeed,
|
|
301
322
|
zAreaPercent: ()=>zAreaPercent,
|
|
302
323
|
isValueSelector: ()=>isValueSelector,
|
|
@@ -306,9 +327,9 @@
|
|
|
306
327
|
zTooltip: ()=>zTooltip,
|
|
307
328
|
isBarLikeChart: ()=>isBarLikeChart,
|
|
308
329
|
barParallelAdvancedPipeline: ()=>barParallelAdvancedPipeline,
|
|
309
|
-
deleteMeasureTreeByCallback: ()=>deleteMeasureTreeByCallback,
|
|
310
|
-
zBarPercentConfig: ()=>zBarPercentConfig,
|
|
311
330
|
barPercentSpecPipeline: ()=>barPercentSpecPipeline,
|
|
331
|
+
zBarPercentConfig: ()=>zBarPercentConfig,
|
|
332
|
+
deleteMeasureTreeByCallback: ()=>deleteMeasureTreeByCallback,
|
|
312
333
|
dataReshapeByEncoding: ()=>dataReshapeByEncoding,
|
|
313
334
|
lineSpecPipeline: ()=>lineSpecPipeline,
|
|
314
335
|
zDimensionGroup: ()=>zDimensionGroup
|
|
@@ -351,7 +372,7 @@
|
|
|
351
372
|
const { chartType } = builder.vseed;
|
|
352
373
|
if (!chartType) throw new Error('chartType is nil in buildAdvanced');
|
|
353
374
|
const pipeline = Builder.getAdvancedPipeline(chartType);
|
|
354
|
-
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}`);
|
|
355
376
|
const context = {
|
|
356
377
|
vseed: builder.vseed,
|
|
357
378
|
customTheme: Builder.getThemeMap()
|
|
@@ -564,7 +585,9 @@
|
|
|
564
585
|
Donut: 'donut',
|
|
565
586
|
Radar: 'radar',
|
|
566
587
|
Funnel: 'funnel',
|
|
567
|
-
Heatmap: 'heatmap'
|
|
588
|
+
Heatmap: 'heatmap',
|
|
589
|
+
Boxplot: 'boxPlot',
|
|
590
|
+
Histogram: 'histogram'
|
|
568
591
|
};
|
|
569
592
|
const DATUM_HIDE_KEY = '__VSEED_HideItem__';
|
|
570
593
|
const isTable = (vseed)=>vseed.chartType === ChartTypeEnum.Table;
|
|
@@ -993,6 +1016,7 @@
|
|
|
993
1016
|
...spec,
|
|
994
1017
|
records: dataset,
|
|
995
1018
|
widthMode: 'standard',
|
|
1019
|
+
defaultHeaderColWidth: 'auto',
|
|
996
1020
|
heightMode: 'autoHeight',
|
|
997
1021
|
autoWrapText: true,
|
|
998
1022
|
columnResizeMode: 'all',
|
|
@@ -1206,6 +1230,7 @@
|
|
|
1206
1230
|
const fontSize = themeConfig.bodyFontSize || 12;
|
|
1207
1231
|
const hoverCellBgColor = themeConfig.hoverBodyBackgroundColor || '#bedaff';
|
|
1208
1232
|
const hoverInlineColor = themeConfig.hoverBodyInlineBackgroundColor || '#bedaff';
|
|
1233
|
+
if (!result.theme) result.theme = {};
|
|
1209
1234
|
result.theme.bodyStyle = {
|
|
1210
1235
|
borderColor: borderColor,
|
|
1211
1236
|
borderLineWidth: 1,
|
|
@@ -1342,6 +1367,14 @@
|
|
|
1342
1367
|
const DetailEncoding = '__Dim_Detail__';
|
|
1343
1368
|
const ColorEncoding = '__Dim_Color__';
|
|
1344
1369
|
const ColorIdEncoding = '__Dim_ColorId__';
|
|
1370
|
+
const MinMeasureId = '__Min__';
|
|
1371
|
+
const MaxMeasureId = '__Max__';
|
|
1372
|
+
const OutliersMeasureId = '__Outliers__';
|
|
1373
|
+
const MedianMeasureId = '__Meadian__';
|
|
1374
|
+
const BinStartMeasureId = '__BinStart__';
|
|
1375
|
+
const BinEndMeasureId = '__BinEnd__';
|
|
1376
|
+
const BinCountMeasureId = '__BinCount__';
|
|
1377
|
+
const BinPercentageMeasureId = '__BinPercentage__';
|
|
1345
1378
|
const defaultMeasureName = (advancedVSeed)=>{
|
|
1346
1379
|
const result = {
|
|
1347
1380
|
...advancedVSeed
|
|
@@ -1550,6 +1583,7 @@
|
|
|
1550
1583
|
...spec,
|
|
1551
1584
|
records: dataset,
|
|
1552
1585
|
widthMode: 'standard',
|
|
1586
|
+
defaultHeaderColWidth: 'auto',
|
|
1553
1587
|
heightMode: 'autoHeight',
|
|
1554
1588
|
autoWrapText: true,
|
|
1555
1589
|
columnResizeMode: 'all',
|
|
@@ -1750,20 +1784,12 @@
|
|
|
1750
1784
|
};
|
|
1751
1785
|
return result;
|
|
1752
1786
|
};
|
|
1753
|
-
var new_data_set_AggregationType;
|
|
1754
|
-
!function(AggregationType) {
|
|
1755
|
-
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";
|
|
1756
|
-
}(new_data_set_AggregationType || (new_data_set_AggregationType = {}));
|
|
1757
|
-
var new_data_set_SortType;
|
|
1758
|
-
!function(SortType) {
|
|
1759
|
-
SortType.ASC = "ASC", SortType.DESC = "DESC", SortType.NORMAL = "NORMAL", SortType.desc = "desc", SortType.asc = "asc", SortType.normal = "normal";
|
|
1760
|
-
}(new_data_set_SortType || (new_data_set_SortType = {}));
|
|
1761
1787
|
const dataConfig = (spec, context)=>{
|
|
1762
1788
|
const { advancedVSeed } = context;
|
|
1763
1789
|
const measures = findAllMeasures(advancedVSeed.measures);
|
|
1764
1790
|
const aggregationRules = measures.map((measure)=>({
|
|
1765
1791
|
field: measure.id,
|
|
1766
|
-
aggregationType:
|
|
1792
|
+
aggregationType: 'NONE',
|
|
1767
1793
|
indicatorKey: measure.id
|
|
1768
1794
|
}));
|
|
1769
1795
|
return {
|
|
@@ -2143,8 +2169,8 @@
|
|
|
2143
2169
|
applyEncoding(ColorEncoding, colorDimensions, datum, separator);
|
|
2144
2170
|
applyEncoding(DetailEncoding, detailDimensions, datum, separator);
|
|
2145
2171
|
if (!colorDimensions.length || !datum[ColorEncoding]) continue;
|
|
2146
|
-
const measureId = String(datum[foldMeasureId]);
|
|
2147
|
-
const colorItem = String(datum[ColorEncoding]);
|
|
2172
|
+
const measureId = String(datum[foldMeasureId] ?? '');
|
|
2173
|
+
const colorItem = String(datum[ColorEncoding] ?? '');
|
|
2148
2174
|
const colorId = colorItemAsId ? colorItem : measureId ? [
|
|
2149
2175
|
colorItem,
|
|
2150
2176
|
measureId
|
|
@@ -2605,18 +2631,14 @@
|
|
|
2605
2631
|
}
|
|
2606
2632
|
};
|
|
2607
2633
|
};
|
|
2608
|
-
const progressive = (spec
|
|
2634
|
+
const progressive = (spec)=>{
|
|
2609
2635
|
const result = {
|
|
2610
2636
|
...spec
|
|
2611
2637
|
};
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
const size = dataset.length;
|
|
2615
|
-
if (size < 5000) return result;
|
|
2616
|
-
result.large = true;
|
|
2617
|
-
result.largeThreshold = 5000;
|
|
2638
|
+
result.large = false;
|
|
2639
|
+
result.largeThreshold = 1 / 0;
|
|
2618
2640
|
result.progressiveStep = 400;
|
|
2619
|
-
result.progressiveThreshold =
|
|
2641
|
+
result.progressiveThreshold = 1 / 0;
|
|
2620
2642
|
return result;
|
|
2621
2643
|
};
|
|
2622
2644
|
const defaultTitleText = (measures, dimensions, idList = [])=>{
|
|
@@ -3960,6 +3982,7 @@
|
|
|
3960
3982
|
indicators: [],
|
|
3961
3983
|
records: [],
|
|
3962
3984
|
widthMode: 'adaptive',
|
|
3985
|
+
defaultHeaderColWidth: 'auto',
|
|
3963
3986
|
heightMode: 'adaptive',
|
|
3964
3987
|
indicatorsAsCol: false,
|
|
3965
3988
|
select: {
|
|
@@ -3997,6 +4020,8 @@
|
|
|
3997
4020
|
const headerBackgroundColor = themConfig.headerBackgroundColor ?? 'rgba(0,0,0,0)';
|
|
3998
4021
|
const hoverHeaderBackgroundColor = onlyCombination ? transparent : themConfig.hoverHeaderBackgroundColor ?? '#D9DDE4';
|
|
3999
4022
|
const hoverHeaderInlineBackgroundColor = onlyCombination ? transparent : themConfig.hoverHeaderInlineBackgroundColor ?? '#D9DDE455';
|
|
4023
|
+
const outlineBorderLineWidth = themConfig.outlineBorderLineWidth ?? 0;
|
|
4024
|
+
const frameCornerRadius = themConfig.frameCornerRadius ?? 0;
|
|
4000
4025
|
return {
|
|
4001
4026
|
...result,
|
|
4002
4027
|
theme: {
|
|
@@ -4006,8 +4031,8 @@
|
|
|
4006
4031
|
color: bodyFontColor,
|
|
4007
4032
|
borderLineWidth: [
|
|
4008
4033
|
1,
|
|
4009
|
-
|
|
4010
|
-
|
|
4034
|
+
outlineBorderLineWidth,
|
|
4035
|
+
0,
|
|
4011
4036
|
1
|
|
4012
4037
|
],
|
|
4013
4038
|
bgColor: transparent,
|
|
@@ -4018,7 +4043,12 @@
|
|
|
4018
4043
|
headerStyle: {
|
|
4019
4044
|
borderColor,
|
|
4020
4045
|
fontSize: 12,
|
|
4021
|
-
borderLineWidth:
|
|
4046
|
+
borderLineWidth: [
|
|
4047
|
+
outlineBorderLineWidth,
|
|
4048
|
+
outlineBorderLineWidth,
|
|
4049
|
+
1,
|
|
4050
|
+
1
|
|
4051
|
+
],
|
|
4022
4052
|
color: headerFontColor,
|
|
4023
4053
|
textAlign: 'center',
|
|
4024
4054
|
bgColor: headerBackgroundColor,
|
|
@@ -4032,7 +4062,18 @@
|
|
|
4032
4062
|
borderColor,
|
|
4033
4063
|
fontSize: 12,
|
|
4034
4064
|
color: headerFontColor,
|
|
4035
|
-
|
|
4065
|
+
padding: [
|
|
4066
|
+
0,
|
|
4067
|
+
4,
|
|
4068
|
+
0,
|
|
4069
|
+
4
|
|
4070
|
+
],
|
|
4071
|
+
borderLineWidth: [
|
|
4072
|
+
1,
|
|
4073
|
+
1,
|
|
4074
|
+
1,
|
|
4075
|
+
outlineBorderLineWidth
|
|
4076
|
+
],
|
|
4036
4077
|
bgColor: headerBackgroundColor,
|
|
4037
4078
|
hover: {
|
|
4038
4079
|
cellBgColor: hoverHeaderBackgroundColor,
|
|
@@ -4045,16 +4086,27 @@
|
|
|
4045
4086
|
textAlign: 'center',
|
|
4046
4087
|
fontSize: 12,
|
|
4047
4088
|
color: headerFontColor,
|
|
4089
|
+
padding: [
|
|
4090
|
+
0,
|
|
4091
|
+
4,
|
|
4092
|
+
0,
|
|
4093
|
+
4
|
|
4094
|
+
],
|
|
4048
4095
|
fontWeight: 'bold',
|
|
4049
|
-
borderLineWidth:
|
|
4096
|
+
borderLineWidth: [
|
|
4097
|
+
outlineBorderLineWidth,
|
|
4098
|
+
1,
|
|
4099
|
+
1,
|
|
4100
|
+
outlineBorderLineWidth
|
|
4101
|
+
],
|
|
4050
4102
|
bgColor: headerBackgroundColor,
|
|
4051
4103
|
frameStyle: {
|
|
4052
4104
|
borderColor,
|
|
4053
4105
|
borderLineWidth: [
|
|
4054
|
-
|
|
4106
|
+
outlineBorderLineWidth,
|
|
4055
4107
|
0,
|
|
4056
4108
|
0,
|
|
4057
|
-
|
|
4109
|
+
outlineBorderLineWidth
|
|
4058
4110
|
]
|
|
4059
4111
|
},
|
|
4060
4112
|
hover: {
|
|
@@ -4069,7 +4121,7 @@
|
|
|
4069
4121
|
frameStyle: {
|
|
4070
4122
|
borderColor,
|
|
4071
4123
|
borderLineWidth: [
|
|
4072
|
-
|
|
4124
|
+
outlineBorderLineWidth,
|
|
4073
4125
|
1,
|
|
4074
4126
|
0,
|
|
4075
4127
|
1
|
|
@@ -4085,8 +4137,8 @@
|
|
|
4085
4137
|
borderLineWidth: [
|
|
4086
4138
|
1,
|
|
4087
4139
|
0,
|
|
4088
|
-
|
|
4089
|
-
|
|
4140
|
+
outlineBorderLineWidth,
|
|
4141
|
+
outlineBorderLineWidth
|
|
4090
4142
|
],
|
|
4091
4143
|
bgColor: headerBackgroundColor,
|
|
4092
4144
|
frameStyle: {
|
|
@@ -4094,8 +4146,8 @@
|
|
|
4094
4146
|
borderLineWidth: [
|
|
4095
4147
|
1,
|
|
4096
4148
|
0,
|
|
4097
|
-
|
|
4098
|
-
|
|
4149
|
+
outlineBorderLineWidth,
|
|
4150
|
+
outlineBorderLineWidth
|
|
4099
4151
|
]
|
|
4100
4152
|
},
|
|
4101
4153
|
hover: {
|
|
@@ -4129,7 +4181,12 @@
|
|
|
4129
4181
|
},
|
|
4130
4182
|
bottomFrozenStyle: {
|
|
4131
4183
|
borderColor,
|
|
4132
|
-
borderLineWidth:
|
|
4184
|
+
borderLineWidth: [
|
|
4185
|
+
1,
|
|
4186
|
+
outlineBorderLineWidth,
|
|
4187
|
+
outlineBorderLineWidth,
|
|
4188
|
+
1
|
|
4189
|
+
],
|
|
4133
4190
|
bgColor: headerBackgroundColor,
|
|
4134
4191
|
hover: {
|
|
4135
4192
|
cellBgColor: hoverHeaderBackgroundColor
|
|
@@ -4141,7 +4198,8 @@
|
|
|
4141
4198
|
},
|
|
4142
4199
|
frameStyle: {
|
|
4143
4200
|
borderColor,
|
|
4144
|
-
cornerRadius:
|
|
4201
|
+
cornerRadius: frameCornerRadius,
|
|
4202
|
+
borderLineWidth: outlineBorderLineWidth
|
|
4145
4203
|
}
|
|
4146
4204
|
}
|
|
4147
4205
|
};
|
|
@@ -4672,6 +4730,7 @@
|
|
|
4672
4730
|
const stackCornerRadius = advancedVSeed.config?.[chartType]?.stackCornerRadius;
|
|
4673
4731
|
const { datasetReshapeInfo } = advancedVSeed;
|
|
4674
4732
|
const { foldInfo } = datasetReshapeInfo[0];
|
|
4733
|
+
if ('dualAxis' === chartType && 'bar' !== spec.type) return spec;
|
|
4675
4734
|
return {
|
|
4676
4735
|
...spec,
|
|
4677
4736
|
stackCornerRadius: (_, datum)=>{
|
|
@@ -5249,7 +5308,7 @@
|
|
|
5249
5308
|
markStyle_markStyle,
|
|
5250
5309
|
annotation_annotation
|
|
5251
5310
|
];
|
|
5252
|
-
const
|
|
5311
|
+
const percent_percent = (spec)=>{
|
|
5253
5312
|
const result = {
|
|
5254
5313
|
...spec
|
|
5255
5314
|
};
|
|
@@ -5263,7 +5322,7 @@
|
|
|
5263
5322
|
barMaxWidth_barMaxWidth,
|
|
5264
5323
|
colorAdapter(color_color, linearColor),
|
|
5265
5324
|
background_backgroundColor,
|
|
5266
|
-
|
|
5325
|
+
percent_percent,
|
|
5267
5326
|
datasetXY,
|
|
5268
5327
|
progressive,
|
|
5269
5328
|
xBand,
|
|
@@ -5288,7 +5347,7 @@
|
|
|
5288
5347
|
stackCornerRadius_stackCornerRadius,
|
|
5289
5348
|
stackInverse,
|
|
5290
5349
|
colorAdapter(color_color, linearColor),
|
|
5291
|
-
|
|
5350
|
+
percent_percent,
|
|
5292
5351
|
background_backgroundColor,
|
|
5293
5352
|
datasetXY,
|
|
5294
5353
|
progressive,
|
|
@@ -5734,7 +5793,6 @@
|
|
|
5734
5793
|
xLinear,
|
|
5735
5794
|
yBand,
|
|
5736
5795
|
label_label,
|
|
5737
|
-
label_label,
|
|
5738
5796
|
tooltip_tooltip,
|
|
5739
5797
|
colorBarStyleFill(barStyle_barStyle),
|
|
5740
5798
|
horizontalCrosshairRect,
|
|
@@ -5902,7 +5960,7 @@
|
|
|
5902
5960
|
barMaxWidth_barMaxWidth,
|
|
5903
5961
|
colorAdapter(color_color, linearColor),
|
|
5904
5962
|
background_backgroundColor,
|
|
5905
|
-
|
|
5963
|
+
percent_percent,
|
|
5906
5964
|
datasetYX,
|
|
5907
5965
|
progressive,
|
|
5908
5966
|
xLinear,
|
|
@@ -5927,7 +5985,7 @@
|
|
|
5927
5985
|
stackCornerRadius_stackCornerRadius,
|
|
5928
5986
|
colorAdapter(color_color, linearColor),
|
|
5929
5987
|
background_backgroundColor,
|
|
5930
|
-
|
|
5988
|
+
percent_percent,
|
|
5931
5989
|
datasetYX,
|
|
5932
5990
|
yBand,
|
|
5933
5991
|
xLinear,
|
|
@@ -6180,7 +6238,7 @@
|
|
|
6180
6238
|
stackInverse,
|
|
6181
6239
|
colorAdapter(color_color, linearColor),
|
|
6182
6240
|
background_backgroundColor,
|
|
6183
|
-
|
|
6241
|
+
percent_percent,
|
|
6184
6242
|
datasetXY,
|
|
6185
6243
|
progressive,
|
|
6186
6244
|
xBand,
|
|
@@ -6208,7 +6266,7 @@
|
|
|
6208
6266
|
stackInverse,
|
|
6209
6267
|
colorAdapter(color_color, linearColor),
|
|
6210
6268
|
background_backgroundColor,
|
|
6211
|
-
|
|
6269
|
+
percent_percent,
|
|
6212
6270
|
datasetXY,
|
|
6213
6271
|
progressive,
|
|
6214
6272
|
xBand,
|
|
@@ -7144,7 +7202,8 @@
|
|
|
7144
7202
|
'crosshairLine',
|
|
7145
7203
|
'crosshairRect',
|
|
7146
7204
|
'barGapInGroup',
|
|
7147
|
-
'barMaxWidth'
|
|
7205
|
+
'barMaxWidth',
|
|
7206
|
+
'stackCornerRadius'
|
|
7148
7207
|
]);
|
|
7149
7208
|
const config = replaceNullToUndefined(pickedConfig);
|
|
7150
7209
|
result.config = {
|
|
@@ -7185,7 +7244,7 @@
|
|
|
7185
7244
|
markStyle_markStyle,
|
|
7186
7245
|
annotation_annotation
|
|
7187
7246
|
];
|
|
7188
|
-
const
|
|
7247
|
+
const series_series = (...args)=>{
|
|
7189
7248
|
const result = {
|
|
7190
7249
|
type: 'common',
|
|
7191
7250
|
padding: 0,
|
|
@@ -7768,6 +7827,7 @@
|
|
|
7768
7827
|
progressive,
|
|
7769
7828
|
barMaxWidth_barMaxWidth,
|
|
7770
7829
|
barGapInGroup_barGapInGroup,
|
|
7830
|
+
stackCornerRadius_stackCornerRadius,
|
|
7771
7831
|
colorBarStyleFill(barStyle_barStyle),
|
|
7772
7832
|
colorPointStyleFill(pointStyle_pointStyle),
|
|
7773
7833
|
pointStateDimensionHover,
|
|
@@ -7782,6 +7842,7 @@
|
|
|
7782
7842
|
progressive,
|
|
7783
7843
|
barMaxWidth_barMaxWidth,
|
|
7784
7844
|
barGapInGroup_barGapInGroup,
|
|
7845
|
+
stackCornerRadius_stackCornerRadius,
|
|
7785
7846
|
colorBarStyleFill(barStyle_barStyle),
|
|
7786
7847
|
colorPointStyleFill(pointStyle_pointStyle),
|
|
7787
7848
|
pointStateDimensionHover,
|
|
@@ -7806,13 +7867,14 @@
|
|
|
7806
7867
|
pivotIndicatorsAsRow,
|
|
7807
7868
|
datasetPivot,
|
|
7808
7869
|
pivotIndicators_pivotIndicators([
|
|
7809
|
-
|
|
7870
|
+
series_series([
|
|
7810
7871
|
initDualAxisPrimary,
|
|
7811
7872
|
dualChartTypePrimary,
|
|
7812
7873
|
datasetPrimary,
|
|
7813
7874
|
labelPrimary,
|
|
7814
7875
|
tooltipPrimary,
|
|
7815
7876
|
progressive,
|
|
7877
|
+
stackCornerRadius_stackCornerRadius,
|
|
7816
7878
|
barMaxWidth_barMaxWidth,
|
|
7817
7879
|
barGapInGroup_barGapInGroup,
|
|
7818
7880
|
colorBarStyleFill(barStyle_barStyle),
|
|
@@ -7827,6 +7889,7 @@
|
|
|
7827
7889
|
labelSecondary,
|
|
7828
7890
|
tooltipSecondary,
|
|
7829
7891
|
progressive,
|
|
7892
|
+
stackCornerRadius_stackCornerRadius,
|
|
7830
7893
|
barMaxWidth_barMaxWidth,
|
|
7831
7894
|
barGapInGroup_barGapInGroup,
|
|
7832
7895
|
colorBarStyleFill(barStyle_barStyle),
|
|
@@ -9263,83 +9326,1462 @@
|
|
|
9263
9326
|
Builder._advancedPipelineMap.heatmap = heatmapAdvancedPipeline;
|
|
9264
9327
|
Builder._specPipelineMap.heatmap = heatmapSpecPipeline;
|
|
9265
9328
|
};
|
|
9266
|
-
const
|
|
9267
|
-
|
|
9268
|
-
|
|
9269
|
-
|
|
9270
|
-
|
|
9271
|
-
|
|
9272
|
-
|
|
9273
|
-
|
|
9274
|
-
|
|
9275
|
-
|
|
9276
|
-
|
|
9277
|
-
|
|
9278
|
-
|
|
9279
|
-
|
|
9280
|
-
|
|
9281
|
-
|
|
9282
|
-
|
|
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
|
-
|
|
9308
|
-
|
|
9309
|
-
|
|
9310
|
-
|
|
9311
|
-
|
|
9312
|
-
|
|
9313
|
-
|
|
9314
|
-
|
|
9315
|
-
|
|
9316
|
-
|
|
9317
|
-
|
|
9318
|
-
|
|
9319
|
-
|
|
9320
|
-
|
|
9329
|
+
const boxplotConfig = (advancedVSeed, context)=>{
|
|
9330
|
+
const { vseed } = context;
|
|
9331
|
+
const { chartType } = vseed;
|
|
9332
|
+
const result = {
|
|
9333
|
+
...advancedVSeed
|
|
9334
|
+
};
|
|
9335
|
+
const pickedConfig = chunk_2T7K3PFL_i(vseed, [
|
|
9336
|
+
'backgroundColor',
|
|
9337
|
+
'color',
|
|
9338
|
+
'label',
|
|
9339
|
+
'legend',
|
|
9340
|
+
'tooltip',
|
|
9341
|
+
'xAxis',
|
|
9342
|
+
'yAxis',
|
|
9343
|
+
'crosshairRect',
|
|
9344
|
+
'whiskers'
|
|
9345
|
+
]);
|
|
9346
|
+
const config = replaceNullToUndefined(pickedConfig);
|
|
9347
|
+
result.config = {
|
|
9348
|
+
...result.config || {},
|
|
9349
|
+
[chartType]: {
|
|
9350
|
+
...config
|
|
9351
|
+
}
|
|
9352
|
+
};
|
|
9353
|
+
return result;
|
|
9354
|
+
};
|
|
9355
|
+
const defaultEncodingForBoxplot = (advancedVSeed)=>{
|
|
9356
|
+
const { measures: vseedMeasures = [], dimensions = [] } = advancedVSeed;
|
|
9357
|
+
const measures = findAllMeasures(vseedMeasures);
|
|
9358
|
+
const encoding = {};
|
|
9359
|
+
boxplot_generateDefaultDimensionEncoding(dimensions, encoding);
|
|
9360
|
+
boxplot_generateDefaultMeasureEncoding(measures, encoding);
|
|
9361
|
+
return {
|
|
9362
|
+
...advancedVSeed,
|
|
9363
|
+
encoding
|
|
9364
|
+
};
|
|
9365
|
+
};
|
|
9366
|
+
const encodingForBoxplot = (advancedVSeed)=>{
|
|
9367
|
+
const { measures: vseedMeasures = [], dimensions = [] } = advancedVSeed;
|
|
9368
|
+
const measures = findAllMeasures(vseedMeasures);
|
|
9369
|
+
const hasDimensionEncoding = dimensions.some((item)=>item.encoding);
|
|
9370
|
+
const hasMeasureEncoding = measures.some((item)=>item.encoding);
|
|
9371
|
+
const encoding = {};
|
|
9372
|
+
if (hasDimensionEncoding) boxplot_generateDimensionEncoding(dimensions, encoding, measures.length > 1);
|
|
9373
|
+
else boxplot_generateDefaultDimensionEncoding(dimensions, encoding);
|
|
9374
|
+
if (hasMeasureEncoding) boxplot_generateMeasureEncoding(measures, encoding);
|
|
9375
|
+
else boxplot_generateDefaultMeasureEncoding(measures, encoding);
|
|
9376
|
+
if ((!encoding.value || encoding.value.length <= 1) && encoding.color && encoding.color.length > 1) encoding.color = encoding.color.filter((c)=>c !== MeasureName);
|
|
9377
|
+
return {
|
|
9378
|
+
...advancedVSeed,
|
|
9379
|
+
encoding
|
|
9380
|
+
};
|
|
9381
|
+
};
|
|
9382
|
+
const boxplot_generateDefaultDimensionEncoding = (dimensions, encoding)=>{
|
|
9383
|
+
const onlyMeasureName = 1 === dimensions.length && dimensions.find((item)=>item.id === MeasureName);
|
|
9384
|
+
const uniqueDimIds = chunk_QJLMYOTX_i(dimensions.map((d)=>d.id));
|
|
9385
|
+
encoding.x = uniqueDimIds.slice(0, 1);
|
|
9386
|
+
encoding.color = uniqueDimIds.slice(onlyMeasureName ? 0 : 1);
|
|
9387
|
+
encoding.tooltip = uniqueDimIds.filter((d)=>d !== MeasureName);
|
|
9388
|
+
encoding.label = [];
|
|
9389
|
+
encoding.row = [];
|
|
9390
|
+
encoding.column = [];
|
|
9391
|
+
};
|
|
9392
|
+
const boxplot_generateDimensionEncoding = (dimensions, encoding, isMultiMeasure)=>{
|
|
9393
|
+
encoding.x = chunk_QJLMYOTX_i(dimensions.filter((item)=>'xAxis' === item.encoding).map((item)=>item.id));
|
|
9394
|
+
if (0 === encoding.x.length) encoding.x = [
|
|
9395
|
+
dimensions[0].id
|
|
9321
9396
|
];
|
|
9322
|
-
|
|
9323
|
-
|
|
9324
|
-
|
|
9397
|
+
addColorToEncoding(dimensions, encoding, isMultiMeasure);
|
|
9398
|
+
encoding.tooltip = chunk_QJLMYOTX_i(dimensions.map((item)=>item.id));
|
|
9399
|
+
encoding.tooltip = encoding.tooltip.filter((d)=>d !== MeasureName);
|
|
9400
|
+
encoding.label = chunk_QJLMYOTX_i(dimensions.filter((item)=>'label' === item.encoding).map((item)=>item.id));
|
|
9401
|
+
encoding.label = encoding.label.filter((d)=>d !== MeasureName);
|
|
9402
|
+
};
|
|
9403
|
+
const boxplot_generateDefaultMeasureEncoding = (measures, encoding)=>{
|
|
9404
|
+
encoding.value = chunk_QJLMYOTX_i(measures.filter((item)=>'value' === item.encoding || !item.encoding).map((item)=>item.id));
|
|
9405
|
+
};
|
|
9406
|
+
const boxplot_generateMeasureEncoding = (measures, encoding)=>{
|
|
9407
|
+
encoding.value = chunk_QJLMYOTX_i(measures.filter((item)=>'value' === item.encoding || !item.encoding).map((item)=>item.id));
|
|
9408
|
+
encoding.q1 = chunk_QJLMYOTX_i(measures.filter((item)=>'q1' === item.encoding).map((item)=>item.id));
|
|
9409
|
+
encoding.median = chunk_QJLMYOTX_i(measures.filter((item)=>'median' === item.encoding).map((item)=>item.id));
|
|
9410
|
+
encoding.q3 = chunk_QJLMYOTX_i(measures.filter((item)=>'q3' === item.encoding).map((item)=>item.id));
|
|
9411
|
+
encoding.min = chunk_QJLMYOTX_i(measures.filter((item)=>'min' === item.encoding).map((item)=>item.id));
|
|
9412
|
+
encoding.max = chunk_QJLMYOTX_i(measures.filter((item)=>'max' === item.encoding).map((item)=>item.id));
|
|
9413
|
+
encoding.outliers = chunk_QJLMYOTX_i(measures.filter((item)=>'outliers' === item.encoding).map((item)=>item.id));
|
|
9414
|
+
const color = chunk_QJLMYOTX_i(measures.filter((item)=>'color' === item.encoding).map((item)=>item.id));
|
|
9415
|
+
if (color.length > 0) encoding.color = color;
|
|
9416
|
+
const label = chunk_QJLMYOTX_i(measures.filter((item)=>'label' === item.encoding).map((item)=>item.id));
|
|
9417
|
+
encoding.label = chunk_QJLMYOTX_i([
|
|
9418
|
+
...encoding.label || [],
|
|
9419
|
+
...label
|
|
9420
|
+
]);
|
|
9421
|
+
const tooltip = chunk_QJLMYOTX_i(measures.filter((item)=>'tooltip' === item.encoding).map((item)=>item.id));
|
|
9422
|
+
encoding.tooltip = chunk_QJLMYOTX_i([
|
|
9423
|
+
...encoding.tooltip || [],
|
|
9424
|
+
...label,
|
|
9425
|
+
...tooltip
|
|
9426
|
+
]);
|
|
9427
|
+
};
|
|
9428
|
+
const isType_isType = (value, type)=>Object.prototype.toString.call(value) === `[object ${type}]`;
|
|
9429
|
+
const isType = isType_isType;
|
|
9430
|
+
const isArray = (value)=>Array.isArray ? Array.isArray(value) : isType(value, "Array");
|
|
9431
|
+
const common_isArray = isArray;
|
|
9432
|
+
const isNil = (value)=>null == value;
|
|
9433
|
+
const common_isNil = isNil;
|
|
9434
|
+
const clamp_clamp = function(input, min, max) {
|
|
9435
|
+
return input < min ? min : input > max ? max : input;
|
|
9436
|
+
};
|
|
9437
|
+
const clamp = clamp_clamp;
|
|
9438
|
+
function toNumber(a) {
|
|
9439
|
+
return Number(a);
|
|
9440
|
+
}
|
|
9441
|
+
function quantileSorted(values, percent, valueof = toNumber) {
|
|
9442
|
+
const n = values.length;
|
|
9443
|
+
if (!n) return;
|
|
9444
|
+
if (percent <= 0 || n < 2) return valueof(values[0], 0, values);
|
|
9445
|
+
if (percent >= 1) return valueof(values[n - 1], n - 1, values);
|
|
9446
|
+
const i = (n - 1) * percent, i0 = Math.floor(i), value0 = valueof(values[i0], i0, values);
|
|
9447
|
+
return value0 + (valueof(values[i0 + 1], i0 + 1, values) - value0) * (i - i0);
|
|
9448
|
+
}
|
|
9449
|
+
const boxplot_boxplot = (data, options)=>{
|
|
9450
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
9451
|
+
const field = null == options ? void 0 : options.field;
|
|
9452
|
+
if (!field) return [];
|
|
9453
|
+
const groupField = null == options ? void 0 : options.groupField;
|
|
9454
|
+
let whiskers = null != (_a = null == options ? void 0 : options.whiskers) ? _a : 1.5;
|
|
9455
|
+
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;
|
|
9456
|
+
for(let i = 0; i < n; i++){
|
|
9457
|
+
const d = data[i], v = d[field];
|
|
9458
|
+
if (common_isNil(v)) continue;
|
|
9459
|
+
const num = +v;
|
|
9460
|
+
if (!Number.isFinite(num)) continue;
|
|
9461
|
+
let key;
|
|
9462
|
+
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)=>[
|
|
9463
|
+
f,
|
|
9464
|
+
d[f]
|
|
9465
|
+
]))) : keyToGroup.set(key, groupField ? d[groupField] : null));
|
|
9466
|
+
const arr = groups.get(key);
|
|
9467
|
+
if (arr && arr.push(num), includeValues) {
|
|
9468
|
+
const rv = rawValues.get(key);
|
|
9469
|
+
rv && rv.push(d);
|
|
9470
|
+
}
|
|
9471
|
+
}
|
|
9472
|
+
if (common_isArray(whiskers)) whiskers = [
|
|
9473
|
+
clamp(Math.min.apply(null, whiskers), 0, 1),
|
|
9474
|
+
clamp(Math.max.apply(null, whiskers), 0, 1)
|
|
9325
9475
|
];
|
|
9326
|
-
|
|
9327
|
-
|
|
9328
|
-
|
|
9329
|
-
|
|
9330
|
-
|
|
9331
|
-
|
|
9332
|
-
|
|
9476
|
+
const out = [];
|
|
9477
|
+
for (const [key, vals] of groups){
|
|
9478
|
+
if (!vals || 0 === vals.length) continue;
|
|
9479
|
+
const sorted = vals.slice().sort((a, b)=>a - b), count = sorted.length, dataMin = sorted[0], dataMax = sorted[sorted.length - 1];
|
|
9480
|
+
let sum = 0;
|
|
9481
|
+
for(let i = 0; i < sorted.length; i++)sum += sorted[i];
|
|
9482
|
+
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;
|
|
9483
|
+
let lowerWhisker = dataMin;
|
|
9484
|
+
for(let i = 0; i < sorted.length; i++)if (sorted[i] >= lowerBound) {
|
|
9485
|
+
lowerWhisker = sorted[i];
|
|
9486
|
+
break;
|
|
9487
|
+
}
|
|
9488
|
+
let upperWhisker = dataMax;
|
|
9489
|
+
for(let i = sorted.length - 1; i >= 0; i--)if (sorted[i] <= upperBound) {
|
|
9490
|
+
upperWhisker = sorted[i];
|
|
9491
|
+
break;
|
|
9492
|
+
}
|
|
9493
|
+
const outliers = [];
|
|
9494
|
+
for(let i = 0; i < sorted.length; i++)(sorted[i] < lowerWhisker || sorted[i] > upperWhisker) && outliers.push(sorted[i]);
|
|
9495
|
+
const obj = {}, representative = keyToGroup.get(key);
|
|
9496
|
+
if (null !== keyName) obj[keyName] = representative;
|
|
9497
|
+
else if (common_isArray(groupField)) {
|
|
9498
|
+
const groupObj = representative || {};
|
|
9499
|
+
for (const f of groupField)obj[f] = groupObj[f];
|
|
9500
|
+
}
|
|
9501
|
+
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);
|
|
9502
|
+
}
|
|
9503
|
+
return out;
|
|
9504
|
+
};
|
|
9505
|
+
const reshapeWithBoxplotEncoding = (advancedVSeed, context)=>{
|
|
9506
|
+
const result = {
|
|
9507
|
+
...advancedVSeed
|
|
9508
|
+
};
|
|
9509
|
+
const { vseed } = context;
|
|
9510
|
+
const { dataset, chartType } = vseed;
|
|
9511
|
+
const { dimensions = [], measures = [], encoding = {}, config } = advancedVSeed;
|
|
9512
|
+
const uniqDims = T(dimensions, (item)=>item.id);
|
|
9513
|
+
const whiskers = config?.[chartType]?.whiskers;
|
|
9514
|
+
let newDatasets = [];
|
|
9515
|
+
let foldInfo = {};
|
|
9516
|
+
let unfoldInfo = {};
|
|
9517
|
+
const allMeasures = findAllMeasures(measures);
|
|
9518
|
+
if (encoding.value?.length) encoding.value.forEach((f)=>{
|
|
9519
|
+
const m = allMeasures.find((m)=>m.id === f);
|
|
9520
|
+
const boxPlotData = boxplot_boxplot(dataset, {
|
|
9521
|
+
field: f,
|
|
9522
|
+
groupField: [
|
|
9523
|
+
...encoding.x ?? [],
|
|
9524
|
+
...encoding.color ?? []
|
|
9525
|
+
],
|
|
9526
|
+
whiskers,
|
|
9527
|
+
outputNames: {
|
|
9528
|
+
q1: "__Q1__",
|
|
9529
|
+
q3: "__Q3__",
|
|
9530
|
+
min: MinMeasureId,
|
|
9531
|
+
max: MaxMeasureId,
|
|
9532
|
+
median: MedianMeasureId,
|
|
9533
|
+
outliers: OutliersMeasureId
|
|
9534
|
+
}
|
|
9535
|
+
});
|
|
9536
|
+
boxPlotData.forEach((datum)=>{
|
|
9537
|
+
datum[FoldMeasureId] = f;
|
|
9538
|
+
datum[FoldMeasureName] = m?.alias ?? f;
|
|
9539
|
+
});
|
|
9540
|
+
const res = unfoldDimensions(boxPlotData, uniqDims, encoding, {
|
|
9541
|
+
foldMeasureId: FoldMeasureId,
|
|
9542
|
+
separator: "-",
|
|
9543
|
+
colorItemAsId: false
|
|
9544
|
+
});
|
|
9545
|
+
res.dataset.forEach((d)=>{
|
|
9546
|
+
newDatasets.push(d);
|
|
9547
|
+
});
|
|
9548
|
+
unfoldInfo = res.unfoldInfo;
|
|
9333
9549
|
});
|
|
9334
|
-
|
|
9335
|
-
|
|
9336
|
-
|
|
9337
|
-
|
|
9338
|
-
|
|
9339
|
-
|
|
9340
|
-
|
|
9550
|
+
else if (encoding.q1?.length && encoding.q3?.length && encoding.min?.length && encoding.max?.length && encoding.median?.length) {
|
|
9551
|
+
const res = unfoldDimensions(dataset, uniqDims, encoding, {
|
|
9552
|
+
foldMeasureId: FoldMeasureId,
|
|
9553
|
+
separator: "-",
|
|
9554
|
+
colorItemAsId: false
|
|
9555
|
+
});
|
|
9556
|
+
res.dataset.forEach((datum)=>{
|
|
9557
|
+
datum[MaxMeasureId] = datum[encoding.max[0]];
|
|
9558
|
+
datum[MinMeasureId] = datum[encoding.min[0]];
|
|
9559
|
+
datum["__Q1__"] = datum[encoding.q1[0]];
|
|
9560
|
+
datum["__Q3__"] = datum[encoding.q3[0]];
|
|
9561
|
+
datum[MedianMeasureId] = datum[encoding.median[0]];
|
|
9562
|
+
});
|
|
9563
|
+
newDatasets = res.dataset;
|
|
9564
|
+
foldInfo = {};
|
|
9565
|
+
unfoldInfo = res.unfoldInfo;
|
|
9566
|
+
}
|
|
9567
|
+
return {
|
|
9568
|
+
...result,
|
|
9569
|
+
dataset: newDatasets,
|
|
9570
|
+
datasetReshapeInfo: [
|
|
9571
|
+
{
|
|
9572
|
+
id: String(chartType),
|
|
9573
|
+
index: 0,
|
|
9574
|
+
foldInfo,
|
|
9575
|
+
unfoldInfo
|
|
9576
|
+
}
|
|
9577
|
+
],
|
|
9578
|
+
dimensions,
|
|
9579
|
+
measures
|
|
9580
|
+
};
|
|
9581
|
+
};
|
|
9582
|
+
const pivotReshapeWithBoxplotEncoding = (advancedVSeed, context)=>{
|
|
9583
|
+
const result = {
|
|
9584
|
+
...advancedVSeed
|
|
9585
|
+
};
|
|
9586
|
+
const { vseed } = context;
|
|
9587
|
+
const { dataset, chartType } = vseed;
|
|
9588
|
+
const { dimensions = [], measures = [], encoding = {}, config } = advancedVSeed;
|
|
9589
|
+
const uniqDims = T(dimensions, (item)=>item.id);
|
|
9590
|
+
const chartConfig = config?.[chartType];
|
|
9591
|
+
const whiskers = chartConfig?.whiskers;
|
|
9592
|
+
const measureGroups = [];
|
|
9593
|
+
if (measures) measures.forEach((measure)=>{
|
|
9594
|
+
if (measure.children && measure.children.length > 0) measureGroups.push(measure);
|
|
9341
9595
|
});
|
|
9342
|
-
|
|
9596
|
+
const rowColumnFields = T(dimensions.filter((dim)=>'row' === dim.encoding || 'column' === dim.encoding), (item)=>item.id);
|
|
9597
|
+
const datasets = [];
|
|
9598
|
+
const datasetReshapeInfo = [];
|
|
9599
|
+
measureGroups.forEach((measureGroup, index)=>{
|
|
9600
|
+
const subMeasures = measureGroup.children;
|
|
9601
|
+
if (!subMeasures) return;
|
|
9602
|
+
const groupId = measureGroup.id;
|
|
9603
|
+
let newDatasets = [];
|
|
9604
|
+
let foldInfo = {};
|
|
9605
|
+
let unfoldInfo = {};
|
|
9606
|
+
if (encoding.value?.length) encoding.value.forEach((f)=>{
|
|
9607
|
+
const m = subMeasures.find((m)=>m.id === f);
|
|
9608
|
+
const boxPlotData = boxplot_boxplot(dataset, {
|
|
9609
|
+
field: f,
|
|
9610
|
+
groupField: [
|
|
9611
|
+
...encoding.x ?? [],
|
|
9612
|
+
...encoding.color ?? [],
|
|
9613
|
+
...rowColumnFields.map((item)=>item.id)
|
|
9614
|
+
],
|
|
9615
|
+
whiskers,
|
|
9616
|
+
outputNames: {
|
|
9617
|
+
q1: "__Q1__",
|
|
9618
|
+
q3: "__Q3__",
|
|
9619
|
+
min: MinMeasureId,
|
|
9620
|
+
max: MaxMeasureId,
|
|
9621
|
+
median: MedianMeasureId,
|
|
9622
|
+
outliers: OutliersMeasureId
|
|
9623
|
+
}
|
|
9624
|
+
});
|
|
9625
|
+
boxPlotData.forEach((datum)=>{
|
|
9626
|
+
datum[FoldMeasureId] = f;
|
|
9627
|
+
datum[FoldMeasureName] = m?.alias ?? f;
|
|
9628
|
+
});
|
|
9629
|
+
const res = unfoldDimensions(boxPlotData, uniqDims, encoding, {
|
|
9630
|
+
foldMeasureId: FoldMeasureId,
|
|
9631
|
+
separator: "-",
|
|
9632
|
+
colorItemAsId: false
|
|
9633
|
+
});
|
|
9634
|
+
res.dataset.forEach((d)=>{
|
|
9635
|
+
newDatasets.push(d);
|
|
9636
|
+
});
|
|
9637
|
+
unfoldInfo = res.unfoldInfo;
|
|
9638
|
+
});
|
|
9639
|
+
else if (encoding.q1?.length && encoding.q3?.length && encoding.min?.length && encoding.max?.length && encoding.median?.length) {
|
|
9640
|
+
const res = unfoldDimensions(dataset, uniqDims, encoding, {
|
|
9641
|
+
foldMeasureId: FoldMeasureId,
|
|
9642
|
+
separator: "-",
|
|
9643
|
+
colorItemAsId: false
|
|
9644
|
+
});
|
|
9645
|
+
res.dataset.forEach((datum)=>{
|
|
9646
|
+
datum[MaxMeasureId] = datum[encoding.max[0]];
|
|
9647
|
+
datum[MinMeasureId] = datum[encoding.min[0]];
|
|
9648
|
+
datum["__Q1__"] = datum[encoding.q1[0]];
|
|
9649
|
+
datum["__Q3__"] = datum[encoding.q3[0]];
|
|
9650
|
+
datum[MedianMeasureId] = datum[encoding.median[0]];
|
|
9651
|
+
});
|
|
9652
|
+
newDatasets = res.dataset;
|
|
9653
|
+
foldInfo = {};
|
|
9654
|
+
unfoldInfo = res.unfoldInfo;
|
|
9655
|
+
}
|
|
9656
|
+
const reshapeInfo = {
|
|
9657
|
+
id: groupId,
|
|
9658
|
+
index,
|
|
9659
|
+
foldInfo,
|
|
9660
|
+
unfoldInfo
|
|
9661
|
+
};
|
|
9662
|
+
datasets.push(newDatasets);
|
|
9663
|
+
datasetReshapeInfo.push(reshapeInfo);
|
|
9664
|
+
});
|
|
9665
|
+
console.log(datasets);
|
|
9666
|
+
return {
|
|
9667
|
+
...result,
|
|
9668
|
+
dataset: datasets,
|
|
9669
|
+
datasetReshapeInfo: datasetReshapeInfo
|
|
9670
|
+
};
|
|
9671
|
+
};
|
|
9672
|
+
const boxplotAdvancedPipeline = [
|
|
9673
|
+
initAdvancedVSeed_initAdvancedVSeed,
|
|
9674
|
+
default_defaultMeasures_defaultMeasures,
|
|
9675
|
+
defaultDimensions_defaultDimensions,
|
|
9676
|
+
defaultMeasureName_defaultMeasureName,
|
|
9677
|
+
boxplotConfig,
|
|
9678
|
+
encodingAdapter([
|
|
9679
|
+
defaultEncodingForBoxplot,
|
|
9680
|
+
buildMeasures
|
|
9681
|
+
], [
|
|
9682
|
+
encodingForBoxplot,
|
|
9683
|
+
buildMeasures,
|
|
9684
|
+
deleteEncodingForMeasure([
|
|
9685
|
+
'tooltip',
|
|
9686
|
+
'label',
|
|
9687
|
+
'color'
|
|
9688
|
+
]),
|
|
9689
|
+
deleteTooltipAndLabelDimension
|
|
9690
|
+
]),
|
|
9691
|
+
pivotAdapter([
|
|
9692
|
+
reshapeWithBoxplotEncoding
|
|
9693
|
+
], [
|
|
9694
|
+
pivotReshapeWithBoxplotEncoding
|
|
9695
|
+
]),
|
|
9696
|
+
sortLegend_sortLegend,
|
|
9697
|
+
theme_theme,
|
|
9698
|
+
markStyle_markStyle,
|
|
9699
|
+
annotation_annotation
|
|
9700
|
+
];
|
|
9701
|
+
const initBoxplot = (spec, context)=>{
|
|
9702
|
+
const result = {
|
|
9703
|
+
...spec
|
|
9704
|
+
};
|
|
9705
|
+
const { advancedVSeed } = context;
|
|
9706
|
+
const { datasetReshapeInfo, encoding } = advancedVSeed;
|
|
9707
|
+
const { unfoldInfo } = datasetReshapeInfo[0];
|
|
9708
|
+
result.type = 'boxPlot';
|
|
9709
|
+
result.minField = MinMeasureId;
|
|
9710
|
+
result.q1Field = "__Q1__";
|
|
9711
|
+
result.medianField = MedianMeasureId;
|
|
9712
|
+
result.maxField = MaxMeasureId;
|
|
9713
|
+
result.q3Field = "__Q3__";
|
|
9714
|
+
result.outliersField = OutliersMeasureId;
|
|
9715
|
+
result.xField = [
|
|
9716
|
+
unfoldInfo.encodingX
|
|
9717
|
+
];
|
|
9718
|
+
result.seriesField = unfoldInfo.encodingColorId;
|
|
9719
|
+
const sameDimensionsMode = chunk_HGKLN5KY_k(encoding.x, encoding.color);
|
|
9720
|
+
if (!sameDimensionsMode) {
|
|
9721
|
+
result.xField.push(unfoldInfo.encodingColor);
|
|
9722
|
+
if (encoding.color?.[0] === MeasureName && encoding.value?.length === 1) result.xField.pop();
|
|
9723
|
+
}
|
|
9724
|
+
result.padding = 0;
|
|
9725
|
+
result.region = [
|
|
9726
|
+
{
|
|
9727
|
+
clip: true
|
|
9728
|
+
}
|
|
9729
|
+
];
|
|
9730
|
+
result.animation = true;
|
|
9731
|
+
return result;
|
|
9732
|
+
};
|
|
9733
|
+
const datasetBoxplot = (spec, context)=>{
|
|
9734
|
+
const { advancedVSeed, vseed } = context;
|
|
9735
|
+
const { datasetReshapeInfo } = advancedVSeed;
|
|
9736
|
+
const { id } = datasetReshapeInfo[0];
|
|
9737
|
+
const fields = {};
|
|
9738
|
+
return {
|
|
9739
|
+
...spec,
|
|
9740
|
+
data: {
|
|
9741
|
+
id,
|
|
9742
|
+
values: isPivotChart(vseed) ? void 0 : advancedVSeed.dataset.flat(),
|
|
9743
|
+
fields: fields
|
|
9744
|
+
}
|
|
9745
|
+
};
|
|
9746
|
+
};
|
|
9747
|
+
const boxPlotMeasureKeys = [
|
|
9748
|
+
MaxMeasureId,
|
|
9749
|
+
"__Q3__",
|
|
9750
|
+
MedianMeasureId,
|
|
9751
|
+
"__Q1__",
|
|
9752
|
+
MinMeasureId
|
|
9753
|
+
];
|
|
9754
|
+
const VCHART_OUTLIER_KEY = '__VCHART_BOX_PLOT_OUTLIER_VALUE';
|
|
9755
|
+
const tooltipBoxplot = (spec, context)=>{
|
|
9756
|
+
const result = {
|
|
9757
|
+
...spec
|
|
9758
|
+
};
|
|
9759
|
+
const { advancedVSeed, vseed } = context;
|
|
9760
|
+
const { chartType, dimensions, encoding } = advancedVSeed;
|
|
9761
|
+
const baseConfig = advancedVSeed.config[chartType];
|
|
9762
|
+
const { tooltip = {
|
|
9763
|
+
enable: true
|
|
9764
|
+
} } = baseConfig;
|
|
9765
|
+
const { enable } = tooltip;
|
|
9766
|
+
const meas = findAllMeasures(vseed.measures);
|
|
9767
|
+
const valueMeasure = meas.find((item)=>'value' === item.encoding || chunk_JK3VNB42_n(item.encoding));
|
|
9768
|
+
const defaultFormatter = valueMeasure ? createFormatterByMeasure(valueMeasure) : (v)=>v;
|
|
9769
|
+
result.tooltip = {
|
|
9770
|
+
visible: enable,
|
|
9771
|
+
mark: {
|
|
9772
|
+
title: {
|
|
9773
|
+
visible: false
|
|
9774
|
+
},
|
|
9775
|
+
content: tooltipBoxplot_createMarkContent(encoding.tooltip || [], dimensions, encoding),
|
|
9776
|
+
updateContent: (prev, data)=>{
|
|
9777
|
+
const datum = data?.[0]?.datum?.[0];
|
|
9778
|
+
if (!chunk_JK3VNB42_n(datum?.[VCHART_OUTLIER_KEY])) {
|
|
9779
|
+
const tooltipItems = (prev ?? []).filter((item)=>!boxPlotMeasureKeys.includes(item.key));
|
|
9780
|
+
const outerlierMeasure = meas.find((item)=>item.id === OutliersMeasureId);
|
|
9781
|
+
const formatter = outerlierMeasure ? createFormatterByMeasure(outerlierMeasure) : defaultFormatter;
|
|
9782
|
+
tooltipItems.push({
|
|
9783
|
+
...tooltipItems[0],
|
|
9784
|
+
key: outerlierMeasure?.alias ?? OutliersMeasureId,
|
|
9785
|
+
value: formatter(datum?.[VCHART_OUTLIER_KEY])
|
|
9786
|
+
});
|
|
9787
|
+
return tooltipItems;
|
|
9788
|
+
}
|
|
9789
|
+
return (prev ?? []).map((entry)=>{
|
|
9790
|
+
if (boxPlotMeasureKeys.includes(entry.key)) {
|
|
9791
|
+
const mea = meas.find((item)=>item.id === entry.key);
|
|
9792
|
+
const formatter = mea ? createFormatterByMeasure(mea) : defaultFormatter;
|
|
9793
|
+
return {
|
|
9794
|
+
...entry,
|
|
9795
|
+
value: formatter(datum?.[entry.key]),
|
|
9796
|
+
key: mea?.alias ?? entry.key
|
|
9797
|
+
};
|
|
9798
|
+
}
|
|
9799
|
+
return entry;
|
|
9800
|
+
});
|
|
9801
|
+
}
|
|
9802
|
+
},
|
|
9803
|
+
dimension: {
|
|
9804
|
+
visible: false
|
|
9805
|
+
}
|
|
9806
|
+
};
|
|
9807
|
+
return result;
|
|
9808
|
+
};
|
|
9809
|
+
const tooltipBoxplot_createMarkContent = (tooltip, dimensions, encoding)=>{
|
|
9810
|
+
const dims = C(dimensions.filter((item)=>tooltip.includes(item.id)), T((item)=>item.id), T((item)=>item.alias));
|
|
9811
|
+
const dimContent = dims.map((item)=>({
|
|
9812
|
+
visible: true,
|
|
9813
|
+
hasShape: true,
|
|
9814
|
+
shapeType: 'rectRound',
|
|
9815
|
+
key: item.alias ?? item.id,
|
|
9816
|
+
value: (datum)=>{
|
|
9817
|
+
if (!chunk_JK3VNB42_n(datum?.[VCHART_OUTLIER_KEY])) {
|
|
9818
|
+
if (encoding.color?.includes(item.id)) return datum?.[ColorEncoding];
|
|
9819
|
+
if (encoding.x?.includes(item.id)) return datum?.[XEncoding];
|
|
9820
|
+
}
|
|
9821
|
+
return datum?.[item.id];
|
|
9822
|
+
}
|
|
9823
|
+
}));
|
|
9824
|
+
const defaultContent = boxPlotMeasureKeys.map((key)=>({
|
|
9825
|
+
visible: true,
|
|
9826
|
+
hasShape: true,
|
|
9827
|
+
shapeType: 'rectRound',
|
|
9828
|
+
key,
|
|
9829
|
+
value: (datum)=>{
|
|
9830
|
+
if (!datum) return '';
|
|
9831
|
+
return datum[key];
|
|
9832
|
+
}
|
|
9833
|
+
}));
|
|
9834
|
+
return [
|
|
9835
|
+
...dimContent,
|
|
9836
|
+
defaultContent
|
|
9837
|
+
];
|
|
9838
|
+
};
|
|
9839
|
+
const pipeline_boxplot_boxplot = [
|
|
9840
|
+
initBoxplot,
|
|
9841
|
+
stackCornerRadius_stackCornerRadius,
|
|
9842
|
+
colorAdapter(color_color, linearColor),
|
|
9843
|
+
background_backgroundColor,
|
|
9844
|
+
datasetBoxplot,
|
|
9845
|
+
progressive,
|
|
9846
|
+
xBand,
|
|
9847
|
+
yLinear,
|
|
9848
|
+
label_label,
|
|
9849
|
+
tooltipBoxplot,
|
|
9850
|
+
colorAdapter(discreteLegend, colorLegend),
|
|
9851
|
+
verticalCrosshairRect,
|
|
9852
|
+
colorBarStyleFill(barStyle_barStyle),
|
|
9853
|
+
annotationPoint_annotationPoint,
|
|
9854
|
+
annotationVerticalLine_annotationVerticalLine,
|
|
9855
|
+
annotationHorizontalLine_annotationHorizontalLine,
|
|
9856
|
+
annotationAreaBand
|
|
9857
|
+
];
|
|
9858
|
+
const pivotBoxplot = [
|
|
9859
|
+
initPivot,
|
|
9860
|
+
pivotGridStyle,
|
|
9861
|
+
datasetPivot,
|
|
9862
|
+
pivotIndicators_pivotIndicators([
|
|
9863
|
+
initBoxplot,
|
|
9864
|
+
stackCornerRadius_stackCornerRadius,
|
|
9865
|
+
colorAdapter(color_color, linearColor),
|
|
9866
|
+
background_backgroundColor,
|
|
9867
|
+
datasetBoxplot,
|
|
9868
|
+
progressive,
|
|
9869
|
+
xBand,
|
|
9870
|
+
yLinear,
|
|
9871
|
+
label_label,
|
|
9872
|
+
tooltipBoxplot,
|
|
9873
|
+
colorBarStyleFill(barStyle_barStyle),
|
|
9874
|
+
verticalCrosshairRect,
|
|
9875
|
+
annotationPoint_annotationPoint,
|
|
9876
|
+
annotationVerticalLine_annotationVerticalLine,
|
|
9877
|
+
annotationHorizontalLine_annotationHorizontalLine,
|
|
9878
|
+
annotationAreaBand
|
|
9879
|
+
]),
|
|
9880
|
+
pivotRowDimensions,
|
|
9881
|
+
pivotColumnDimensions,
|
|
9882
|
+
colorAdapter(pivotDiscreteLegend, pivotColorLegend)
|
|
9883
|
+
];
|
|
9884
|
+
const boxplotSpecPipeline = [
|
|
9885
|
+
pivotAdapter_pivotAdapter(pipeline_boxplot_boxplot, pivotBoxplot)
|
|
9886
|
+
];
|
|
9887
|
+
const registerBoxplot = ()=>{
|
|
9888
|
+
Builder._advancedPipelineMap.boxPlot = boxplotAdvancedPipeline;
|
|
9889
|
+
Builder._specPipelineMap.boxPlot = boxplotSpecPipeline;
|
|
9890
|
+
};
|
|
9891
|
+
const histogramConfig = (advancedVSeed, context)=>{
|
|
9892
|
+
const { vseed } = context;
|
|
9893
|
+
const { chartType } = vseed;
|
|
9894
|
+
const result = {
|
|
9895
|
+
...advancedVSeed
|
|
9896
|
+
};
|
|
9897
|
+
const pickedConfig = chunk_2T7K3PFL_i(vseed, [
|
|
9898
|
+
'backgroundColor',
|
|
9899
|
+
'color',
|
|
9900
|
+
'label',
|
|
9901
|
+
'legend',
|
|
9902
|
+
'tooltip',
|
|
9903
|
+
'xAxis',
|
|
9904
|
+
'yAxis',
|
|
9905
|
+
'crosshairRect',
|
|
9906
|
+
'binCount',
|
|
9907
|
+
'binStep',
|
|
9908
|
+
'binValueType'
|
|
9909
|
+
]);
|
|
9910
|
+
const config = replaceNullToUndefined(pickedConfig);
|
|
9911
|
+
result.config = {
|
|
9912
|
+
...result.config || {},
|
|
9913
|
+
[chartType]: {
|
|
9914
|
+
...config
|
|
9915
|
+
}
|
|
9916
|
+
};
|
|
9917
|
+
return result;
|
|
9918
|
+
};
|
|
9919
|
+
const defaultEncodingForHistogram = (advancedVSeed)=>{
|
|
9920
|
+
const { measures: vseedMeasures = [], dimensions = [] } = advancedVSeed;
|
|
9921
|
+
const measures = findAllMeasures(vseedMeasures);
|
|
9922
|
+
const encoding = {};
|
|
9923
|
+
histogram_generateDefaultDimensionEncoding(dimensions, encoding);
|
|
9924
|
+
histogram_generateDefaultMeasureEncoding(measures, encoding);
|
|
9925
|
+
return {
|
|
9926
|
+
...advancedVSeed,
|
|
9927
|
+
encoding
|
|
9928
|
+
};
|
|
9929
|
+
};
|
|
9930
|
+
const encodingForHistogram = (advancedVSeed)=>{
|
|
9931
|
+
const { measures: vseedMeasures = [], dimensions = [] } = advancedVSeed;
|
|
9932
|
+
const measures = findAllMeasures(vseedMeasures);
|
|
9933
|
+
const hasDimensionEncoding = dimensions.some((item)=>item.encoding);
|
|
9934
|
+
const hasMeasureEncoding = measures.some((item)=>item.encoding);
|
|
9935
|
+
const encoding = {};
|
|
9936
|
+
if (hasDimensionEncoding) histogram_generateDimensionEncoding(dimensions, encoding, false);
|
|
9937
|
+
else histogram_generateDefaultDimensionEncoding(dimensions, encoding);
|
|
9938
|
+
if (hasMeasureEncoding) histogram_generateMeasureEncoding(measures, encoding);
|
|
9939
|
+
else histogram_generateDefaultMeasureEncoding(measures, encoding);
|
|
9940
|
+
return {
|
|
9941
|
+
...advancedVSeed,
|
|
9942
|
+
encoding
|
|
9943
|
+
};
|
|
9944
|
+
};
|
|
9945
|
+
const histogram_generateDefaultDimensionEncoding = (dimensions, encoding)=>{
|
|
9946
|
+
const dimensionsWithoutMeasureName = dimensions.filter((item)=>item.id !== MeasureName);
|
|
9947
|
+
const uniqueDimIds = chunk_QJLMYOTX_i(dimensionsWithoutMeasureName.map((d)=>d.id));
|
|
9948
|
+
encoding.detail = encoding.color;
|
|
9949
|
+
encoding.tooltip = uniqueDimIds.filter((d)=>d !== MeasureName);
|
|
9950
|
+
encoding.label = [];
|
|
9951
|
+
encoding.row = [];
|
|
9952
|
+
encoding.column = [];
|
|
9953
|
+
};
|
|
9954
|
+
const histogram_generateDimensionEncoding = (dimensions, encoding, isMultiMeasure)=>{
|
|
9955
|
+
addColorToEncoding(dimensions, encoding, isMultiMeasure);
|
|
9956
|
+
encoding.detail = chunk_QJLMYOTX_i(dimensions.filter((item)=>'detail' === item.encoding).map((item)=>item.id));
|
|
9957
|
+
if (encoding.detail?.length === 0) encoding.detail = encoding.color;
|
|
9958
|
+
encoding.tooltip = chunk_QJLMYOTX_i(dimensions.map((item)=>item.id));
|
|
9959
|
+
encoding.tooltip = encoding.tooltip?.filter((d)=>d !== MeasureName);
|
|
9960
|
+
encoding.label = chunk_QJLMYOTX_i(dimensions.filter((item)=>'label' === item.encoding).map((item)=>item.id));
|
|
9961
|
+
encoding.label = encoding.label?.filter((d)=>d !== MeasureName);
|
|
9962
|
+
};
|
|
9963
|
+
const histogram_generateDefaultMeasureEncoding = (measures, encoding)=>{
|
|
9964
|
+
encoding.value = chunk_QJLMYOTX_i(measures.filter((item)=>'value' === item.encoding || !item.encoding).map((item)=>item.id));
|
|
9965
|
+
encoding.x0 = chunk_QJLMYOTX_i(measures.filter((item)=>'x0' === item.encoding).map((item)=>item.id));
|
|
9966
|
+
encoding.x1 = chunk_QJLMYOTX_i(measures.filter((item)=>'x1' === item.encoding).map((item)=>item.id));
|
|
9967
|
+
encoding.y = chunk_QJLMYOTX_i(measures.filter((item)=>'yAxis' === item.encoding).map((item)=>item.id));
|
|
9968
|
+
};
|
|
9969
|
+
const histogram_generateMeasureEncoding = (measures, encoding)=>{
|
|
9970
|
+
encoding.value = chunk_QJLMYOTX_i(measures.filter((item)=>'value' === item.encoding || !item.encoding).map((item)=>item.id));
|
|
9971
|
+
encoding.x0 = chunk_QJLMYOTX_i(measures.filter((item)=>'x0' === item.encoding).map((item)=>item.id));
|
|
9972
|
+
encoding.x1 = chunk_QJLMYOTX_i(measures.filter((item)=>'x1' === item.encoding).map((item)=>item.id));
|
|
9973
|
+
encoding.y = chunk_QJLMYOTX_i(measures.filter((item)=>'yAxis' === item.encoding).map((item)=>item.id));
|
|
9974
|
+
const color = chunk_QJLMYOTX_i(measures.filter((item)=>'color' === item.encoding).map((item)=>item.id));
|
|
9975
|
+
if (color.length > 0) encoding.color = [
|
|
9976
|
+
color[0]
|
|
9977
|
+
];
|
|
9978
|
+
const label = chunk_QJLMYOTX_i(measures.filter((item)=>'label' === item.encoding).map((item)=>item.id));
|
|
9979
|
+
encoding.label = chunk_QJLMYOTX_i([
|
|
9980
|
+
...encoding.label || [],
|
|
9981
|
+
...label
|
|
9982
|
+
]);
|
|
9983
|
+
const tooltip = chunk_QJLMYOTX_i(measures.filter((item)=>'tooltip' === item.encoding).map((item)=>item.id));
|
|
9984
|
+
encoding.tooltip = chunk_QJLMYOTX_i([
|
|
9985
|
+
...encoding.tooltip || [],
|
|
9986
|
+
...label,
|
|
9987
|
+
...tooltip
|
|
9988
|
+
]);
|
|
9989
|
+
};
|
|
9990
|
+
const bin_bin = (data, options)=>{
|
|
9991
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
9992
|
+
const field = null == options ? void 0 : options.field;
|
|
9993
|
+
if (!field) return [];
|
|
9994
|
+
const countField = options.countField, n = data.length;
|
|
9995
|
+
let thresholds, min = 1 / 0, max = -1 / 0;
|
|
9996
|
+
if (options.extent) min = options.extent[0], max = options.extent[1];
|
|
9997
|
+
else for(let i = 0; i < n; i++){
|
|
9998
|
+
const v = data[i][field];
|
|
9999
|
+
if (common_isNil(v)) continue;
|
|
10000
|
+
const num = +v;
|
|
10001
|
+
Number.isFinite(num) && (num < min && (min = num), num > max && (max = num));
|
|
10002
|
+
}
|
|
10003
|
+
if (!Number.isFinite(min) || !Number.isFinite(max) || 0 === n) return [];
|
|
10004
|
+
if (options.thresholds && options.thresholds.length) thresholds = options.thresholds.slice(), thresholds.sort((a, b)=>a - b);
|
|
10005
|
+
else if ("number" == typeof options.step && options.step > 0) {
|
|
10006
|
+
const stepSize = options.step;
|
|
10007
|
+
let startMin = min;
|
|
10008
|
+
for(options.extent || (startMin = Math.floor(min / stepSize) * stepSize), thresholds = [
|
|
10009
|
+
startMin
|
|
10010
|
+
]; startMin < max;)startMin += stepSize, thresholds.push(startMin);
|
|
10011
|
+
} else {
|
|
10012
|
+
const bins = options.bins && options.bins > 0 ? Math.floor(options.bins) : 10;
|
|
10013
|
+
if (max - min > 1) {
|
|
10014
|
+
const start = Math.floor(min), stepSizeInt = Math.ceil((max - start) / bins);
|
|
10015
|
+
thresholds = new Array(bins + 1);
|
|
10016
|
+
for(let i = 0; i <= bins; i++)thresholds[i] = i === bins ? max : start + stepSizeInt * i;
|
|
10017
|
+
} else {
|
|
10018
|
+
const stepSize = (max - min) / bins;
|
|
10019
|
+
thresholds = new Array(bins + 1);
|
|
10020
|
+
for(let i = 0; i <= bins; i++)thresholds[i] = i === bins ? max : min + stepSize * i;
|
|
10021
|
+
}
|
|
10022
|
+
}
|
|
10023
|
+
const numBins = Math.max(0, thresholds.length - 1);
|
|
10024
|
+
if (0 === numBins) return [];
|
|
10025
|
+
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 = [];
|
|
10026
|
+
if (!options.groupField) for(let i = 0; i < numBins; i++){
|
|
10027
|
+
const rec = {
|
|
10028
|
+
[x0Name]: thresholds[i],
|
|
10029
|
+
[x1Name]: thresholds[i + 1],
|
|
10030
|
+
[countName]: 0
|
|
10031
|
+
};
|
|
10032
|
+
options.includeValues && (rec[valuesName] = []), out.push(rec);
|
|
10033
|
+
}
|
|
10034
|
+
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) : [];
|
|
10035
|
+
for(let i = 0; i < n; i++){
|
|
10036
|
+
const v = data[i][field];
|
|
10037
|
+
if (null == v) continue;
|
|
10038
|
+
const num = +v;
|
|
10039
|
+
if (Number.isFinite(num)) for(let j = 0; j < numBins; j++){
|
|
10040
|
+
const left = thresholds[j], right = thresholds[j + 1];
|
|
10041
|
+
if (num >= left && num < right || j === numBins - 1 && num <= right) {
|
|
10042
|
+
const datumCount = null != (_l = data[i][countField]) ? _l : 1;
|
|
10043
|
+
if (usingGroup) {
|
|
10044
|
+
let gk;
|
|
10045
|
+
gk = common_isArray(groupField) ? groupField.map((f)=>String(data[i][f])).join("||") : String(data[i][groupField]);
|
|
10046
|
+
const m = binGroupCounts[j], prev = null != (_m = m.get(gk)) ? _m : 0;
|
|
10047
|
+
m.set(gk, prev + datumCount);
|
|
10048
|
+
const repMap = binGroupRepr[j];
|
|
10049
|
+
if (repMap.has(gk) || (common_isArray(groupField) ? repMap.set(gk, Object.fromEntries(groupField.map((f)=>[
|
|
10050
|
+
f,
|
|
10051
|
+
data[i][f]
|
|
10052
|
+
]))) : repMap.set(gk, data[i][groupField])), options && options.includeValues) {
|
|
10053
|
+
const vv = binGroupValues[j];
|
|
10054
|
+
vv.has(gk) || vv.set(gk, []);
|
|
10055
|
+
const arr = vv.get(gk);
|
|
10056
|
+
arr && arr.push(data[i]);
|
|
10057
|
+
}
|
|
10058
|
+
} else out[j][countName] += datumCount;
|
|
10059
|
+
options && options.includeValues && !usingGroup && out[j][valuesName].push(data[i]);
|
|
10060
|
+
break;
|
|
10061
|
+
}
|
|
10062
|
+
}
|
|
10063
|
+
}
|
|
10064
|
+
let totalCount = 0;
|
|
10065
|
+
const finalOut = [];
|
|
10066
|
+
if (usingGroup) {
|
|
10067
|
+
for(let j = 0; j < numBins; j++){
|
|
10068
|
+
const m = binGroupCounts[j];
|
|
10069
|
+
for (const [gk, sum] of m){
|
|
10070
|
+
totalCount += sum;
|
|
10071
|
+
const rec = {
|
|
10072
|
+
[x0Name]: thresholds[j],
|
|
10073
|
+
[x1Name]: thresholds[j + 1],
|
|
10074
|
+
[countName]: sum
|
|
10075
|
+
}, repr = binGroupRepr[j].get(gk);
|
|
10076
|
+
if (common_isArray(groupField)) for (const f of groupField)rec[f] = repr[f];
|
|
10077
|
+
else rec[groupField] = repr;
|
|
10078
|
+
options && options.includeValues && (rec[valuesName] = binGroupValues[j].get(gk) || []), finalOut.push(rec);
|
|
10079
|
+
}
|
|
10080
|
+
}
|
|
10081
|
+
for (const r of finalOut)r[percentageName] = totalCount > 0 ? r[countName] / totalCount : 0;
|
|
10082
|
+
} else {
|
|
10083
|
+
for(let i = 0, len = out.length; i < len; i++)totalCount += out[i][countName];
|
|
10084
|
+
for(let i = 0, len = out.length; i < len; i++)out[i][percentageName] = totalCount > 0 ? out[i][countName] / totalCount : 0, finalOut.push(out[i]);
|
|
10085
|
+
}
|
|
10086
|
+
return finalOut;
|
|
10087
|
+
};
|
|
10088
|
+
const reshapeWithHistogramEncoding = (advancedVSeed, context)=>{
|
|
10089
|
+
const result = {
|
|
10090
|
+
...advancedVSeed
|
|
10091
|
+
};
|
|
10092
|
+
const { vseed } = context;
|
|
10093
|
+
const { dataset, chartType } = vseed;
|
|
10094
|
+
const { dimensions = [], measures = [], encoding = {}, config } = advancedVSeed;
|
|
10095
|
+
const uniqDims = T(dimensions, (item)=>item.id);
|
|
10096
|
+
const chartConfig = config?.[chartType];
|
|
10097
|
+
const binCount = chartConfig?.binCount;
|
|
10098
|
+
const binStep = chartConfig?.binStep;
|
|
10099
|
+
const binValueType = chartConfig?.binValueType;
|
|
10100
|
+
let newDatasets = [];
|
|
10101
|
+
let foldInfo = {};
|
|
10102
|
+
let unfoldInfo = {};
|
|
10103
|
+
const colorMeasureId = getColorMeasureId(advancedVSeed, vseed);
|
|
10104
|
+
const allMeasures = findAllMeasures(measures);
|
|
10105
|
+
if (encoding.value?.length) {
|
|
10106
|
+
const valueField = encoding.value[0];
|
|
10107
|
+
const m = allMeasures.find((m)=>m.id === valueField);
|
|
10108
|
+
const binData = bin_bin(dataset, {
|
|
10109
|
+
field: valueField,
|
|
10110
|
+
groupField: [
|
|
10111
|
+
...encoding.x ?? [],
|
|
10112
|
+
...encoding.color ?? []
|
|
10113
|
+
],
|
|
10114
|
+
bins: binCount,
|
|
10115
|
+
step: binStep,
|
|
10116
|
+
outputNames: {
|
|
10117
|
+
x0: BinStartMeasureId,
|
|
10118
|
+
x1: BinEndMeasureId,
|
|
10119
|
+
count: BinCountMeasureId,
|
|
10120
|
+
percentage: BinPercentageMeasureId
|
|
10121
|
+
}
|
|
10122
|
+
});
|
|
10123
|
+
binData.forEach((datum)=>{
|
|
10124
|
+
datum[FoldMeasureId] = valueField;
|
|
10125
|
+
datum[FoldMeasureName] = m?.alias ?? valueField;
|
|
10126
|
+
datum[FoldMeasureValue] = 'percentage' === binValueType ? datum[BinPercentageMeasureId] : datum[BinCountMeasureId];
|
|
10127
|
+
});
|
|
10128
|
+
const res = unfoldDimensions(binData, uniqDims, encoding, {
|
|
10129
|
+
foldMeasureId: FoldMeasureId,
|
|
10130
|
+
separator: "-",
|
|
10131
|
+
colorItemAsId: false
|
|
10132
|
+
});
|
|
10133
|
+
res.dataset.forEach((d)=>{
|
|
10134
|
+
newDatasets.push(d);
|
|
10135
|
+
});
|
|
10136
|
+
unfoldInfo = res.unfoldInfo;
|
|
10137
|
+
} else if (encoding.x0?.length && encoding.x1?.length && encoding.y?.length) {
|
|
10138
|
+
const res = dataReshapeByEncoding(dataset, T(dimensions, (item)=>item.id), findAllMeasures(measures).filter((item)=>encoding.y?.includes(item.id)).slice(0, 1), encoding, {
|
|
10139
|
+
colorItemAsId: false,
|
|
10140
|
+
colorMeasureId
|
|
10141
|
+
});
|
|
10142
|
+
res.dataset.forEach((datum)=>{
|
|
10143
|
+
datum[BinStartMeasureId] = datum[encoding.x0[0]];
|
|
10144
|
+
datum[BinEndMeasureId] = datum[encoding.x1[0]];
|
|
10145
|
+
datum[FoldMeasureId] = datum[encoding.y[0]];
|
|
10146
|
+
});
|
|
10147
|
+
newDatasets = res.dataset;
|
|
10148
|
+
foldInfo = res.foldInfo;
|
|
10149
|
+
unfoldInfo = res.unfoldInfo;
|
|
10150
|
+
}
|
|
10151
|
+
return {
|
|
10152
|
+
...result,
|
|
10153
|
+
dataset: newDatasets,
|
|
10154
|
+
datasetReshapeInfo: [
|
|
10155
|
+
{
|
|
10156
|
+
id: String(chartType),
|
|
10157
|
+
index: 0,
|
|
10158
|
+
foldInfo,
|
|
10159
|
+
unfoldInfo
|
|
10160
|
+
}
|
|
10161
|
+
],
|
|
10162
|
+
dimensions,
|
|
10163
|
+
measures
|
|
10164
|
+
};
|
|
10165
|
+
};
|
|
10166
|
+
const pivotReshapeWithHistogramEncoding = (advancedVSeed, context)=>{
|
|
10167
|
+
const result = {
|
|
10168
|
+
...advancedVSeed
|
|
10169
|
+
};
|
|
10170
|
+
const { vseed } = context;
|
|
10171
|
+
const { dataset, chartType } = vseed;
|
|
10172
|
+
const { dimensions = [], measures = [], encoding = {}, config } = advancedVSeed;
|
|
10173
|
+
const colorMeasureId = getColorMeasureId(advancedVSeed, vseed);
|
|
10174
|
+
const uniqDims = T(dimensions, (item)=>item.id);
|
|
10175
|
+
const chartConfig = config?.[chartType];
|
|
10176
|
+
const binCount = chartConfig?.binCount;
|
|
10177
|
+
const binStep = chartConfig?.binStep;
|
|
10178
|
+
const binValueType = chartConfig?.binValueType;
|
|
10179
|
+
const measureGroups = [];
|
|
10180
|
+
if (measures) measures.forEach((measure)=>{
|
|
10181
|
+
if (measure.children && measure.children.length > 0) measureGroups.push(measure);
|
|
10182
|
+
});
|
|
10183
|
+
const rowColumnFields = T(dimensions.filter((dim)=>'row' === dim.encoding || 'column' === dim.encoding), (item)=>item.id);
|
|
10184
|
+
const datasets = [];
|
|
10185
|
+
const datasetReshapeInfo = [];
|
|
10186
|
+
measureGroups.forEach((measureGroup, index)=>{
|
|
10187
|
+
const subMeasures = measureGroup.children;
|
|
10188
|
+
if (!subMeasures) return;
|
|
10189
|
+
const groupId = measureGroup.id;
|
|
10190
|
+
let newDatasets = [];
|
|
10191
|
+
let foldInfo = {};
|
|
10192
|
+
let unfoldInfo = {};
|
|
10193
|
+
if (encoding.value?.length) {
|
|
10194
|
+
const valueField = encoding.value[0];
|
|
10195
|
+
const m = subMeasures.find((m)=>m.id === valueField);
|
|
10196
|
+
const binData = bin_bin(dataset, {
|
|
10197
|
+
field: valueField,
|
|
10198
|
+
groupField: [
|
|
10199
|
+
...encoding.x ?? [],
|
|
10200
|
+
...encoding.color ?? [],
|
|
10201
|
+
...rowColumnFields.map((item)=>item.id)
|
|
10202
|
+
],
|
|
10203
|
+
bins: binCount,
|
|
10204
|
+
step: binStep,
|
|
10205
|
+
outputNames: {
|
|
10206
|
+
x0: BinStartMeasureId,
|
|
10207
|
+
x1: BinEndMeasureId,
|
|
10208
|
+
count: BinCountMeasureId,
|
|
10209
|
+
percentage: BinPercentageMeasureId
|
|
10210
|
+
}
|
|
10211
|
+
});
|
|
10212
|
+
binData.forEach((datum)=>{
|
|
10213
|
+
datum[FoldMeasureId] = valueField;
|
|
10214
|
+
datum[FoldMeasureName] = m?.alias ?? valueField;
|
|
10215
|
+
datum[FoldMeasureValue] = 'percentage' === binValueType ? datum[BinPercentageMeasureId] : datum[BinCountMeasureId];
|
|
10216
|
+
});
|
|
10217
|
+
const res = unfoldDimensions(binData, uniqDims, encoding, {
|
|
10218
|
+
foldMeasureId: FoldMeasureId,
|
|
10219
|
+
separator: "-",
|
|
10220
|
+
colorItemAsId: false
|
|
10221
|
+
});
|
|
10222
|
+
res.dataset.forEach((d)=>{
|
|
10223
|
+
newDatasets.push(d);
|
|
10224
|
+
});
|
|
10225
|
+
unfoldInfo = res.unfoldInfo;
|
|
10226
|
+
} else if (encoding.x0?.length && encoding.x1?.length && encoding.y?.length) {
|
|
10227
|
+
const res = dataReshapeByEncoding(dataset, T(dimensions, (item)=>item.id), subMeasures.filter((item)=>encoding.y?.includes(item.id)).slice(0, 1), encoding, {
|
|
10228
|
+
colorItemAsId: false,
|
|
10229
|
+
colorMeasureId
|
|
10230
|
+
});
|
|
10231
|
+
res.dataset.forEach((datum)=>{
|
|
10232
|
+
datum[BinStartMeasureId] = datum[encoding.x0[0]];
|
|
10233
|
+
datum[BinEndMeasureId] = datum[encoding.x1[0]];
|
|
10234
|
+
datum[FoldMeasureId] = datum[encoding.y[0]];
|
|
10235
|
+
});
|
|
10236
|
+
newDatasets = res.dataset;
|
|
10237
|
+
foldInfo = res.foldInfo;
|
|
10238
|
+
unfoldInfo = res.unfoldInfo;
|
|
10239
|
+
}
|
|
10240
|
+
const reshapeInfo = {
|
|
10241
|
+
id: groupId,
|
|
10242
|
+
index,
|
|
10243
|
+
foldInfo,
|
|
10244
|
+
unfoldInfo
|
|
10245
|
+
};
|
|
10246
|
+
datasets.push(newDatasets);
|
|
10247
|
+
datasetReshapeInfo.push(reshapeInfo);
|
|
10248
|
+
});
|
|
10249
|
+
return {
|
|
10250
|
+
...result,
|
|
10251
|
+
dataset: datasets,
|
|
10252
|
+
datasetReshapeInfo: datasetReshapeInfo
|
|
10253
|
+
};
|
|
10254
|
+
};
|
|
10255
|
+
const regressionLine = (advancedVSeed, context)=>{
|
|
10256
|
+
const { vseed } = context;
|
|
10257
|
+
if ('histogramRegressionLine' in vseed && 'histogram' === vseed.chartType) advancedVSeed.histogramRegressionLine = vseed.histogramRegressionLine;
|
|
10258
|
+
return advancedVSeed;
|
|
10259
|
+
};
|
|
10260
|
+
const histogramAdvancedPipeline = [
|
|
10261
|
+
initAdvancedVSeed_initAdvancedVSeed,
|
|
10262
|
+
default_defaultMeasures_defaultMeasures,
|
|
10263
|
+
defaultDimensions_defaultDimensions,
|
|
10264
|
+
defaultMeasureName_defaultMeasureName,
|
|
10265
|
+
histogramConfig,
|
|
10266
|
+
encodingAdapter([
|
|
10267
|
+
defaultEncodingForHistogram,
|
|
10268
|
+
buildMeasures
|
|
10269
|
+
], [
|
|
10270
|
+
encodingForHistogram,
|
|
10271
|
+
buildMeasures,
|
|
10272
|
+
deleteEncodingForMeasure([
|
|
10273
|
+
'tooltip',
|
|
10274
|
+
'label',
|
|
10275
|
+
'color'
|
|
10276
|
+
]),
|
|
10277
|
+
deleteTooltipAndLabelDimension
|
|
10278
|
+
]),
|
|
10279
|
+
pivotAdapter([
|
|
10280
|
+
reshapeWithHistogramEncoding
|
|
10281
|
+
], [
|
|
10282
|
+
pivotReshapeWithHistogramEncoding
|
|
10283
|
+
]),
|
|
10284
|
+
sortLegend_sortLegend,
|
|
10285
|
+
theme_theme,
|
|
10286
|
+
markStyle_markStyle,
|
|
10287
|
+
annotation_annotation,
|
|
10288
|
+
regressionLine
|
|
10289
|
+
];
|
|
10290
|
+
const initHistogram = (spec)=>{
|
|
10291
|
+
const result = {
|
|
10292
|
+
...spec
|
|
10293
|
+
};
|
|
10294
|
+
result.type = 'histogram';
|
|
10295
|
+
result.xField = BinStartMeasureId;
|
|
10296
|
+
result.x2Field = BinEndMeasureId;
|
|
10297
|
+
result.yField = FoldMeasureValue;
|
|
10298
|
+
result.padding = 0;
|
|
10299
|
+
result.region = [
|
|
10300
|
+
{
|
|
10301
|
+
clip: true
|
|
10302
|
+
}
|
|
10303
|
+
];
|
|
10304
|
+
result.animation = true;
|
|
10305
|
+
return result;
|
|
10306
|
+
};
|
|
10307
|
+
const datasetHistogram = (spec, context)=>{
|
|
10308
|
+
const { advancedVSeed, vseed } = context;
|
|
10309
|
+
const { datasetReshapeInfo } = advancedVSeed;
|
|
10310
|
+
const { id } = datasetReshapeInfo[0];
|
|
10311
|
+
const fields = {};
|
|
10312
|
+
return {
|
|
10313
|
+
...spec,
|
|
10314
|
+
data: {
|
|
10315
|
+
id,
|
|
10316
|
+
values: isPivotChart(vseed) ? void 0 : advancedVSeed.dataset.flat(),
|
|
10317
|
+
fields: fields
|
|
10318
|
+
}
|
|
10319
|
+
};
|
|
10320
|
+
};
|
|
10321
|
+
const tooltipHistogram_VCHART_OUTLIER_KEY = '__VCHART_BOX_PLOT_OUTLIER_VALUE';
|
|
10322
|
+
const tooltipHistogram = (spec, context)=>{
|
|
10323
|
+
const result = {
|
|
10324
|
+
...spec
|
|
10325
|
+
};
|
|
10326
|
+
const { advancedVSeed } = context;
|
|
10327
|
+
const { chartType, dimensions, encoding } = advancedVSeed;
|
|
10328
|
+
const baseConfig = advancedVSeed.config[chartType];
|
|
10329
|
+
const { tooltip = {
|
|
10330
|
+
enable: true
|
|
10331
|
+
} } = baseConfig;
|
|
10332
|
+
const { enable } = tooltip;
|
|
10333
|
+
result.tooltip = {
|
|
10334
|
+
visible: enable,
|
|
10335
|
+
mark: {
|
|
10336
|
+
title: {
|
|
10337
|
+
visible: false
|
|
10338
|
+
},
|
|
10339
|
+
content: tooltipHistogram_createMarkContent(encoding.tooltip || [], dimensions, encoding)
|
|
10340
|
+
},
|
|
10341
|
+
dimension: {
|
|
10342
|
+
title: {
|
|
10343
|
+
visible: false
|
|
10344
|
+
},
|
|
10345
|
+
content: tooltipHistogram_createMarkContent(encoding.tooltip || [], dimensions, encoding)
|
|
10346
|
+
}
|
|
10347
|
+
};
|
|
10348
|
+
return result;
|
|
10349
|
+
};
|
|
10350
|
+
const tooltipHistogram_createMarkContent = (tooltip, dimensions, encoding)=>{
|
|
10351
|
+
const dims = C(dimensions.filter((item)=>tooltip.includes(item.id)), T((item)=>item.id), T((item)=>item.alias));
|
|
10352
|
+
const dimContent = dims.map((item)=>({
|
|
10353
|
+
visible: true,
|
|
10354
|
+
hasShape: true,
|
|
10355
|
+
shapeType: 'rectRound',
|
|
10356
|
+
key: item.alias ?? item.id,
|
|
10357
|
+
value: (datum)=>{
|
|
10358
|
+
if (!chunk_JK3VNB42_n(datum?.[tooltipHistogram_VCHART_OUTLIER_KEY])) {
|
|
10359
|
+
if (encoding.color?.includes(item.id)) return datum?.[ColorEncoding];
|
|
10360
|
+
if (encoding.x?.includes(item.id)) return datum?.[XEncoding];
|
|
10361
|
+
}
|
|
10362
|
+
return datum?.[item.id];
|
|
10363
|
+
}
|
|
10364
|
+
}));
|
|
10365
|
+
const defaultContent = [
|
|
10366
|
+
{
|
|
10367
|
+
visible: true,
|
|
10368
|
+
hasShape: true,
|
|
10369
|
+
shapeType: 'rectRound',
|
|
10370
|
+
key: (datum)=>{
|
|
10371
|
+
if (!datum) return '';
|
|
10372
|
+
return `${datum[BinStartMeasureId]} ~ ${datum[BinEndMeasureId]}`;
|
|
10373
|
+
},
|
|
10374
|
+
value: (datum)=>{
|
|
10375
|
+
if (!datum) return '';
|
|
10376
|
+
return datum[FoldMeasureValue];
|
|
10377
|
+
}
|
|
10378
|
+
}
|
|
10379
|
+
];
|
|
10380
|
+
return [
|
|
10381
|
+
...dimContent,
|
|
10382
|
+
defaultContent
|
|
10383
|
+
];
|
|
10384
|
+
};
|
|
10385
|
+
const gaussian = (u)=>1 / Math.sqrt(2 * Math.PI) * Math.exp(-0.5 * u * u);
|
|
10386
|
+
function scott(n, std, dim = 1) {
|
|
10387
|
+
return n <= 0 || 0 === std ? 0 : std * Math.pow(n, -1 / (dim + 4));
|
|
10388
|
+
}
|
|
10389
|
+
function silverman(n, std, dim = 1) {
|
|
10390
|
+
if (n <= 0 || 0 === std) return 0;
|
|
10391
|
+
return Math.pow(4 / (dim + 2), 1 / (dim + 4)) * std * Math.pow(n, -1 / (dim + 4));
|
|
10392
|
+
}
|
|
10393
|
+
function kde_std(values) {
|
|
10394
|
+
const n = values.length;
|
|
10395
|
+
if (0 === n) return 0;
|
|
10396
|
+
let mean = 0;
|
|
10397
|
+
for(let i = 0; i < n; i++)mean += values[i];
|
|
10398
|
+
mean /= n;
|
|
10399
|
+
let s = 0;
|
|
10400
|
+
for(let i = 0; i < n; i++){
|
|
10401
|
+
const d = values[i] - mean;
|
|
10402
|
+
s += d * d;
|
|
10403
|
+
}
|
|
10404
|
+
return Math.sqrt(s / n);
|
|
10405
|
+
}
|
|
10406
|
+
function kde_kde(data, options = {}) {
|
|
10407
|
+
const n = data.length, kernel = options.kernel || gaussian;
|
|
10408
|
+
let h = options.bandwidth;
|
|
10409
|
+
if (!h || h <= 0) {
|
|
10410
|
+
const sd = kde_std(data) || 0, method = options.bandwidthMethod || "scott";
|
|
10411
|
+
h = "silverman" === method ? silverman(n, sd, 1) : scott(n, sd, 1);
|
|
10412
|
+
}
|
|
10413
|
+
if (!h || h <= 0) return {
|
|
10414
|
+
bandwidth: 0,
|
|
10415
|
+
kernel: kernel,
|
|
10416
|
+
evaluate: (x)=>{
|
|
10417
|
+
if (Array.isArray(x)) {
|
|
10418
|
+
const out = [];
|
|
10419
|
+
for(let i = 0; i < x.length; i++)out.push(0);
|
|
10420
|
+
return out;
|
|
10421
|
+
}
|
|
10422
|
+
return 0;
|
|
10423
|
+
},
|
|
10424
|
+
evaluateGrid: (N)=>{
|
|
10425
|
+
const out = [];
|
|
10426
|
+
if (N <= 0) return out;
|
|
10427
|
+
let min = 1 / 0, max = -1 / 0;
|
|
10428
|
+
for(let j = 0; j < n; j++){
|
|
10429
|
+
const v = data[j];
|
|
10430
|
+
v < min && (min = v), v > max && (max = v);
|
|
10431
|
+
}
|
|
10432
|
+
if (min === 1 / 0 || max === -1 / 0) {
|
|
10433
|
+
for(let i = 0; i < N; i++)out.push({
|
|
10434
|
+
x: 0,
|
|
10435
|
+
y: 0
|
|
10436
|
+
});
|
|
10437
|
+
return out;
|
|
10438
|
+
}
|
|
10439
|
+
for(let i = 0; i < N; i++)out.push({
|
|
10440
|
+
x: min,
|
|
10441
|
+
y: 0
|
|
10442
|
+
});
|
|
10443
|
+
return out;
|
|
10444
|
+
}
|
|
10445
|
+
};
|
|
10446
|
+
const invNh = 1 / (n * h);
|
|
10447
|
+
function evalPoint(x) {
|
|
10448
|
+
let sum = 0;
|
|
10449
|
+
for(let j = 0; j < n; j++)sum += kernel((x - data[j]) / h);
|
|
10450
|
+
return sum * invNh;
|
|
10451
|
+
}
|
|
10452
|
+
return {
|
|
10453
|
+
bandwidth: h,
|
|
10454
|
+
kernel: kernel,
|
|
10455
|
+
evaluate: function(x) {
|
|
10456
|
+
if (Array.isArray(x)) {
|
|
10457
|
+
const out = [];
|
|
10458
|
+
for(let i = 0; i < x.length; i++)out.push(evalPoint(x[i]));
|
|
10459
|
+
return out;
|
|
10460
|
+
}
|
|
10461
|
+
return evalPoint(x);
|
|
10462
|
+
},
|
|
10463
|
+
evaluateGrid (N) {
|
|
10464
|
+
const out = [];
|
|
10465
|
+
if (N <= 0) return out;
|
|
10466
|
+
let min = 1 / 0, max = -1 / 0;
|
|
10467
|
+
for(let i = 0; i < n; i++){
|
|
10468
|
+
const v = data[i];
|
|
10469
|
+
v < min && (min = v), v > max && (max = v);
|
|
10470
|
+
}
|
|
10471
|
+
if (min === 1 / 0 || max === -1 / 0) return out;
|
|
10472
|
+
if (min === max) {
|
|
10473
|
+
for(let i = 0; i < N; i++)out.push({
|
|
10474
|
+
x: min,
|
|
10475
|
+
y: evalPoint(min)
|
|
10476
|
+
});
|
|
10477
|
+
return out;
|
|
10478
|
+
}
|
|
10479
|
+
const step = (max - min) / (N - 1);
|
|
10480
|
+
for(let i = 0; i < N; i++){
|
|
10481
|
+
const x = i === N - 1 ? max : min + step * i;
|
|
10482
|
+
out.push({
|
|
10483
|
+
x: x,
|
|
10484
|
+
y: evalPoint(x)
|
|
10485
|
+
});
|
|
10486
|
+
}
|
|
10487
|
+
return out;
|
|
10488
|
+
}
|
|
10489
|
+
};
|
|
10490
|
+
}
|
|
10491
|
+
function ecdf(data) {
|
|
10492
|
+
const n = data.length, sorted = data.slice().sort((a, b)=>a - b);
|
|
10493
|
+
function evaluateSingle(x) {
|
|
10494
|
+
if (0 === n) return 0;
|
|
10495
|
+
let lo = 0, hi = n;
|
|
10496
|
+
for(; lo < hi;){
|
|
10497
|
+
const mid = lo + hi >>> 1;
|
|
10498
|
+
sorted[mid] <= x ? lo = mid + 1 : hi = mid;
|
|
10499
|
+
}
|
|
10500
|
+
return lo / n;
|
|
10501
|
+
}
|
|
10502
|
+
return {
|
|
10503
|
+
evaluate: function(x) {
|
|
10504
|
+
if (Array.isArray(x)) {
|
|
10505
|
+
const out = [];
|
|
10506
|
+
for(let i = 0; i < x.length; i++)out.push(evaluateSingle(x[i]));
|
|
10507
|
+
return out;
|
|
10508
|
+
}
|
|
10509
|
+
return evaluateSingle(x);
|
|
10510
|
+
},
|
|
10511
|
+
evaluateGrid: function(N) {
|
|
10512
|
+
const out = [];
|
|
10513
|
+
if (N <= 0) return out;
|
|
10514
|
+
if (0 === n) return out;
|
|
10515
|
+
const min = sorted[0], max = sorted[n - 1];
|
|
10516
|
+
if (min === max) {
|
|
10517
|
+
for(let i = 0; i < N; i++)out.push({
|
|
10518
|
+
x: min,
|
|
10519
|
+
y: 1
|
|
10520
|
+
});
|
|
10521
|
+
return out;
|
|
10522
|
+
}
|
|
10523
|
+
const step = (max - min) / (N - 1);
|
|
10524
|
+
for(let i = 0; i < N; i++){
|
|
10525
|
+
const x = i === N - 1 ? max : min + step * i;
|
|
10526
|
+
out.push({
|
|
10527
|
+
x: x,
|
|
10528
|
+
y: evaluateSingle(x)
|
|
10529
|
+
});
|
|
10530
|
+
}
|
|
10531
|
+
return out;
|
|
10532
|
+
},
|
|
10533
|
+
n: n
|
|
10534
|
+
};
|
|
10535
|
+
}
|
|
10536
|
+
const getRegressionByType = (type, data, kdeOptions)=>{
|
|
10537
|
+
switch(type){
|
|
10538
|
+
case 'kde':
|
|
10539
|
+
return kde_kde(data, kdeOptions);
|
|
10540
|
+
case 'ecdf':
|
|
10541
|
+
return ecdf(data);
|
|
10542
|
+
}
|
|
10543
|
+
};
|
|
10544
|
+
const histogramRegressionLine_histogramRegressionLine = (spec, context)=>{
|
|
10545
|
+
const result = {
|
|
10546
|
+
...spec
|
|
10547
|
+
};
|
|
10548
|
+
const { advancedVSeed, vseed } = context;
|
|
10549
|
+
const { chartType, encoding = {}, dimensions, histogramRegressionLine } = advancedVSeed;
|
|
10550
|
+
const { dataset } = vseed;
|
|
10551
|
+
const theme = advancedVSeed.config[chartType]?.histogramRegressionLine;
|
|
10552
|
+
if (!histogramRegressionLine) return result;
|
|
10553
|
+
const rowColumnFields = T(dimensions.filter((dim)=>'row' === dim.encoding || 'column' === dim.encoding), (item)=>item.id);
|
|
10554
|
+
const lineList = Array.isArray(histogramRegressionLine) ? histogramRegressionLine : [
|
|
10555
|
+
histogramRegressionLine
|
|
10556
|
+
];
|
|
10557
|
+
if (!result.customMark) result.customMark = [];
|
|
10558
|
+
lineList.forEach((line)=>{
|
|
10559
|
+
const { color, type, lineWidth, lineDash, text, textColor, textFontSize, textFontWeight } = line;
|
|
10560
|
+
result.customMark.push({
|
|
10561
|
+
type: 'line',
|
|
10562
|
+
interactive: false,
|
|
10563
|
+
zIndex: 500,
|
|
10564
|
+
style: {
|
|
10565
|
+
lineWidth: lineWidth ?? theme?.lineWidth,
|
|
10566
|
+
lineDash: lineDash ?? theme?.lineDash,
|
|
10567
|
+
stroke: color ?? ((datum, ctx)=>{
|
|
10568
|
+
const vchart = ctx.vchart;
|
|
10569
|
+
const chart = vchart.getChart();
|
|
10570
|
+
const series = chart.getAllSeries().filter((s)=>'bar' === s.type);
|
|
10571
|
+
return series.length ? series[0].getOption().globalScale.getScale('color')?.scale(series[0].getSeriesKeys()[0]) : void 0;
|
|
10572
|
+
}),
|
|
10573
|
+
points: (datum, ctx)=>{
|
|
10574
|
+
const vchart = ctx.vchart;
|
|
10575
|
+
const chart = vchart.getChart();
|
|
10576
|
+
const series = chart.getAllSeries().filter((s)=>'bar' === s.type);
|
|
10577
|
+
if (series && series.length) {
|
|
10578
|
+
const s = series[0];
|
|
10579
|
+
const region = s.getRegion().getLayoutStartPoint();
|
|
10580
|
+
const fieldX = s.fieldX?.[0];
|
|
10581
|
+
const scaleY = s.getYAxisHelper().getScale?.(0);
|
|
10582
|
+
const viewData = s.getViewData()?.latestData;
|
|
10583
|
+
if (!dataset || !dataset.length || !viewData || !viewData.length || !scaleY) return;
|
|
10584
|
+
const simpleData = dataset.filter((entry)=>rowColumnFields.length ? rowColumnFields.every((dim)=>entry[dim.id] === viewData[0][dim.id]) : true).map((d)=>d[encoding.value?.[0]]);
|
|
10585
|
+
const res = getRegressionByType(type, simpleData, 'kde' === type ? {
|
|
10586
|
+
bandwidth: Math.abs(viewData[0][BinEndMeasureId] - viewData[0][BinStartMeasureId])
|
|
10587
|
+
} : void 0);
|
|
10588
|
+
const N = Math.max(3, Math.floor(simpleData.length / 4));
|
|
10589
|
+
const lineData = res.evaluateGrid(N);
|
|
10590
|
+
const yRange = scaleY.range();
|
|
10591
|
+
const y0 = yRange[0];
|
|
10592
|
+
const y1 = yRange[yRange.length - 1];
|
|
10593
|
+
const scaleR = 'kde' === type ? (k)=>scaleY.scale(k * simpleData.length * res.bandwidth) : (e)=>y0 + (y1 - y0) * e;
|
|
10594
|
+
return lineData.map((ld)=>{
|
|
10595
|
+
const d = {
|
|
10596
|
+
[fieldX]: ld.x
|
|
10597
|
+
};
|
|
10598
|
+
return {
|
|
10599
|
+
x: s.dataToPositionX(d) + region.x,
|
|
10600
|
+
y: scaleR(ld.y) + region.y
|
|
10601
|
+
};
|
|
10602
|
+
});
|
|
10603
|
+
}
|
|
10604
|
+
return [];
|
|
10605
|
+
}
|
|
10606
|
+
}
|
|
10607
|
+
});
|
|
10608
|
+
if (!chunk_JK3VNB42_n(text)) result.customMark.push({
|
|
10609
|
+
type: 'text',
|
|
10610
|
+
interactive: false,
|
|
10611
|
+
zIndex: 500,
|
|
10612
|
+
style: {
|
|
10613
|
+
textAlign: 'end',
|
|
10614
|
+
fill: textColor ?? theme?.textColor,
|
|
10615
|
+
fontSize: textFontSize ?? theme?.textFontSize,
|
|
10616
|
+
fontWeight: textFontWeight ?? theme?.textFontWeight,
|
|
10617
|
+
text: text,
|
|
10618
|
+
x: (datum, ctx)=>{
|
|
10619
|
+
const vchart = ctx.vchart;
|
|
10620
|
+
const chart = vchart.getChart();
|
|
10621
|
+
const series = chart.getAllSeries().filter((s)=>'bar' === s.type);
|
|
10622
|
+
if (series && series.length) {
|
|
10623
|
+
const s = series[0];
|
|
10624
|
+
const startPoint = s.getRegion().getLayoutStartPoint();
|
|
10625
|
+
const fieldX = s.fieldX[0];
|
|
10626
|
+
const fieldX2 = s.fieldX2;
|
|
10627
|
+
const scaleY = s.getYAxisHelper().getScale?.(0);
|
|
10628
|
+
const viewData = s.getViewData()?.latestData;
|
|
10629
|
+
if (!dataset || !dataset.length || !viewData || !viewData.length || !scaleY) return;
|
|
10630
|
+
const maxX = Math.max.apply(null, viewData.map((d)=>Math.max(d[fieldX], d[fieldX2])));
|
|
10631
|
+
return startPoint.x + s.dataToPositionX({
|
|
10632
|
+
[fieldX]: maxX
|
|
10633
|
+
});
|
|
10634
|
+
}
|
|
10635
|
+
},
|
|
10636
|
+
y: (datum, ctx)=>{
|
|
10637
|
+
const vchart = ctx.vchart;
|
|
10638
|
+
const chart = vchart.getChart();
|
|
10639
|
+
const series = chart.getAllSeries().filter((s)=>'bar' === s.type);
|
|
10640
|
+
if (series && series.length) {
|
|
10641
|
+
const s = series[0];
|
|
10642
|
+
const startPoint = s.getRegion().getLayoutStartPoint();
|
|
10643
|
+
const fieldY = s.fieldY[0];
|
|
10644
|
+
const viewData = s.getViewData()?.latestData;
|
|
10645
|
+
if (!viewData || !viewData.length) return;
|
|
10646
|
+
return 'ecdf' === type ? startPoint.y + 12 : startPoint.y + s.dataToPositionY({
|
|
10647
|
+
[fieldY]: viewData[viewData.length - 1]?.[fieldY]
|
|
10648
|
+
});
|
|
10649
|
+
}
|
|
10650
|
+
}
|
|
10651
|
+
}
|
|
10652
|
+
});
|
|
10653
|
+
});
|
|
10654
|
+
return result;
|
|
10655
|
+
};
|
|
10656
|
+
const histogram = [
|
|
10657
|
+
initHistogram,
|
|
10658
|
+
colorAdapter(color_color, linearColor),
|
|
10659
|
+
background_backgroundColor,
|
|
10660
|
+
datasetHistogram,
|
|
10661
|
+
progressive,
|
|
10662
|
+
xLinear,
|
|
10663
|
+
yLinear,
|
|
10664
|
+
label_label,
|
|
10665
|
+
tooltipHistogram,
|
|
10666
|
+
colorAdapter(discreteLegend, colorLegend),
|
|
10667
|
+
verticalCrosshairRect,
|
|
10668
|
+
colorBarStyleFill(barStyle_barStyle),
|
|
10669
|
+
annotationPoint_annotationPoint,
|
|
10670
|
+
annotationVerticalLine_annotationVerticalLine,
|
|
10671
|
+
annotationHorizontalLine_annotationHorizontalLine,
|
|
10672
|
+
annotationAreaBand,
|
|
10673
|
+
histogramRegressionLine_histogramRegressionLine
|
|
10674
|
+
];
|
|
10675
|
+
const pivotHistogram = [
|
|
10676
|
+
initPivot,
|
|
10677
|
+
pivotGridStyle,
|
|
10678
|
+
datasetPivot,
|
|
10679
|
+
pivotIndicators_pivotIndicators([
|
|
10680
|
+
initHistogram,
|
|
10681
|
+
colorAdapter(color_color, linearColor),
|
|
10682
|
+
background_backgroundColor,
|
|
10683
|
+
datasetHistogram,
|
|
10684
|
+
progressive,
|
|
10685
|
+
xLinear,
|
|
10686
|
+
yLinear,
|
|
10687
|
+
label_label,
|
|
10688
|
+
tooltipHistogram,
|
|
10689
|
+
colorBarStyleFill(barStyle_barStyle),
|
|
10690
|
+
verticalCrosshairRect,
|
|
10691
|
+
annotationPoint_annotationPoint,
|
|
10692
|
+
annotationVerticalLine_annotationVerticalLine,
|
|
10693
|
+
annotationHorizontalLine_annotationHorizontalLine,
|
|
10694
|
+
annotationAreaBand,
|
|
10695
|
+
histogramRegressionLine_histogramRegressionLine
|
|
10696
|
+
]),
|
|
10697
|
+
pivotRowDimensions,
|
|
10698
|
+
pivotColumnDimensions,
|
|
10699
|
+
colorAdapter(pivotDiscreteLegend, pivotColorLegend)
|
|
10700
|
+
];
|
|
10701
|
+
const histogramSpecPipeline = [
|
|
10702
|
+
pivotAdapter_pivotAdapter(histogram, pivotHistogram)
|
|
10703
|
+
];
|
|
10704
|
+
const registerHistogram = ()=>{
|
|
10705
|
+
Builder._advancedPipelineMap.histogram = histogramAdvancedPipeline;
|
|
10706
|
+
Builder._specPipelineMap.histogram = histogramSpecPipeline;
|
|
10707
|
+
};
|
|
10708
|
+
const getDarkCrosshairLine = ()=>({
|
|
10709
|
+
visible: true,
|
|
10710
|
+
labelVisible: true,
|
|
10711
|
+
labelColor: '#ffffff',
|
|
10712
|
+
labelBackgroundColor: '#404349',
|
|
10713
|
+
lineColor: '#55595F'
|
|
10714
|
+
});
|
|
10715
|
+
const getDarkCrosshairRect = ()=>({
|
|
10716
|
+
visible: true,
|
|
10717
|
+
labelVisible: true,
|
|
10718
|
+
labelColor: '#4B4F54',
|
|
10719
|
+
labelBackgroundColor: '#ffffff',
|
|
10720
|
+
rectColor: '#E2E3E6'
|
|
10721
|
+
});
|
|
10722
|
+
const getLightCrosshairLine = ()=>({
|
|
10723
|
+
visible: true,
|
|
10724
|
+
labelVisible: true,
|
|
10725
|
+
labelColor: '#ffffff',
|
|
10726
|
+
labelBackgroundColor: '#21252C',
|
|
10727
|
+
lineColor: '#21252C'
|
|
10728
|
+
});
|
|
10729
|
+
const getLightCrosshairRect = ()=>({
|
|
10730
|
+
visible: true,
|
|
10731
|
+
labelVisible: true,
|
|
10732
|
+
labelColor: '#ffffff',
|
|
10733
|
+
labelBackgroundColor: '#364159',
|
|
10734
|
+
rectColor: '#3641594d'
|
|
10735
|
+
});
|
|
10736
|
+
const getLightColorScheme = ()=>[
|
|
10737
|
+
'#8D72F6',
|
|
10738
|
+
'#5766EC',
|
|
10739
|
+
'#66A3FE',
|
|
10740
|
+
'#51D5E6',
|
|
10741
|
+
'#4EC0B3',
|
|
10742
|
+
'#F9DF90',
|
|
10743
|
+
'#F9AD71',
|
|
10744
|
+
'#ED8888',
|
|
10745
|
+
'#E9A0C3',
|
|
10746
|
+
'#D77DD3'
|
|
10747
|
+
];
|
|
10748
|
+
const getDarkColorScheme = ()=>[
|
|
10749
|
+
'#2E62F1',
|
|
10750
|
+
'#4DC36A',
|
|
10751
|
+
'#FF8406',
|
|
10752
|
+
'#FFCC00',
|
|
10753
|
+
'#4F44CF',
|
|
10754
|
+
'#5AC8FA',
|
|
10755
|
+
'#003A8C',
|
|
10756
|
+
'#B08AE2',
|
|
10757
|
+
'#FF6341',
|
|
10758
|
+
'#98DD62'
|
|
10759
|
+
];
|
|
10760
|
+
const getLightLinearColorScheme = ()=>[
|
|
10761
|
+
'#C2CEFF',
|
|
10762
|
+
'#5766EC'
|
|
10763
|
+
];
|
|
10764
|
+
const getDarkLinearColorScheme = ()=>[
|
|
10765
|
+
'#A0CEFF',
|
|
10766
|
+
'#2E62F1'
|
|
10767
|
+
];
|
|
10768
|
+
const getLightColor = ()=>({
|
|
10769
|
+
linearColorScheme: getLightLinearColorScheme(),
|
|
10770
|
+
colorScheme: getLightColorScheme()
|
|
10771
|
+
});
|
|
10772
|
+
const getDarkColor = ()=>({
|
|
10773
|
+
linearColorScheme: getDarkLinearColorScheme(),
|
|
10774
|
+
colorScheme: getDarkColorScheme()
|
|
10775
|
+
});
|
|
10776
|
+
const getDefaultLabel = ()=>({
|
|
10777
|
+
enable: true,
|
|
10778
|
+
wrap: true,
|
|
10779
|
+
showValue: true,
|
|
10780
|
+
showValuePercent: false,
|
|
10781
|
+
labelColorSmartInvert: false,
|
|
10782
|
+
labelOverlap: true
|
|
10783
|
+
});
|
|
10784
|
+
const getDarkLabel = ()=>({
|
|
9343
10785
|
...getDefaultLabel(),
|
|
9344
10786
|
labelStroke: '#21252C'
|
|
9345
10787
|
});
|
|
@@ -9357,12 +10799,15 @@
|
|
|
9357
10799
|
labelFontSize: 12,
|
|
9358
10800
|
labelFontWeight: 400
|
|
9359
10801
|
});
|
|
10802
|
+
const getDefaultTableConfig = ()=>({
|
|
10803
|
+
bodyFontSize: 12,
|
|
10804
|
+
bodyBackgroundColor: 'transparent',
|
|
10805
|
+
headerFontSize: 12
|
|
10806
|
+
});
|
|
9360
10807
|
const getLightTableConfig = ()=>({
|
|
10808
|
+
...getDefaultTableConfig(),
|
|
9361
10809
|
borderColor: '#e3e5eb',
|
|
9362
|
-
bodyFontSize: 12,
|
|
9363
10810
|
bodyFontColor: '#141414',
|
|
9364
|
-
bodyBackgroundColor: 'transparent',
|
|
9365
|
-
headerFontSize: 12,
|
|
9366
10811
|
headerFontColor: '#21252c',
|
|
9367
10812
|
headerBackgroundColor: '#f6f7f9',
|
|
9368
10813
|
hoverBodyBackgroundColor: '#bedaff',
|
|
@@ -9374,11 +10819,9 @@
|
|
|
9374
10819
|
backgroundColor: 'transparent'
|
|
9375
10820
|
});
|
|
9376
10821
|
const getDarkTableConfig = ()=>({
|
|
10822
|
+
...getDefaultTableConfig(),
|
|
9377
10823
|
borderColor: '#4b4e53',
|
|
9378
|
-
bodyFontSize: 12,
|
|
9379
10824
|
bodyFontColor: '#fdfdfd',
|
|
9380
|
-
bodyBackgroundColor: 'transparent',
|
|
9381
|
-
headerFontSize: 12,
|
|
9382
10825
|
headerFontColor: '#fdfdfd',
|
|
9383
10826
|
headerBackgroundColor: '#36393e',
|
|
9384
10827
|
hoverBodyBackgroundColor: '#4284ff66',
|
|
@@ -9389,10 +10832,12 @@
|
|
|
9389
10832
|
selectedBackgroundColor: '#4284ff33'
|
|
9390
10833
|
});
|
|
9391
10834
|
const pickPivotChartGridConfig = (tableConfig)=>({
|
|
10835
|
+
outlineBorderLineWidth: 0,
|
|
10836
|
+
frameCornerRadius: 0,
|
|
9392
10837
|
borderColor: tableConfig.borderColor,
|
|
9393
10838
|
bodyFontColor: tableConfig.bodyFontColor,
|
|
9394
10839
|
headerFontColor: tableConfig.headerFontColor,
|
|
9395
|
-
headerBackgroundColor:
|
|
10840
|
+
headerBackgroundColor: 'transparent',
|
|
9396
10841
|
hoverHeaderBackgroundColor: tableConfig.hoverHeaderBackgroundColor,
|
|
9397
10842
|
hoverHeaderInlineBackgroundColor: tableConfig.hoverHeaderInlineBackgroundColor
|
|
9398
10843
|
});
|
|
@@ -9678,6 +11123,19 @@
|
|
|
9678
11123
|
const getDarkHeatmapCellTheme = ()=>({
|
|
9679
11124
|
stroke: '#404349'
|
|
9680
11125
|
});
|
|
11126
|
+
const getDefaultHistogramRegressionLine = ()=>({
|
|
11127
|
+
lineWidth: 2,
|
|
11128
|
+
textFontSize: 12,
|
|
11129
|
+
textFontWeight: 400
|
|
11130
|
+
});
|
|
11131
|
+
const getLightHistogramRegressionLine = ()=>({
|
|
11132
|
+
...getDefaultHistogramRegressionLine(),
|
|
11133
|
+
textColor: '#364159'
|
|
11134
|
+
});
|
|
11135
|
+
const getDarkHistogramRegressionLine = ()=>({
|
|
11136
|
+
...getDefaultHistogramRegressionLine(),
|
|
11137
|
+
textColor: '#ffffff'
|
|
11138
|
+
});
|
|
9681
11139
|
const lightTheme = ()=>{
|
|
9682
11140
|
const linearAxis = getLightLinearAxis();
|
|
9683
11141
|
const bandAxis = getLightBandAxis();
|
|
@@ -9924,6 +11382,23 @@
|
|
|
9924
11382
|
},
|
|
9925
11383
|
cell: getLightHeatmapCellTheme(),
|
|
9926
11384
|
pivotGrid: getLightPivotChartGridConfig()
|
|
11385
|
+
},
|
|
11386
|
+
histogram: {
|
|
11387
|
+
...baseConfig,
|
|
11388
|
+
xAxis: linearAxis,
|
|
11389
|
+
yAxis: linearAxis,
|
|
11390
|
+
crosshairRect,
|
|
11391
|
+
pivotGrid: getLightPivotChartGridConfig(),
|
|
11392
|
+
annotation: getLightAnnotation(),
|
|
11393
|
+
histogramRegressionLine: getLightHistogramRegressionLine()
|
|
11394
|
+
},
|
|
11395
|
+
boxPlot: {
|
|
11396
|
+
...baseConfig,
|
|
11397
|
+
xAxis: linearAxis,
|
|
11398
|
+
yAxis: linearAxis,
|
|
11399
|
+
crosshairRect,
|
|
11400
|
+
pivotGrid: getLightPivotChartGridConfig(),
|
|
11401
|
+
annotation: getLightAnnotation()
|
|
9927
11402
|
}
|
|
9928
11403
|
}
|
|
9929
11404
|
};
|
|
@@ -10168,6 +11643,23 @@
|
|
|
10168
11643
|
},
|
|
10169
11644
|
cell: getDarkHeatmapCellTheme(),
|
|
10170
11645
|
pivotGrid: getDarkPivotChartGridConfig()
|
|
11646
|
+
},
|
|
11647
|
+
histogram: {
|
|
11648
|
+
...baseConfig,
|
|
11649
|
+
xAxis: linearAxis,
|
|
11650
|
+
yAxis: linearAxis,
|
|
11651
|
+
crosshairRect: crosshairRect,
|
|
11652
|
+
pivotGrid: getDarkPivotChartGridConfig(),
|
|
11653
|
+
annotation: getDarkAnnotation(),
|
|
11654
|
+
histogramRegressionLine: getDarkHistogramRegressionLine()
|
|
11655
|
+
},
|
|
11656
|
+
boxPlot: {
|
|
11657
|
+
...baseConfig,
|
|
11658
|
+
xAxis: bandAxis,
|
|
11659
|
+
yAxis: linearAxis,
|
|
11660
|
+
crosshairRect: crosshairRect,
|
|
11661
|
+
pivotGrid: getDarkPivotChartGridConfig(),
|
|
11662
|
+
annotation: getDarkAnnotation()
|
|
10171
11663
|
}
|
|
10172
11664
|
}
|
|
10173
11665
|
};
|
|
@@ -10206,6 +11698,8 @@
|
|
|
10206
11698
|
registerRadar();
|
|
10207
11699
|
registerFunnel();
|
|
10208
11700
|
registerHeatmap();
|
|
11701
|
+
registerBoxplot();
|
|
11702
|
+
registerHistogram();
|
|
10209
11703
|
registerLightTheme();
|
|
10210
11704
|
registerDarkTheme();
|
|
10211
11705
|
};
|
|
@@ -13518,7 +15012,9 @@
|
|
|
13518
15012
|
'donut',
|
|
13519
15013
|
'radar',
|
|
13520
15014
|
'funnel',
|
|
13521
|
-
'heatmap'
|
|
15015
|
+
'heatmap',
|
|
15016
|
+
'boxPlot',
|
|
15017
|
+
'histogram'
|
|
13522
15018
|
]);
|
|
13523
15019
|
const zDualChartType = schemas_object({
|
|
13524
15020
|
primary: schemas_enum([
|
|
@@ -13690,7 +15186,16 @@
|
|
|
13690
15186
|
label: schemas_array(schemas_string()).nullish(),
|
|
13691
15187
|
row: schemas_array(schemas_string()).nullish(),
|
|
13692
15188
|
column: schemas_array(schemas_string()).nullish(),
|
|
13693
|
-
group: schemas_array(schemas_string()).nullish().describe("\u5DF2\u5F03\u7528, \u8BF7\u4F7F\u7528\u989C\u8272\u66FF\u4EE3")
|
|
15189
|
+
group: schemas_array(schemas_string()).nullish().describe("\u5DF2\u5F03\u7528, \u8BF7\u4F7F\u7528\u989C\u8272\u66FF\u4EE3"),
|
|
15190
|
+
value: schemas_array(schemas_string()).nullish(),
|
|
15191
|
+
q1: schemas_array(schemas_string()).nullish(),
|
|
15192
|
+
q3: schemas_array(schemas_string()).nullish(),
|
|
15193
|
+
median: schemas_array(schemas_string()).nullish(),
|
|
15194
|
+
min: schemas_array(schemas_string()).nullish(),
|
|
15195
|
+
max: schemas_array(schemas_string()).nullish(),
|
|
15196
|
+
outliers: schemas_array(schemas_string()).nullish(),
|
|
15197
|
+
x0: schemas_array(schemas_string()).nullish(),
|
|
15198
|
+
x1: schemas_array(schemas_string()).nullish()
|
|
13694
15199
|
});
|
|
13695
15200
|
const EncodingEnum = {
|
|
13696
15201
|
x: 'x',
|
|
@@ -14215,7 +15720,9 @@
|
|
|
14215
15720
|
headerFontColor: schemas_string().nullish(),
|
|
14216
15721
|
headerBackgroundColor: schemas_string().nullish(),
|
|
14217
15722
|
hoverHeaderBackgroundColor: schemas_string().nullish(),
|
|
14218
|
-
hoverHeaderInlineBackgroundColor: schemas_string().nullish()
|
|
15723
|
+
hoverHeaderInlineBackgroundColor: schemas_string().nullish(),
|
|
15724
|
+
outlineBorderLineWidth: schemas_number().nullish(),
|
|
15725
|
+
frameCornerRadius: schemas_number().nullish()
|
|
14219
15726
|
});
|
|
14220
15727
|
const zLineConfig = schemas_object({
|
|
14221
15728
|
backgroundColor: zBackgroundColor.nullish(),
|
|
@@ -14366,6 +15873,50 @@
|
|
|
14366
15873
|
cell: zHeatmapCell.nullish()
|
|
14367
15874
|
});
|
|
14368
15875
|
const zPivotTableConfig = zTableConfig;
|
|
15876
|
+
const zWhiskersConfig = schemas_number().or(schemas_array(schemas_number())).default(1.5);
|
|
15877
|
+
const zBoxplotConfig = schemas_object({
|
|
15878
|
+
backgroundColor: zBackgroundColor.nullish(),
|
|
15879
|
+
label: zLabel.nullish(),
|
|
15880
|
+
color: zColor.nullish(),
|
|
15881
|
+
tooltip: zTooltip.nullish(),
|
|
15882
|
+
legend: zLegend.nullish(),
|
|
15883
|
+
xAxis: zXBandAxis.nullish(),
|
|
15884
|
+
yAxis: zYLinearAxis.nullish(),
|
|
15885
|
+
crosshairRect: zCrosshairRect.nullish(),
|
|
15886
|
+
pivotGrid: zPivotChartGridConfig.nullish(),
|
|
15887
|
+
annotation: zAnnotationConfig.nullish(),
|
|
15888
|
+
whiskers: zWhiskersConfig.nullish()
|
|
15889
|
+
});
|
|
15890
|
+
const zHistogramRegressionLine = schemas_object({
|
|
15891
|
+
type: union([
|
|
15892
|
+
literal('kde'),
|
|
15893
|
+
literal('ecdf')
|
|
15894
|
+
]).nullish(),
|
|
15895
|
+
color: schemas_string().nullish(),
|
|
15896
|
+
lineWidth: schemas_number().nullish(),
|
|
15897
|
+
lineDash: schemas_array(schemas_number()).nullish(),
|
|
15898
|
+
text: schemas_string().nullish(),
|
|
15899
|
+
textColor: schemas_string().nullish(),
|
|
15900
|
+
textFontSize: schemas_number().nullish(),
|
|
15901
|
+
textFontWeight: schemas_number().nullish()
|
|
15902
|
+
});
|
|
15903
|
+
const zHistogramConfig = schemas_object({
|
|
15904
|
+
backgroundColor: zBackgroundColor.nullish(),
|
|
15905
|
+
label: zLabel.nullish(),
|
|
15906
|
+
color: zColor.nullish(),
|
|
15907
|
+
tooltip: zTooltip.nullish(),
|
|
15908
|
+
legend: zLegend.nullish(),
|
|
15909
|
+
xAxis: zXBandAxis.nullish(),
|
|
15910
|
+
yAxis: zYLinearAxis.nullish(),
|
|
15911
|
+
crosshairRect: zCrosshairRect.nullish(),
|
|
15912
|
+
stackCornerRadius: zStackCornerRadius.nullish(),
|
|
15913
|
+
pivotGrid: zPivotChartGridConfig.nullish(),
|
|
15914
|
+
annotation: zAnnotationConfig.nullish(),
|
|
15915
|
+
binCount: schemas_number().positive().nullish(),
|
|
15916
|
+
binStep: schemas_number().positive().nullish(),
|
|
15917
|
+
binValueType: literal('count').or(literal('percentage')).nullish(),
|
|
15918
|
+
histogramRegressionLine: zHistogramRegressionLine.nullish()
|
|
15919
|
+
});
|
|
14369
15920
|
const zConfig = schemas_object({
|
|
14370
15921
|
table: zTableConfig.nullish(),
|
|
14371
15922
|
pivotTable: zPivotTableConfig.nullish(),
|
|
@@ -14386,7 +15937,9 @@
|
|
|
14386
15937
|
donut: zDonutConfig.nullish(),
|
|
14387
15938
|
radar: zRadarConfig.nullish(),
|
|
14388
15939
|
funnel: zFunnelConfig.nullish(),
|
|
14389
|
-
heatmap: zHeatmapConfig.nullish()
|
|
15940
|
+
heatmap: zHeatmapConfig.nullish(),
|
|
15941
|
+
boxPlot: zBoxplotConfig.nullish(),
|
|
15942
|
+
histogram: zHistogramConfig.nullish()
|
|
14390
15943
|
});
|
|
14391
15944
|
const zCustomThemeConfig = schemas_object({
|
|
14392
15945
|
config: zConfig.nullish()
|
|
@@ -14626,6 +16179,8 @@
|
|
|
14626
16179
|
tooltip: zTooltip.nullish(),
|
|
14627
16180
|
xAxis: zXBandAxis.nullish(),
|
|
14628
16181
|
yAxis: zYLinearAxis.nullish(),
|
|
16182
|
+
sort: zSort.nullish(),
|
|
16183
|
+
sortLegent: zSortLegend.nullish(),
|
|
14629
16184
|
crosshairRect: zCrosshairRect.nullish(),
|
|
14630
16185
|
stackCornerRadius: zStackCornerRadius.nullish(),
|
|
14631
16186
|
barMaxWidth: zBarMaxWidth.nullish(),
|
|
@@ -14864,6 +16419,32 @@
|
|
|
14864
16419
|
annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
|
|
14865
16420
|
locale: zLocale.nullish()
|
|
14866
16421
|
});
|
|
16422
|
+
const zHistogram = schemas_object({
|
|
16423
|
+
chartType: literal('histogram'),
|
|
16424
|
+
dataset: zDataset.nullish(),
|
|
16425
|
+
encoding: zEncoding.nullish(),
|
|
16426
|
+
dimensions: zDimensions.nullish(),
|
|
16427
|
+
measures: zMeasureTree.nullish(),
|
|
16428
|
+
backgroundColor: zBackgroundColor.nullish(),
|
|
16429
|
+
color: zColor.nullish(),
|
|
16430
|
+
label: zLabel.nullish(),
|
|
16431
|
+
legend: zLegend.nullish(),
|
|
16432
|
+
tooltip: zTooltip.nullish(),
|
|
16433
|
+
xAxis: zXLinearAxis.nullish(),
|
|
16434
|
+
yAxis: zYLinearAxis.nullish(),
|
|
16435
|
+
crosshairRect: zCrosshairRect.nullish(),
|
|
16436
|
+
binCount: schemas_number().positive().nullish(),
|
|
16437
|
+
binStep: schemas_number().positive().nullish(),
|
|
16438
|
+
binValueType: literal('count').or(literal('percentage')).nullish(),
|
|
16439
|
+
theme: zTheme.nullish(),
|
|
16440
|
+
barStyle: schemas_array(zBarStyle).or(zBarStyle).nullish(),
|
|
16441
|
+
annotationPoint: schemas_array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
|
|
16442
|
+
annotationVerticalLine: schemas_array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
|
|
16443
|
+
annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
|
|
16444
|
+
annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
|
|
16445
|
+
histogramRegressionLine: schemas_array(zHistogramRegressionLine).or(zHistogramRegressionLine).nullish(),
|
|
16446
|
+
locale: zLocale.nullish()
|
|
16447
|
+
});
|
|
14867
16448
|
const zRose = schemas_object({
|
|
14868
16449
|
chartType: literal('rose'),
|
|
14869
16450
|
dataset: zDataset.nullish(),
|
|
@@ -14961,6 +16542,30 @@
|
|
|
14961
16542
|
theme: zTheme.nullish(),
|
|
14962
16543
|
locale: zLocale.nullish()
|
|
14963
16544
|
});
|
|
16545
|
+
const zBoxplot = schemas_object({
|
|
16546
|
+
chartType: literal('boxPlot'),
|
|
16547
|
+
dataset: zDataset.nullish(),
|
|
16548
|
+
encoding: zEncoding.nullish(),
|
|
16549
|
+
dimensions: zDimensions.nullish(),
|
|
16550
|
+
measures: zMeasureTree.nullish(),
|
|
16551
|
+
backgroundColor: zBackgroundColor.nullish(),
|
|
16552
|
+
color: zColor.nullish(),
|
|
16553
|
+
label: zLabel.nullish(),
|
|
16554
|
+
legend: zLegend.nullish(),
|
|
16555
|
+
tooltip: zTooltip.nullish(),
|
|
16556
|
+
xAxis: zXBandAxis.nullish(),
|
|
16557
|
+
yAxis: zYLinearAxis.nullish(),
|
|
16558
|
+
sort: zSort.nullish(),
|
|
16559
|
+
sortLegent: zSortLegend.nullish(),
|
|
16560
|
+
crosshairRect: zCrosshairRect.nullish(),
|
|
16561
|
+
theme: zTheme.nullish(),
|
|
16562
|
+
whiskers: zWhiskersConfig.nullish(),
|
|
16563
|
+
annotationPoint: schemas_array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
|
|
16564
|
+
annotationVerticalLine: schemas_array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
|
|
16565
|
+
annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
|
|
16566
|
+
annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
|
|
16567
|
+
locale: zLocale.nullish()
|
|
16568
|
+
});
|
|
14964
16569
|
const zVSeed = discriminatedUnion('chartType', [
|
|
14965
16570
|
zTable,
|
|
14966
16571
|
zPivotTable,
|
|
@@ -14981,7 +16586,9 @@
|
|
|
14981
16586
|
zRoseParallel,
|
|
14982
16587
|
zRadar,
|
|
14983
16588
|
zFunnel,
|
|
14984
|
-
zHeatmap
|
|
16589
|
+
zHeatmap,
|
|
16590
|
+
zBoxplot,
|
|
16591
|
+
zHistogram
|
|
14985
16592
|
]);
|
|
14986
16593
|
const zAdvancedVSeed = schemas_object({
|
|
14987
16594
|
chartType: zChartType,
|
|
@@ -14996,7 +16603,8 @@
|
|
|
14996
16603
|
markStyle: zMarkStyle,
|
|
14997
16604
|
customTheme: zCustomThemeConfig,
|
|
14998
16605
|
annotation: zAnnotation,
|
|
14999
|
-
locale: zLocale
|
|
16606
|
+
locale: zLocale,
|
|
16607
|
+
histogramRegressionLine: zHistogramRegressionLine.or(schemas_array(zHistogramRegressionLine)).nullish()
|
|
15000
16608
|
});
|
|
15001
16609
|
return __webpack_exports__;
|
|
15002
16610
|
})());
|