@visactor/vseed 0.1.43 → 0.1.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +3 -3
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/builder/builder/builder.d.ts +4380 -0
- package/dist/esm/dataSelector/selector.d.ts +1 -1
- package/dist/esm/dataSelector/selector.js +1 -2
- package/dist/esm/dataSelector/selector.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/histogram.js +2 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/histogram.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.d.ts +1 -0
- package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.js +35 -2
- package/dist/esm/pipeline/advanced/chart/pipes/config/histogram.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/regressionLine/regressionLine.js +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/regressionLine/regressionLine.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js +22 -2
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithHistogramEncoding.js +22 -3
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/reshapeWithHistogramEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/table/pipeline/pivotTable.js +3 -2
- package/dist/esm/pipeline/advanced/table/pipeline/pivotTable.js.map +1 -1
- package/dist/esm/pipeline/advanced/table/pipeline/table.js +2 -1
- package/dist/esm/pipeline/advanced/table/pipeline/table.js.map +1 -1
- package/dist/esm/pipeline/advanced/table/pipes/{default/defaultMeasureName.d.ts → cellStyle/cellStyle.d.ts} +1 -1
- package/dist/esm/pipeline/advanced/table/pipes/cellStyle/cellStyle.js +16 -0
- package/dist/esm/pipeline/advanced/table/pipes/cellStyle/cellStyle.js.map +1 -0
- package/dist/esm/pipeline/advanced/table/pipes/cellStyle/index.d.ts +1 -0
- package/dist/esm/pipeline/advanced/table/pipes/cellStyle/index.js +2 -0
- package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasureId.d.ts +2 -0
- package/dist/esm/pipeline/advanced/table/pipes/default/{defaultMeasureName.js → defaultMeasureId.js} +5 -5
- package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasureId.js.map +1 -0
- package/dist/esm/pipeline/advanced/table/pipes/default/index.d.ts +1 -1
- package/dist/esm/pipeline/advanced/table/pipes/default/index.js +2 -2
- package/dist/esm/pipeline/advanced/table/pipes/index.d.ts +1 -0
- package/dist/esm/pipeline/advanced/table/pipes/index.js +1 -0
- package/dist/esm/pipeline/spec/chart/pipeline/histogram.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationArea.js +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationArea.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationAreaBand.js +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationAreaBand.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationHorizontalLine.js +22 -3
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationHorizontalLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPoint.js +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPoint.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationVerticalLine.js +20 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationVerticalLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/annotation/splitLine.js +23 -7
- package/dist/esm/pipeline/spec/chart/pipes/annotation/splitLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/xBand.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/xBand.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/xLinear.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/xLinear.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/yBand.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/yBand.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/yLinear.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/yLinear.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearPrimary.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearPrimary.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearSecondary.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipes/axes/yLinearSecondary.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/init/histogram.js +4 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/histogram.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/label/label.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipes/label/label.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/legend/discreteLegend.js +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/legend/discreteLegend.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/legend/pivotDiscreteLegend.js +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/legend/pivotDiscreteLegend.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/barStyle.js +5 -7
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/barStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotAxisStyle.js +23 -6
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotAxisStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js +39 -34
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotIndicators.js +10 -3
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotIndicators.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/ecdfRegressionLine.js +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/ecdfRegressionLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/kdeRegressionLine.js +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/kdeRegressionLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltip.js +4 -2
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltip.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.js +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipBoxplot.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.js +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHeatmap.js +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHeatmap.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.js +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipHistogram.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipScatter.js +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipScatter.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipStyle.d.ts +3 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipStyle.js +31 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipStyle.js.map +1 -0
- package/dist/esm/pipeline/spec/table/pipeline/pivotTable.js +3 -2
- package/dist/esm/pipeline/spec/table/pipeline/pivotTable.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipeline/table.js +3 -2
- package/dist/esm/pipeline/spec/table/pipeline/table.js.map +1 -1
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/common.d.ts +2 -0
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/common.js +14 -0
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/common.js.map +1 -0
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/index.d.ts +2 -0
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/index.js +2 -0
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/pivot.d.ts +2 -0
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/pivot.js +49 -0
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/pivot.js.map +1 -0
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/table.d.ts +2 -0
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/table.js +41 -0
- package/dist/esm/pipeline/spec/table/pipes/cellStyle/table.js.map +1 -0
- package/dist/esm/pipeline/spec/table/pipes/index.d.ts +1 -0
- package/dist/esm/pipeline/spec/table/pipes/index.js +1 -0
- package/dist/esm/pipeline/spec/table/pipes/rows/pivotRows.js +13 -3
- package/dist/esm/pipeline/spec/table/pipes/rows/pivotRows.js.map +1 -1
- package/dist/esm/pipeline/utils/constant.d.ts +3 -1
- package/dist/esm/pipeline/utils/constant.js +4 -2
- package/dist/esm/pipeline/utils/constant.js.map +1 -1
- package/dist/esm/pipeline/utils/measures/depth.js.map +1 -1
- package/dist/esm/pipeline/utils/measures/find.js.map +1 -1
- package/dist/esm/pipeline/utils/tree/traverse.d.ts +1 -11
- package/dist/esm/pipeline/utils/tree/traverse.js +3 -4
- package/dist/esm/pipeline/utils/tree/traverse.js.map +1 -1
- package/dist/esm/theme/common/axes.js +2 -2
- package/dist/esm/theme/common/axes.js.map +1 -1
- package/dist/esm/theme/common/table.d.ts +30 -22
- package/dist/esm/theme/common/table.js +12 -2
- package/dist/esm/theme/common/table.js.map +1 -1
- package/dist/esm/theme/common/tooltip.d.ts +3 -2
- package/dist/esm/theme/common/tooltip.js +24 -2
- package/dist/esm/theme/common/tooltip.js.map +1 -1
- package/dist/esm/theme/dark/dark.js +2 -2
- package/dist/esm/theme/dark/dark.js.map +1 -1
- package/dist/esm/theme/light/light.js +2 -2
- package/dist/esm/theme/light/light.js.map +1 -1
- package/dist/esm/types/advancedVSeed.d.ts +3442 -0
- package/dist/esm/types/advancedVSeed.js +2 -0
- package/dist/esm/types/advancedVSeed.js.map +1 -1
- package/dist/esm/types/chartType/area/zArea.d.ts +80 -0
- package/dist/esm/types/chartType/areaPercent/zAreaPercent.d.ts +80 -0
- package/dist/esm/types/chartType/bar/zBar.d.ts +80 -0
- package/dist/esm/types/chartType/barParallel/zBarParallel.d.ts +80 -0
- package/dist/esm/types/chartType/barPercent/zBarPercent.d.ts +80 -0
- package/dist/esm/types/chartType/boxplot/zBoxplot.d.ts +80 -0
- package/dist/esm/types/chartType/column/zColumn.d.ts +82 -0
- package/dist/esm/types/chartType/columnParallel/zColumnParallel.d.ts +80 -0
- package/dist/esm/types/chartType/columnPercent/zColumnPercent.d.ts +80 -0
- package/dist/esm/types/chartType/donut/zDonut.d.ts +80 -0
- package/dist/esm/types/chartType/dualAxis/zDualAxis.d.ts +80 -0
- package/dist/esm/types/chartType/funnel/zFunnel.d.ts +80 -0
- package/dist/esm/types/chartType/heatmap/zHeatmap.d.ts +80 -0
- package/dist/esm/types/chartType/histogram/histogram.d.ts +2 -2
- package/dist/esm/types/chartType/histogram/zHistogram.d.ts +88 -4
- package/dist/esm/types/chartType/histogram/zHistogram.js +2 -2
- package/dist/esm/types/chartType/histogram/zHistogram.js.map +1 -1
- package/dist/esm/types/chartType/line/zLine.d.ts +80 -0
- package/dist/esm/types/chartType/pie/zPie.d.ts +80 -0
- package/dist/esm/types/chartType/pivotTable/pivotTable.d.ts +5 -1
- package/dist/esm/types/chartType/pivotTable/zPivotTable.d.ts +76 -0
- package/dist/esm/types/chartType/pivotTable/zPivotTable.js +2 -1
- package/dist/esm/types/chartType/pivotTable/zPivotTable.js.map +1 -1
- package/dist/esm/types/chartType/radar/zRadar.d.ts +80 -0
- package/dist/esm/types/chartType/rose/zRose.d.ts +80 -0
- package/dist/esm/types/chartType/roseParallel/zRoseParallel.d.ts +80 -0
- package/dist/esm/types/chartType/scatter/zScatter.d.ts +88 -0
- package/dist/esm/types/chartType/table/table.d.ts +5 -1
- package/dist/esm/types/chartType/table/zTable.d.ts +76 -0
- package/dist/esm/types/chartType/table/zTable.js +2 -1
- package/dist/esm/types/chartType/table/zTable.js.map +1 -1
- package/dist/esm/types/properties/cellStyle/bodyCellStyle.d.ts +138 -0
- package/dist/esm/types/properties/cellStyle/bodyCellStyle.js +16 -0
- package/dist/esm/types/properties/cellStyle/bodyCellStyle.js.map +1 -0
- package/dist/esm/types/properties/cellStyle/cellStyle.d.ts +80 -0
- package/dist/esm/types/properties/cellStyle/cellStyle.js +8 -0
- package/dist/esm/types/properties/cellStyle/cellStyle.js.map +1 -0
- package/dist/esm/types/properties/cellStyle/index.d.ts +1 -0
- package/dist/esm/types/properties/cellStyle/index.js +1 -0
- package/dist/esm/types/properties/config/area.d.ts +164 -0
- package/dist/esm/types/properties/config/bar.d.ts +246 -0
- package/dist/esm/types/properties/config/boxplot.d.ts +82 -0
- package/dist/esm/types/properties/config/column.d.ts +258 -0
- package/dist/esm/types/properties/config/config.d.ts +1676 -0
- package/dist/esm/types/properties/config/dualAxis.d.ts +82 -0
- package/dist/esm/types/properties/config/funnel.d.ts +82 -0
- package/dist/esm/types/properties/config/heatmap.d.ts +82 -0
- package/dist/esm/types/properties/config/histogram.d.ts +94 -0
- package/dist/esm/types/properties/config/label/label.d.ts +5 -0
- package/dist/esm/types/properties/config/label/zLabel.d.ts +69 -0
- package/dist/esm/types/properties/config/label/zLabel.js +6 -1
- package/dist/esm/types/properties/config/label/zLabel.js.map +1 -1
- package/dist/esm/types/properties/config/label/zPieLabel.d.ts +69 -0
- package/dist/esm/types/properties/config/line.d.ts +82 -0
- package/dist/esm/types/properties/config/pie.d.ts +246 -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 +164 -0
- package/dist/esm/types/properties/config/scatter.d.ts +94 -0
- package/dist/esm/types/properties/config/tooltip/tooltip.d.ts +12 -0
- package/dist/esm/types/properties/config/tooltip/tooltip.js +12 -1
- package/dist/esm/types/properties/config/tooltip/tooltip.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/markStyle/barStyle.d.ts +5 -0
- package/dist/esm/types/properties/markStyle/barStyle.js.map +1 -1
- package/dist/esm/types/properties/regressionLine/ecdfRegressionLine.d.ts +4 -0
- package/dist/esm/types/properties/regressionLine/kdeRegressionLine.d.ts +4 -0
- package/dist/esm/types/properties/regressionLine/zRegressionLine.d.ts +18 -0
- package/dist/esm/types/properties/regressionLine/zRegressionLine.js +1 -0
- package/dist/esm/types/properties/regressionLine/zRegressionLine.js.map +1 -1
- package/dist/esm/types/properties/theme/customTheme.d.ts +3352 -0
- package/dist/esm/types/zVseed.d.ts +1890 -124
- package/dist/umd/index.js +726 -349
- package/dist/umd/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasureName.js.map +0 -1
package/dist/umd/index.js
CHANGED
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
zColumnParallel: ()=>zColumnParallel,
|
|
108
108
|
zDimensions: ()=>zDimensions,
|
|
109
109
|
zLegend: ()=>zLegend,
|
|
110
|
-
LINEAR_AXIS_INNER_OFFSET_TOP: ()=>
|
|
110
|
+
LINEAR_AXIS_INNER_OFFSET_TOP: ()=>12,
|
|
111
111
|
replaceNullToUndefined: ()=>replaceNullToUndefined,
|
|
112
112
|
zHeatmap: ()=>zHeatmap,
|
|
113
113
|
FoldXMeasureId: ()=>FoldXMeasureId,
|
|
@@ -199,16 +199,18 @@
|
|
|
199
199
|
zEcdfRegressionLine: ()=>zEcdfRegressionLine,
|
|
200
200
|
zBarParallelConfig: ()=>zBarParallelConfig,
|
|
201
201
|
lineAdvancedPipeline: ()=>lineAdvancedPipeline,
|
|
202
|
+
AXIS_LABEL_SPACE: ()=>8,
|
|
202
203
|
FoldMeasureValue: ()=>FoldMeasureValue,
|
|
203
204
|
ANNOTATION_Z_INDEX: ()=>1000,
|
|
204
205
|
Q3MeasureValue: ()=>"__Q3__",
|
|
205
206
|
createFormatter: ()=>createFormatter,
|
|
206
207
|
columnPercentSpecPipeline: ()=>columnPercentSpecPipeline,
|
|
208
|
+
BAND_AXIS_INNER_OFFSET_IN_PIVOT: ()=>2,
|
|
207
209
|
isMeasureSelector: ()=>isMeasureSelector,
|
|
208
210
|
areaAdvancedPipeline: ()=>areaAdvancedPipeline,
|
|
211
|
+
zBarConfig: ()=>zBarConfig,
|
|
209
212
|
areaPercentSpecPipeline: ()=>areaPercentSpecPipeline,
|
|
210
213
|
barParallelSpecPipeline: ()=>barParallelSpecPipeline,
|
|
211
|
-
zBarConfig: ()=>zBarConfig,
|
|
212
214
|
zPie: ()=>zPie,
|
|
213
215
|
zBar: ()=>zBar,
|
|
214
216
|
pieAdvancedPipeline: ()=>pieAdvancedPipeline,
|
|
@@ -222,6 +224,7 @@
|
|
|
222
224
|
zFunnelTransform: ()=>zFunnelTransform,
|
|
223
225
|
zLinearRegressionLine: ()=>zLinearRegressionLine,
|
|
224
226
|
zRoseConfig: ()=>zRoseConfig,
|
|
227
|
+
zBodyCellStyle: ()=>zBodyCellStyle,
|
|
225
228
|
zScatterMeasures: ()=>zScatterMeasures,
|
|
226
229
|
zAnnotation: ()=>zAnnotation,
|
|
227
230
|
selector: ()=>selector_selector,
|
|
@@ -506,7 +509,7 @@
|
|
|
506
509
|
next: t
|
|
507
510
|
});
|
|
508
511
|
}
|
|
509
|
-
const preorderTraverse = (tree, callback)=>{
|
|
512
|
+
const preorderTraverse = (tree, callback, childrenKey = 'children')=>{
|
|
510
513
|
if (!tree || 0 === tree.length) return;
|
|
511
514
|
const stack = [
|
|
512
515
|
...tree
|
|
@@ -515,9 +518,8 @@
|
|
|
515
518
|
const node = stack.pop();
|
|
516
519
|
const stop = callback(node);
|
|
517
520
|
if (true === stop) return;
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
if (children && children.length > 0) for(let i = children.length - 1; i >= 0; i--){
|
|
521
|
+
const children = node[childrenKey];
|
|
522
|
+
if (Array.isArray(children) && children.length > 0) for(let i = children.length - 1; i >= 0; i--){
|
|
521
523
|
const child = children[i];
|
|
522
524
|
stack.push(child);
|
|
523
525
|
}
|
|
@@ -892,14 +894,6 @@
|
|
|
892
894
|
dimensions: newDimensions
|
|
893
895
|
};
|
|
894
896
|
};
|
|
895
|
-
const records_records = (advancedVSeed, context)=>{
|
|
896
|
-
const { vseed } = context;
|
|
897
|
-
const { dataset } = vseed;
|
|
898
|
-
return {
|
|
899
|
-
...advancedVSeed,
|
|
900
|
-
dataset
|
|
901
|
-
};
|
|
902
|
-
};
|
|
903
897
|
function chunk_2T7K3PFL_i(...e) {
|
|
904
898
|
return chunk_WIMGWYZL_u(chunk_2T7K3PFL_o, e);
|
|
905
899
|
}
|
|
@@ -908,6 +902,47 @@
|
|
|
908
902
|
for (let n of s)n in e && (r[n] = e[n]);
|
|
909
903
|
return r;
|
|
910
904
|
}
|
|
905
|
+
function chunk_BZNENX2T_r(o) {
|
|
906
|
+
if ("object" != typeof o || null === o) return !1;
|
|
907
|
+
let e = Object.getPrototypeOf(o);
|
|
908
|
+
return null === e || e === Object.prototype;
|
|
909
|
+
}
|
|
910
|
+
function chunk_3ZJAREUD_i(...e) {
|
|
911
|
+
return chunk_WIMGWYZL_u(chunk_3ZJAREUD_o, e);
|
|
912
|
+
}
|
|
913
|
+
function chunk_3ZJAREUD_o(e, r) {
|
|
914
|
+
let a = {};
|
|
915
|
+
for (let [n, u] of Object.entries(e)){
|
|
916
|
+
let l = r(u, n, e);
|
|
917
|
+
a[n] = l;
|
|
918
|
+
}
|
|
919
|
+
return a;
|
|
920
|
+
}
|
|
921
|
+
const replaceNullToUndefined = (obj)=>{
|
|
922
|
+
if (null === obj) return;
|
|
923
|
+
if (Array.isArray(obj)) return obj.map(replaceNullToUndefined);
|
|
924
|
+
if (chunk_BZNENX2T_r(obj)) return C(obj, chunk_3ZJAREUD_i((value)=>replaceNullToUndefined(value)));
|
|
925
|
+
return obj;
|
|
926
|
+
};
|
|
927
|
+
const cellStyle_cellStyle = (advancedVSeed, context)=>{
|
|
928
|
+
const { vseed } = context;
|
|
929
|
+
const pickedCellStyle = chunk_2T7K3PFL_i(vseed, [
|
|
930
|
+
'bodyCellStyle'
|
|
931
|
+
]);
|
|
932
|
+
const style = replaceNullToUndefined(pickedCellStyle);
|
|
933
|
+
return {
|
|
934
|
+
...advancedVSeed,
|
|
935
|
+
cellStyle: style
|
|
936
|
+
};
|
|
937
|
+
};
|
|
938
|
+
const records_records = (advancedVSeed, context)=>{
|
|
939
|
+
const { vseed } = context;
|
|
940
|
+
const { dataset } = vseed;
|
|
941
|
+
return {
|
|
942
|
+
...advancedVSeed,
|
|
943
|
+
dataset
|
|
944
|
+
};
|
|
945
|
+
};
|
|
911
946
|
const tableConfig_tableConfig = (advancedVSeed, context)=>{
|
|
912
947
|
const { vseed } = context;
|
|
913
948
|
const { chartType } = vseed;
|
|
@@ -935,11 +970,6 @@
|
|
|
935
970
|
};
|
|
936
971
|
return result;
|
|
937
972
|
};
|
|
938
|
-
function chunk_BZNENX2T_r(o) {
|
|
939
|
-
if ("object" != typeof o || null === o) return !1;
|
|
940
|
-
let e = Object.getPrototypeOf(o);
|
|
941
|
-
return null === e || e === Object.prototype;
|
|
942
|
-
}
|
|
943
973
|
function D(...e) {
|
|
944
974
|
return chunk_WIMGWYZL_u(chunk_PDQFB3TV_s, e);
|
|
945
975
|
}
|
|
@@ -1010,6 +1040,7 @@
|
|
|
1010
1040
|
initAdvancedVSeed,
|
|
1011
1041
|
defaultMeasures_defaultMeasures,
|
|
1012
1042
|
defaultDimensions,
|
|
1043
|
+
cellStyle_cellStyle,
|
|
1013
1044
|
records_records,
|
|
1014
1045
|
tableConfig_tableConfig,
|
|
1015
1046
|
theme_theme
|
|
@@ -1344,6 +1375,170 @@
|
|
|
1344
1375
|
};
|
|
1345
1376
|
return result;
|
|
1346
1377
|
};
|
|
1378
|
+
const isType_isType = (value, type)=>Object.prototype.toString.call(value) === `[object ${type}]`;
|
|
1379
|
+
const isType = isType_isType;
|
|
1380
|
+
const isArray_isArray = (value)=>Array.isArray ? Array.isArray(value) : isType(value, "Array");
|
|
1381
|
+
const common_isArray = isArray_isArray;
|
|
1382
|
+
const isValid = (value)=>null != value;
|
|
1383
|
+
const common_isValid = isValid;
|
|
1384
|
+
function array_array(arr) {
|
|
1385
|
+
return common_isValid(arr) ? common_isArray(arr) ? arr : [
|
|
1386
|
+
arr
|
|
1387
|
+
] : [];
|
|
1388
|
+
}
|
|
1389
|
+
function chunk_AIG3BDKO_i(...e) {
|
|
1390
|
+
return chunk_WIMGWYZL_u(chunk_AIG3BDKO_n, e);
|
|
1391
|
+
}
|
|
1392
|
+
var chunk_AIG3BDKO_n = (e, r)=>e.length >= r;
|
|
1393
|
+
function chunk_KI5X74E2_y(...t) {
|
|
1394
|
+
return chunk_WIMGWYZL_u(chunk_KI5X74E2_f, t);
|
|
1395
|
+
}
|
|
1396
|
+
function chunk_KI5X74E2_f(t, e) {
|
|
1397
|
+
if (!chunk_AIG3BDKO_i(e, 1)) return {
|
|
1398
|
+
...t
|
|
1399
|
+
};
|
|
1400
|
+
if (!chunk_AIG3BDKO_i(e, 2)) {
|
|
1401
|
+
let { [e[0]]: r, ...m } = t;
|
|
1402
|
+
return m;
|
|
1403
|
+
}
|
|
1404
|
+
let o = {
|
|
1405
|
+
...t
|
|
1406
|
+
};
|
|
1407
|
+
for (let r of e)delete o[r];
|
|
1408
|
+
return o;
|
|
1409
|
+
}
|
|
1410
|
+
const selector_selector = (vchartDatum, selector, selectorMode = 'And')=>{
|
|
1411
|
+
if (!selector) return true;
|
|
1412
|
+
const vchartKeys = Object.keys(vchartDatum).filter((k)=>k.toLocaleLowerCase().startsWith('__vchart'));
|
|
1413
|
+
const datum = chunk_KI5X74E2_y(vchartDatum, vchartKeys);
|
|
1414
|
+
const selectors = Array.isArray(selector) ? selector : [
|
|
1415
|
+
selector
|
|
1416
|
+
];
|
|
1417
|
+
return selectors['And' === selectorMode ? 'every' : 'some']((selector)=>{
|
|
1418
|
+
if (isValueSelector(selector)) {
|
|
1419
|
+
if (Object.values(datum).find((v)=>v === selector)) return true;
|
|
1420
|
+
} else if (isMeasureSelector(selector)) {
|
|
1421
|
+
const op = selector.operator || selector.op;
|
|
1422
|
+
const selectorValueArr = Array.isArray(selector.value) ? selector.value : [
|
|
1423
|
+
selector.value
|
|
1424
|
+
];
|
|
1425
|
+
switch(op){
|
|
1426
|
+
case '=':
|
|
1427
|
+
if (String(datum[selector.field]) === String(selectorValueArr[0])) return true;
|
|
1428
|
+
break;
|
|
1429
|
+
case '==':
|
|
1430
|
+
if (datum[selector.field] === selectorValueArr[0]) return true;
|
|
1431
|
+
break;
|
|
1432
|
+
case '!=':
|
|
1433
|
+
if (datum[selector.field] !== selectorValueArr[0]) return true;
|
|
1434
|
+
break;
|
|
1435
|
+
case '>':
|
|
1436
|
+
if (datum[selector.field] > selectorValueArr[0]) return true;
|
|
1437
|
+
break;
|
|
1438
|
+
case '<':
|
|
1439
|
+
if (datum[selector.field] < selectorValueArr[0]) return true;
|
|
1440
|
+
break;
|
|
1441
|
+
case '>=':
|
|
1442
|
+
if (datum[selector.field] >= selectorValueArr[0]) return true;
|
|
1443
|
+
break;
|
|
1444
|
+
case '<=':
|
|
1445
|
+
if (datum[selector.field] <= selectorValueArr[0]) return true;
|
|
1446
|
+
break;
|
|
1447
|
+
case 'between':
|
|
1448
|
+
if (Array.isArray(selector.value) && datum[selector.field] >= selectorValueArr[0] && datum[selector.field] <= selectorValueArr[1]) return true;
|
|
1449
|
+
break;
|
|
1450
|
+
}
|
|
1451
|
+
} else if (isDimensionSelector(selector)) {
|
|
1452
|
+
const op = selector.operator || selector.op;
|
|
1453
|
+
const selectorValueArr = Array.isArray(selector.value) ? selector.value : [
|
|
1454
|
+
selector.value
|
|
1455
|
+
];
|
|
1456
|
+
switch(op){
|
|
1457
|
+
case 'in':
|
|
1458
|
+
if (selectorValueArr.includes(datum[selector.field])) return true;
|
|
1459
|
+
break;
|
|
1460
|
+
case 'not in':
|
|
1461
|
+
if (!selectorValueArr.includes(datum[selector.field])) return true;
|
|
1462
|
+
break;
|
|
1463
|
+
}
|
|
1464
|
+
} else if (isPartialDatumSelector(selector)) {
|
|
1465
|
+
if (Object.keys(selector).every((key)=>datum[key] === selector[key])) return true;
|
|
1466
|
+
}
|
|
1467
|
+
return false;
|
|
1468
|
+
});
|
|
1469
|
+
};
|
|
1470
|
+
const isValueSelector = (selector)=>'string' == typeof selector || 'number' == typeof selector;
|
|
1471
|
+
const isPartialDatumSelector = (selector)=>'object' == typeof selector && null !== selector;
|
|
1472
|
+
const isMeasureSelector = (selector)=>'object' == typeof selector && null !== selector && 'field' in selector && ('operator' in selector || 'op' in selector) && 'value' in selector && ([
|
|
1473
|
+
'=',
|
|
1474
|
+
'==',
|
|
1475
|
+
'!=',
|
|
1476
|
+
'>',
|
|
1477
|
+
'<',
|
|
1478
|
+
'>=',
|
|
1479
|
+
'<=',
|
|
1480
|
+
'between'
|
|
1481
|
+
].includes(selector.operator) || [
|
|
1482
|
+
'=',
|
|
1483
|
+
'==',
|
|
1484
|
+
'!=',
|
|
1485
|
+
'>',
|
|
1486
|
+
'<',
|
|
1487
|
+
'>=',
|
|
1488
|
+
'<=',
|
|
1489
|
+
'between'
|
|
1490
|
+
].includes(selector.op));
|
|
1491
|
+
const isDimensionSelector = (selector)=>'object' == typeof selector && null !== selector && 'field' in selector && ('operator' in selector || 'op' in selector) && 'value' in selector && ([
|
|
1492
|
+
'in',
|
|
1493
|
+
'not in'
|
|
1494
|
+
].includes(selector.operator) || [
|
|
1495
|
+
'in',
|
|
1496
|
+
'not in'
|
|
1497
|
+
].includes(selector.op));
|
|
1498
|
+
const tableStyleMap = {
|
|
1499
|
+
backgroundColor: 'bgColor',
|
|
1500
|
+
textColor: 'color',
|
|
1501
|
+
textFontSize: 'fontSize',
|
|
1502
|
+
borderColor: 'borderColor',
|
|
1503
|
+
borderLineWidth: 'borderLineWidth'
|
|
1504
|
+
};
|
|
1505
|
+
const pickBodyCellStyle = (bodyCellStyle)=>Object.keys(tableStyleMap).reduce((acc, key)=>{
|
|
1506
|
+
if (key in bodyCellStyle) acc[tableStyleMap[key]] = bodyCellStyle[key];
|
|
1507
|
+
return acc;
|
|
1508
|
+
}, {});
|
|
1509
|
+
const tableBodyCell = (spec, context)=>{
|
|
1510
|
+
const { advancedVSeed } = context;
|
|
1511
|
+
const { cellStyle } = advancedVSeed;
|
|
1512
|
+
const bodyCellStyle = cellStyle?.bodyCellStyle;
|
|
1513
|
+
if (!bodyCellStyle) return spec;
|
|
1514
|
+
const bodyCellStyleList = array_array(bodyCellStyle);
|
|
1515
|
+
const columns = spec.columns || [];
|
|
1516
|
+
const setStyleOfColumn = (col)=>{
|
|
1517
|
+
const field = col.field;
|
|
1518
|
+
const matchedStyles = bodyCellStyleList.filter((style)=>{
|
|
1519
|
+
if (chunk_JK3VNB42_n(style.selector)) return true;
|
|
1520
|
+
const selectors = array_array(style.selector);
|
|
1521
|
+
return selectors.some((selector)=>chunk_BZNENX2T_r(selector) ? chunk_JK3VNB42_n(selector.field) || selector.field === field : chunk_6GTAPB47_e(selector) || chunk_SFZGYJFI_t(selector));
|
|
1522
|
+
});
|
|
1523
|
+
if (!matchedStyles.length) return false;
|
|
1524
|
+
col.style = (datum)=>{
|
|
1525
|
+
const originalDatum = {
|
|
1526
|
+
[field]: datum.dataValue
|
|
1527
|
+
};
|
|
1528
|
+
const mergedStyle = matchedStyles.reduce((result, style)=>{
|
|
1529
|
+
if (selector_selector(originalDatum, style.selector)) return {
|
|
1530
|
+
...result,
|
|
1531
|
+
...pickBodyCellStyle(style)
|
|
1532
|
+
};
|
|
1533
|
+
return result;
|
|
1534
|
+
}, {});
|
|
1535
|
+
return mergedStyle;
|
|
1536
|
+
};
|
|
1537
|
+
return false;
|
|
1538
|
+
};
|
|
1539
|
+
preorderTraverse(columns, setStyleOfColumn, 'columns');
|
|
1540
|
+
return spec;
|
|
1541
|
+
};
|
|
1347
1542
|
const tableSpecPipeline = [
|
|
1348
1543
|
initTable,
|
|
1349
1544
|
dimensionTreeToColumns,
|
|
@@ -1351,7 +1546,8 @@
|
|
|
1351
1546
|
bodyStyle,
|
|
1352
1547
|
headerStyle,
|
|
1353
1548
|
frameStyle,
|
|
1354
|
-
selectionStyle
|
|
1549
|
+
selectionStyle,
|
|
1550
|
+
tableBodyCell
|
|
1355
1551
|
];
|
|
1356
1552
|
const registerTable = ()=>{
|
|
1357
1553
|
Builder._advancedPipelineMap.table = tableAdvancedPipeline;
|
|
@@ -1383,13 +1579,13 @@
|
|
|
1383
1579
|
const BinEndMeasureId = '__BinEnd__';
|
|
1384
1580
|
const BinCountMeasureId = '__BinCount__';
|
|
1385
1581
|
const BinPercentageMeasureId = '__BinPercentage__';
|
|
1386
|
-
const
|
|
1582
|
+
const defaultMeasureId = (advancedVSeed)=>{
|
|
1387
1583
|
const result = {
|
|
1388
1584
|
...advancedVSeed
|
|
1389
1585
|
};
|
|
1390
1586
|
const measures = findAllMeasures(advancedVSeed.measures);
|
|
1391
1587
|
if (measures.length > 1 && !result.dimensions?.some((dim)=>dim.id === MeasureName)) result.dimensions?.push({
|
|
1392
|
-
id:
|
|
1588
|
+
id: MeasureId,
|
|
1393
1589
|
alias: intl.i18n`指标名称`,
|
|
1394
1590
|
encoding: 'row'
|
|
1395
1591
|
});
|
|
@@ -1441,27 +1637,6 @@
|
|
|
1441
1637
|
encoding.tooltip = measures.map((item)=>item.id);
|
|
1442
1638
|
encoding.detail = chunk_QJLMYOTX_i(measures.filter((item)=>'detail' === item.encoding || !item.encoding).map((item)=>item.id));
|
|
1443
1639
|
};
|
|
1444
|
-
function chunk_AIG3BDKO_i(...e) {
|
|
1445
|
-
return chunk_WIMGWYZL_u(chunk_AIG3BDKO_n, e);
|
|
1446
|
-
}
|
|
1447
|
-
var chunk_AIG3BDKO_n = (e, r)=>e.length >= r;
|
|
1448
|
-
function chunk_KI5X74E2_y(...t) {
|
|
1449
|
-
return chunk_WIMGWYZL_u(chunk_KI5X74E2_f, t);
|
|
1450
|
-
}
|
|
1451
|
-
function chunk_KI5X74E2_f(t, e) {
|
|
1452
|
-
if (!chunk_AIG3BDKO_i(e, 1)) return {
|
|
1453
|
-
...t
|
|
1454
|
-
};
|
|
1455
|
-
if (!chunk_AIG3BDKO_i(e, 2)) {
|
|
1456
|
-
let { [e[0]]: r, ...m } = t;
|
|
1457
|
-
return m;
|
|
1458
|
-
}
|
|
1459
|
-
let o = {
|
|
1460
|
-
...t
|
|
1461
|
-
};
|
|
1462
|
-
for (let r of e)delete o[r];
|
|
1463
|
-
return o;
|
|
1464
|
-
}
|
|
1465
1640
|
const foldMeasures = (dataset, measures, options)=>{
|
|
1466
1641
|
const { measureId, measureName, measureValue, colorMeasureId, allowEmptyFold = true, omitIds = [] } = options || {};
|
|
1467
1642
|
const foldInfo = {
|
|
@@ -1579,7 +1754,8 @@
|
|
|
1579
1754
|
initAdvancedVSeed,
|
|
1580
1755
|
defaultMeasures_defaultMeasures,
|
|
1581
1756
|
defaultDimensions,
|
|
1582
|
-
|
|
1757
|
+
defaultMeasureId,
|
|
1758
|
+
cellStyle_cellStyle,
|
|
1583
1759
|
encodingForPivotTable,
|
|
1584
1760
|
reshapePivotTable,
|
|
1585
1761
|
pivotTableConfig,
|
|
@@ -1644,15 +1820,23 @@
|
|
|
1644
1820
|
const pivotRows = (spec, context)=>{
|
|
1645
1821
|
const { advancedVSeed } = context;
|
|
1646
1822
|
const dimensions = advancedVSeed.dimensions;
|
|
1647
|
-
const { encoding } = advancedVSeed;
|
|
1823
|
+
const { encoding, measures } = advancedVSeed;
|
|
1648
1824
|
const rows = dimensions.filter((item)=>encoding.row?.includes(item.id));
|
|
1825
|
+
const allMeasures = findAllMeasures(measures);
|
|
1649
1826
|
return {
|
|
1650
1827
|
...spec,
|
|
1651
|
-
rows: rows.map((item)=>
|
|
1828
|
+
rows: rows.map((item)=>{
|
|
1829
|
+
const res = {
|
|
1652
1830
|
dimensionKey: item.id,
|
|
1653
1831
|
title: item.alias || item.id,
|
|
1654
1832
|
width: 'auto'
|
|
1655
|
-
}
|
|
1833
|
+
};
|
|
1834
|
+
if (item.id === MeasureId) res.headerFormat = (measureId)=>{
|
|
1835
|
+
const measure = allMeasures.find((m)=>m.id === measureId);
|
|
1836
|
+
return measure?.alias ?? measureId;
|
|
1837
|
+
};
|
|
1838
|
+
return res;
|
|
1839
|
+
})
|
|
1656
1840
|
};
|
|
1657
1841
|
};
|
|
1658
1842
|
const titleOnDimension = (spec)=>{
|
|
@@ -1795,6 +1979,47 @@
|
|
|
1795
1979
|
};
|
|
1796
1980
|
return result;
|
|
1797
1981
|
};
|
|
1982
|
+
const pivotTableBodyCell = (spec, context)=>{
|
|
1983
|
+
const { advancedVSeed } = context;
|
|
1984
|
+
const { cellStyle } = advancedVSeed;
|
|
1985
|
+
const bodyCellStyle = cellStyle?.bodyCellStyle;
|
|
1986
|
+
if (!bodyCellStyle) return spec;
|
|
1987
|
+
const bodyCellStyleList = array_array(bodyCellStyle);
|
|
1988
|
+
const indicators = spec.indicators || [];
|
|
1989
|
+
const newIndicators = indicators.map((ind)=>{
|
|
1990
|
+
const newInd = chunk_SFZGYJFI_t(ind) ? {
|
|
1991
|
+
indicatorKey: ind
|
|
1992
|
+
} : ind;
|
|
1993
|
+
const { indicatorKey } = newInd;
|
|
1994
|
+
newInd.style = (datum)=>{
|
|
1995
|
+
const { dataValue, cellHeaderPaths } = datum;
|
|
1996
|
+
const headerPaths = [
|
|
1997
|
+
...cellHeaderPaths.colHeaderPaths,
|
|
1998
|
+
...cellHeaderPaths.rowHeaderPaths
|
|
1999
|
+
];
|
|
2000
|
+
const originalDatum = {
|
|
2001
|
+
[indicatorKey]: dataValue
|
|
2002
|
+
};
|
|
2003
|
+
headerPaths.forEach((path)=>{
|
|
2004
|
+
if (path.dimensionKey) originalDatum[path.dimensionKey] = path.value;
|
|
2005
|
+
});
|
|
2006
|
+
if (!chunk_JK3VNB42_n(originalDatum[MeasureId]) && !chunk_JK3VNB42_n(originalDatum[FoldMeasureValue])) originalDatum[originalDatum[MeasureId]] = originalDatum[FoldMeasureValue];
|
|
2007
|
+
const mergedStyle = bodyCellStyleList.reduce((result, style)=>{
|
|
2008
|
+
if (selector_selector(originalDatum, style.selector)) return {
|
|
2009
|
+
...result,
|
|
2010
|
+
...pickBodyCellStyle(style)
|
|
2011
|
+
};
|
|
2012
|
+
return result;
|
|
2013
|
+
}, {});
|
|
2014
|
+
return mergedStyle;
|
|
2015
|
+
};
|
|
2016
|
+
return newInd;
|
|
2017
|
+
});
|
|
2018
|
+
return {
|
|
2019
|
+
...spec,
|
|
2020
|
+
indicators: newIndicators
|
|
2021
|
+
};
|
|
2022
|
+
};
|
|
1798
2023
|
const dataConfig = (spec, context)=>{
|
|
1799
2024
|
const { advancedVSeed } = context;
|
|
1800
2025
|
const measures = findAllMeasures(advancedVSeed.measures);
|
|
@@ -1822,7 +2047,8 @@
|
|
|
1822
2047
|
cornerHeaderStyle,
|
|
1823
2048
|
frameStyle,
|
|
1824
2049
|
selectionStyle,
|
|
1825
|
-
dataConfig
|
|
2050
|
+
dataConfig,
|
|
2051
|
+
pivotTableBodyCell
|
|
1826
2052
|
];
|
|
1827
2053
|
const registerPivotTable = ()=>{
|
|
1828
2054
|
Builder._advancedPipelineMap.pivotTable = pivotTableAdvancedPipeline;
|
|
@@ -1902,7 +2128,7 @@
|
|
|
1902
2128
|
dimensions: newDimensions
|
|
1903
2129
|
};
|
|
1904
2130
|
};
|
|
1905
|
-
const
|
|
2131
|
+
const defaultMeasureId_defaultMeasureId = (advancedVSeed)=>{
|
|
1906
2132
|
const result = {
|
|
1907
2133
|
...advancedVSeed
|
|
1908
2134
|
};
|
|
@@ -2376,23 +2602,6 @@
|
|
|
2376
2602
|
result.analysis.orderMapping[colorId] = orderRes;
|
|
2377
2603
|
return result;
|
|
2378
2604
|
};
|
|
2379
|
-
function chunk_3ZJAREUD_i(...e) {
|
|
2380
|
-
return chunk_WIMGWYZL_u(chunk_3ZJAREUD_o, e);
|
|
2381
|
-
}
|
|
2382
|
-
function chunk_3ZJAREUD_o(e, r) {
|
|
2383
|
-
let a = {};
|
|
2384
|
-
for (let [n, u] of Object.entries(e)){
|
|
2385
|
-
let l = r(u, n, e);
|
|
2386
|
-
a[n] = l;
|
|
2387
|
-
}
|
|
2388
|
-
return a;
|
|
2389
|
-
}
|
|
2390
|
-
const replaceNullToUndefined = (obj)=>{
|
|
2391
|
-
if (null === obj) return;
|
|
2392
|
-
if (Array.isArray(obj)) return obj.map(replaceNullToUndefined);
|
|
2393
|
-
if (chunk_BZNENX2T_r(obj)) return C(obj, chunk_3ZJAREUD_i((value)=>replaceNullToUndefined(value)));
|
|
2394
|
-
return obj;
|
|
2395
|
-
};
|
|
2396
2605
|
const line_lineConfig = (advancedVSeed, context)=>{
|
|
2397
2606
|
const { vseed } = context;
|
|
2398
2607
|
const { chartType } = vseed;
|
|
@@ -2449,7 +2658,7 @@
|
|
|
2449
2658
|
initAdvancedVSeed_initAdvancedVSeed,
|
|
2450
2659
|
default_defaultMeasures_defaultMeasures,
|
|
2451
2660
|
defaultDimensions_defaultDimensions,
|
|
2452
|
-
|
|
2661
|
+
defaultMeasureId_defaultMeasureId,
|
|
2453
2662
|
encodingAdapter([
|
|
2454
2663
|
defaultEncodingForLine,
|
|
2455
2664
|
buildMeasures
|
|
@@ -2771,6 +2980,7 @@
|
|
|
2771
2980
|
max,
|
|
2772
2981
|
min,
|
|
2773
2982
|
label: {
|
|
2983
|
+
space: 8,
|
|
2774
2984
|
visible: label?.visible,
|
|
2775
2985
|
formatMethod: (value)=>{
|
|
2776
2986
|
if (isBarPercent(vseed) || isColumnPercent(vseed) || isAreaPercent(vseed)) return createLinearPercentFormat(value, autoFormat, numFormat, formatter, percentFormatter);
|
|
@@ -2816,7 +3026,7 @@
|
|
|
2816
3026
|
}
|
|
2817
3027
|
},
|
|
2818
3028
|
innerOffset: {
|
|
2819
|
-
top:
|
|
3029
|
+
top: 12
|
|
2820
3030
|
}
|
|
2821
3031
|
};
|
|
2822
3032
|
result.axes = [
|
|
@@ -2956,7 +3166,7 @@
|
|
|
2956
3166
|
}
|
|
2957
3167
|
},
|
|
2958
3168
|
label: {
|
|
2959
|
-
formatMethod: (value)=>unfoldInfo.colorIdMap[String(value)]
|
|
3169
|
+
formatMethod: (value)=>unfoldInfo.colorIdMap[String(value)]?.alias ?? value,
|
|
2960
3170
|
style: {
|
|
2961
3171
|
fontSize: labelFontSize,
|
|
2962
3172
|
fill: labelColor || labelFontColor,
|
|
@@ -3066,95 +3276,6 @@
|
|
|
3066
3276
|
}
|
|
3067
3277
|
return result;
|
|
3068
3278
|
};
|
|
3069
|
-
const selector_selector = (vchartDatum, selector)=>{
|
|
3070
|
-
if (!selector) return true;
|
|
3071
|
-
const selectorMode = 'And';
|
|
3072
|
-
const vchartKeys = Object.keys(vchartDatum).filter((k)=>k.toLocaleLowerCase().startsWith('__vchart'));
|
|
3073
|
-
const datum = chunk_KI5X74E2_y(vchartDatum, vchartKeys);
|
|
3074
|
-
const selectors = Array.isArray(selector) ? selector : [
|
|
3075
|
-
selector
|
|
3076
|
-
];
|
|
3077
|
-
return selectors['And' === selectorMode ? 'every' : 'some']((selector)=>{
|
|
3078
|
-
if (isValueSelector(selector)) {
|
|
3079
|
-
if (Object.values(datum).find((v)=>v === selector)) return true;
|
|
3080
|
-
} else if (isMeasureSelector(selector)) {
|
|
3081
|
-
const op = selector.operator || selector.op;
|
|
3082
|
-
const selectorValueArr = Array.isArray(selector.value) ? selector.value : [
|
|
3083
|
-
selector.value
|
|
3084
|
-
];
|
|
3085
|
-
switch(op){
|
|
3086
|
-
case '=':
|
|
3087
|
-
if (String(datum[selector.field]) === String(selectorValueArr[0])) return true;
|
|
3088
|
-
break;
|
|
3089
|
-
case '==':
|
|
3090
|
-
if (datum[selector.field] === selectorValueArr[0]) return true;
|
|
3091
|
-
break;
|
|
3092
|
-
case '!=':
|
|
3093
|
-
if (datum[selector.field] !== selectorValueArr[0]) return true;
|
|
3094
|
-
break;
|
|
3095
|
-
case '>':
|
|
3096
|
-
if (datum[selector.field] > selectorValueArr[0]) return true;
|
|
3097
|
-
break;
|
|
3098
|
-
case '<':
|
|
3099
|
-
if (datum[selector.field] < selectorValueArr[0]) return true;
|
|
3100
|
-
break;
|
|
3101
|
-
case '>=':
|
|
3102
|
-
if (datum[selector.field] >= selectorValueArr[0]) return true;
|
|
3103
|
-
break;
|
|
3104
|
-
case '<=':
|
|
3105
|
-
if (datum[selector.field] <= selectorValueArr[0]) return true;
|
|
3106
|
-
break;
|
|
3107
|
-
case 'between':
|
|
3108
|
-
if (Array.isArray(selector.value) && datum[selector.field] >= selectorValueArr[0] && datum[selector.field] <= selectorValueArr[1]) return true;
|
|
3109
|
-
break;
|
|
3110
|
-
}
|
|
3111
|
-
} else if (isDimensionSelector(selector)) {
|
|
3112
|
-
const op = selector.operator || selector.op;
|
|
3113
|
-
const selectorValueArr = Array.isArray(selector.value) ? selector.value : [
|
|
3114
|
-
selector.value
|
|
3115
|
-
];
|
|
3116
|
-
switch(op){
|
|
3117
|
-
case 'in':
|
|
3118
|
-
if (selectorValueArr.includes(datum[selector.field])) return true;
|
|
3119
|
-
break;
|
|
3120
|
-
case 'not in':
|
|
3121
|
-
if (!selectorValueArr.includes(datum[selector.field])) return true;
|
|
3122
|
-
break;
|
|
3123
|
-
}
|
|
3124
|
-
} else if (isPartialDatumSelector(selector)) {
|
|
3125
|
-
if (Object.keys(selector).every((key)=>datum[key] === selector[key])) return true;
|
|
3126
|
-
}
|
|
3127
|
-
return false;
|
|
3128
|
-
});
|
|
3129
|
-
};
|
|
3130
|
-
const isValueSelector = (selector)=>'string' == typeof selector || 'number' == typeof selector;
|
|
3131
|
-
const isPartialDatumSelector = (selector)=>'object' == typeof selector && null !== selector;
|
|
3132
|
-
const isMeasureSelector = (selector)=>'object' == typeof selector && null !== selector && 'field' in selector && ('operator' in selector || 'op' in selector) && 'value' in selector && ([
|
|
3133
|
-
'=',
|
|
3134
|
-
'==',
|
|
3135
|
-
'!=',
|
|
3136
|
-
'>',
|
|
3137
|
-
'<',
|
|
3138
|
-
'>=',
|
|
3139
|
-
'<=',
|
|
3140
|
-
'between'
|
|
3141
|
-
].includes(selector.operator) || [
|
|
3142
|
-
'=',
|
|
3143
|
-
'==',
|
|
3144
|
-
'!=',
|
|
3145
|
-
'>',
|
|
3146
|
-
'<',
|
|
3147
|
-
'>=',
|
|
3148
|
-
'<=',
|
|
3149
|
-
'between'
|
|
3150
|
-
].includes(selector.op));
|
|
3151
|
-
const isDimensionSelector = (selector)=>'object' == typeof selector && null !== selector && 'field' in selector && ('operator' in selector || 'op' in selector) && 'value' in selector && ([
|
|
3152
|
-
'in',
|
|
3153
|
-
'not in'
|
|
3154
|
-
].includes(selector.operator) || [
|
|
3155
|
-
'in',
|
|
3156
|
-
'not in'
|
|
3157
|
-
].includes(selector.op));
|
|
3158
3279
|
const pointStyle_pointStyle = (spec, context)=>{
|
|
3159
3280
|
const { advancedVSeed } = context;
|
|
3160
3281
|
const { markStyle } = advancedVSeed;
|
|
@@ -3388,7 +3509,7 @@
|
|
|
3388
3509
|
const percentFormatter = createFormatter(percentFormat);
|
|
3389
3510
|
const result = {
|
|
3390
3511
|
visible: enable,
|
|
3391
|
-
dataFilter: (data)=>data.filter((entry)=>entry.data?.[DATUM_HIDE_KEY] !== true),
|
|
3512
|
+
dataFilter: (data)=>data.filter((entry)=>entry.data?.[DATUM_HIDE_KEY] !== true && selector_selector(entry.data, label.selector, 'Or')),
|
|
3392
3513
|
formatMethod: (_, datum)=>{
|
|
3393
3514
|
const result = [];
|
|
3394
3515
|
const dimLabels = labelDims.map((item)=>{
|
|
@@ -3427,6 +3548,34 @@
|
|
|
3427
3548
|
};
|
|
3428
3549
|
return result;
|
|
3429
3550
|
};
|
|
3551
|
+
const getTooltipStyle = (tooltipConfig)=>({
|
|
3552
|
+
panel: {
|
|
3553
|
+
padding: tooltipConfig.padding,
|
|
3554
|
+
border: {
|
|
3555
|
+
radius: tooltipConfig.borderRadius,
|
|
3556
|
+
width: tooltipConfig.borderWidth,
|
|
3557
|
+
color: tooltipConfig.borderColor
|
|
3558
|
+
},
|
|
3559
|
+
backgroundColor: tooltipConfig.backgroundColor
|
|
3560
|
+
},
|
|
3561
|
+
keyLabel: {
|
|
3562
|
+
lineHeight: tooltipConfig.lineHeight,
|
|
3563
|
+
fontSize: tooltipConfig.fontSize,
|
|
3564
|
+
fontColor: tooltipConfig.keyColor
|
|
3565
|
+
},
|
|
3566
|
+
valueLabel: {
|
|
3567
|
+
lineHeight: tooltipConfig.lineHeight,
|
|
3568
|
+
fontSize: tooltipConfig.fontSize,
|
|
3569
|
+
fontColor: tooltipConfig.valueColor,
|
|
3570
|
+
fontWeight: 'medium'
|
|
3571
|
+
},
|
|
3572
|
+
titleLabel: {
|
|
3573
|
+
fontSize: tooltipConfig.fontSize,
|
|
3574
|
+
lineHeight: tooltipConfig.lineHeight,
|
|
3575
|
+
fontColor: tooltipConfig.titleColor,
|
|
3576
|
+
fontWeight: 'bold'
|
|
3577
|
+
}
|
|
3578
|
+
});
|
|
3430
3579
|
const tooltip_tooltip = (spec, context)=>{
|
|
3431
3580
|
const result = {
|
|
3432
3581
|
...spec
|
|
@@ -3437,10 +3586,11 @@
|
|
|
3437
3586
|
const { tooltip = {
|
|
3438
3587
|
enable: true
|
|
3439
3588
|
} } = baseConfig;
|
|
3440
|
-
const { enable } = tooltip;
|
|
3589
|
+
const { enable = true } = tooltip;
|
|
3441
3590
|
const { foldInfo, unfoldInfo } = datasetReshapeInfo[0];
|
|
3442
3591
|
result.tooltip = {
|
|
3443
|
-
|
|
3592
|
+
style: getTooltipStyle(tooltip),
|
|
3593
|
+
visible: !!enable,
|
|
3444
3594
|
mark: {
|
|
3445
3595
|
title: {
|
|
3446
3596
|
visible: false
|
|
@@ -3585,6 +3735,7 @@
|
|
|
3585
3735
|
text: {
|
|
3586
3736
|
text: text,
|
|
3587
3737
|
style: {
|
|
3738
|
+
opacity: 0.95,
|
|
3588
3739
|
visible: true,
|
|
3589
3740
|
textAlign: textAlign,
|
|
3590
3741
|
textBaseline: textBaseline,
|
|
@@ -3600,6 +3751,7 @@
|
|
|
3600
3751
|
visible: textBackgroundVisible,
|
|
3601
3752
|
padding: textBackgroundPadding,
|
|
3602
3753
|
style: {
|
|
3754
|
+
opacity: 0.95,
|
|
3603
3755
|
cornerRadius: textBackgroundBorderRadius ?? 4,
|
|
3604
3756
|
fill: textBackgroundColor,
|
|
3605
3757
|
stroke: textBackgroundBorderColor,
|
|
@@ -3642,7 +3794,23 @@
|
|
|
3642
3794
|
const { selector: selectorPoint, xValue, text = '', textPosition = 'insideEnd', textColor = theme?.textColor ?? '#ffffff', textFontSize = theme?.textFontSize ?? 12, textFontWeight = theme?.textFontWeight ?? 400, textAlign = 'center', textBaseline = 'top', lineColor = theme?.lineColor ?? '#212121', lineStyle = theme?.lineStyle ?? 'dashed', lineVisible = theme?.lineStyle ?? true, lineWidth = theme?.lineWidth ?? 1, textBackgroundVisible = theme?.textBackgroundVisible ?? true, textBackgroundColor = theme?.textBackgroundColor ?? '#212121', textBackgroundBorderColor = theme?.textBackgroundBorderColor ?? '#212121', textBackgroundBorderRadius = theme?.textBackgroundBorderRadius ?? 4, textBackgroundBorderWidth = theme?.textBackgroundBorderWidth ?? 1, textBackgroundPadding = theme?.textBackgroundPadding ?? 2 } = annotationVerticalLine;
|
|
3643
3795
|
const dataset = advancedVSeed.dataset.flat();
|
|
3644
3796
|
const generateOneMarkLine = (x)=>({
|
|
3645
|
-
|
|
3797
|
+
positions: (datum, series)=>{
|
|
3798
|
+
const regionStart = series.getRegion()?.getLayoutStartPoint();
|
|
3799
|
+
const xAxisHelper = series.getXAxisHelper();
|
|
3800
|
+
const yAxisHelper = series.getYAxisHelper();
|
|
3801
|
+
const xPos = xAxisHelper.getScale(0).scale(x) + regionStart.x;
|
|
3802
|
+
const yRange = yAxisHelper.getScale(0).range();
|
|
3803
|
+
return [
|
|
3804
|
+
{
|
|
3805
|
+
x: xPos,
|
|
3806
|
+
y: yRange ? yRange[0] + regionStart.y : 0
|
|
3807
|
+
},
|
|
3808
|
+
{
|
|
3809
|
+
x: xPos,
|
|
3810
|
+
y: yRange ? yRange[1] + regionStart.y : 0
|
|
3811
|
+
}
|
|
3812
|
+
];
|
|
3813
|
+
},
|
|
3646
3814
|
zIndex: 1000,
|
|
3647
3815
|
line: {
|
|
3648
3816
|
style: {
|
|
@@ -3662,9 +3830,11 @@
|
|
|
3662
3830
|
}
|
|
3663
3831
|
},
|
|
3664
3832
|
label: {
|
|
3833
|
+
confine: true,
|
|
3665
3834
|
text: text,
|
|
3666
3835
|
position: positionMap[textPosition || 'insideEnd'],
|
|
3667
3836
|
style: {
|
|
3837
|
+
opacity: 0.95,
|
|
3668
3838
|
dx: 5,
|
|
3669
3839
|
visible: true,
|
|
3670
3840
|
stroke: textBackgroundColor,
|
|
@@ -3679,6 +3849,7 @@
|
|
|
3679
3849
|
visible: textBackgroundVisible,
|
|
3680
3850
|
padding: textBackgroundPadding,
|
|
3681
3851
|
style: {
|
|
3852
|
+
opacity: 0.95,
|
|
3682
3853
|
dx: 5,
|
|
3683
3854
|
cornerRadius: textBackgroundBorderRadius,
|
|
3684
3855
|
fill: textBackgroundColor,
|
|
@@ -3752,7 +3923,23 @@
|
|
|
3752
3923
|
const { selector: selectorPoint, yValue, text = '', textPosition = 'insideEnd', textColor = theme?.textColor ?? '#ffffff', textFontSize = theme?.textFontSize ?? 12, textFontWeight = theme?.textFontWeight ?? 400, textAlign = 'right', textBaseline = 'bottom', lineColor = theme?.lineColor ?? '#212121', lineStyle = theme?.lineStyle ?? 'dashed', lineVisible = theme?.lineStyle ?? true, lineWidth = theme?.lineWidth ?? 1, textBackgroundVisible = theme?.textBackgroundVisible ?? true, textBackgroundColor = theme?.textBackgroundColor ?? '#212121', textBackgroundBorderColor = theme?.textBackgroundBorderColor ?? '#212121', textBackgroundBorderRadius = theme?.textBackgroundBorderRadius ?? 4, textBackgroundBorderWidth = theme?.textBackgroundBorderWidth ?? 1, textBackgroundPadding = theme?.textBackgroundPadding ?? 2 } = annotationHorizontalLine;
|
|
3753
3924
|
const dataset = advancedVSeed.dataset.flat();
|
|
3754
3925
|
const generateOneMarkLine = (y)=>({
|
|
3755
|
-
|
|
3926
|
+
positions: (datum, series)=>{
|
|
3927
|
+
const regionStart = series.getRegion()?.getLayoutStartPoint();
|
|
3928
|
+
const xAxisHelper = series.getXAxisHelper();
|
|
3929
|
+
const yAxisHelper = series.getYAxisHelper();
|
|
3930
|
+
const yPos = yAxisHelper.getScale(0).scale(y) + regionStart.y;
|
|
3931
|
+
const xRange = xAxisHelper.getScale(0).range();
|
|
3932
|
+
return [
|
|
3933
|
+
{
|
|
3934
|
+
x: xRange ? xRange[0] + regionStart.x : 0,
|
|
3935
|
+
y: yPos
|
|
3936
|
+
},
|
|
3937
|
+
{
|
|
3938
|
+
x: xRange ? xRange[1] + regionStart.x : 0,
|
|
3939
|
+
y: yPos
|
|
3940
|
+
}
|
|
3941
|
+
];
|
|
3942
|
+
},
|
|
3756
3943
|
zIndex: 1000,
|
|
3757
3944
|
line: {
|
|
3758
3945
|
style: {
|
|
@@ -3771,9 +3958,11 @@
|
|
|
3771
3958
|
}
|
|
3772
3959
|
},
|
|
3773
3960
|
label: {
|
|
3961
|
+
confine: true,
|
|
3774
3962
|
text: text,
|
|
3775
3963
|
position: positionMap[textPosition || 'insideEnd'],
|
|
3776
3964
|
style: {
|
|
3965
|
+
opacity: 0.95,
|
|
3777
3966
|
visible: true,
|
|
3778
3967
|
dy: 4,
|
|
3779
3968
|
stroke: textBackgroundColor,
|
|
@@ -3788,6 +3977,7 @@
|
|
|
3788
3977
|
visible: textBackgroundVisible,
|
|
3789
3978
|
padding: textBackgroundPadding,
|
|
3790
3979
|
style: {
|
|
3980
|
+
opacity: 0.95,
|
|
3791
3981
|
dy: 4,
|
|
3792
3982
|
cornerRadius: textBackgroundBorderRadius,
|
|
3793
3983
|
fill: textBackgroundColor,
|
|
@@ -3800,9 +3990,9 @@
|
|
|
3800
3990
|
startSymbol: {
|
|
3801
3991
|
visible: theme?.startSymbolVisible ?? true,
|
|
3802
3992
|
symbolType: theme?.startSymbolType ?? 'triangleDown',
|
|
3803
|
-
size: 5,
|
|
3993
|
+
size: 5 + (lineWidth || 1),
|
|
3804
3994
|
style: {
|
|
3805
|
-
dx:
|
|
3995
|
+
dx: 3,
|
|
3806
3996
|
fill: lineColor
|
|
3807
3997
|
}
|
|
3808
3998
|
},
|
|
@@ -3929,6 +4119,7 @@
|
|
|
3929
4119
|
visible: true,
|
|
3930
4120
|
text: text,
|
|
3931
4121
|
style: {
|
|
4122
|
+
opacity: 0.95,
|
|
3932
4123
|
dy: isBottom ? 2 * -(textFontSize || 12) : 0,
|
|
3933
4124
|
textAlign: textAlign,
|
|
3934
4125
|
textBaseline: textBaseline,
|
|
@@ -3942,6 +4133,7 @@
|
|
|
3942
4133
|
visible: textBackgroundVisible,
|
|
3943
4134
|
padding: textBackgroundPadding,
|
|
3944
4135
|
style: {
|
|
4136
|
+
opacity: 0.95,
|
|
3945
4137
|
dy: isBottom ? 2 * -(textFontSize || 12) : 0,
|
|
3946
4138
|
cornerRadius: textBackgroundBorderRadius ?? 4,
|
|
3947
4139
|
fill: textBackgroundColor,
|
|
@@ -3969,17 +4161,6 @@
|
|
|
3969
4161
|
markArea: markArea
|
|
3970
4162
|
};
|
|
3971
4163
|
};
|
|
3972
|
-
const isType_isType = (value, type)=>Object.prototype.toString.call(value) === `[object ${type}]`;
|
|
3973
|
-
const isType = isType_isType;
|
|
3974
|
-
const isArray_isArray = (value)=>Array.isArray ? Array.isArray(value) : isType(value, "Array");
|
|
3975
|
-
const common_isArray = isArray_isArray;
|
|
3976
|
-
const isValid = (value)=>null != value;
|
|
3977
|
-
const common_isValid = isValid;
|
|
3978
|
-
function array_array(arr) {
|
|
3979
|
-
return common_isValid(arr) ? common_isArray(arr) ? arr : [
|
|
3980
|
-
arr
|
|
3981
|
-
] : [];
|
|
3982
|
-
}
|
|
3983
4164
|
const isNumber = (value, fuzzy = !1)=>{
|
|
3984
4165
|
const type = typeof value;
|
|
3985
4166
|
return fuzzy ? "number" === type : "number" === type || isType(value, "Number");
|
|
@@ -4346,6 +4527,24 @@
|
|
|
4346
4527
|
return this.formatHex();
|
|
4347
4528
|
}
|
|
4348
4529
|
}
|
|
4530
|
+
function clamper(a, b) {
|
|
4531
|
+
let t;
|
|
4532
|
+
return a > b && (t = a, a = b, b = t), (x)=>Math.max(a, Math.min(b, x));
|
|
4533
|
+
}
|
|
4534
|
+
const formatGradientStops = (stops)=>{
|
|
4535
|
+
const firstInvalidateIndex = stops.findIndex((stop)=>stop.offset < 0 || stop.offset > 1);
|
|
4536
|
+
if (firstInvalidateIndex >= 0) {
|
|
4537
|
+
if (stops[firstInvalidateIndex].offset > 1) {
|
|
4538
|
+
const newStops = stops.slice(0, firstInvalidateIndex + 1);
|
|
4539
|
+
newStops[newStops.length - 1].offset = 1;
|
|
4540
|
+
return newStops;
|
|
4541
|
+
}
|
|
4542
|
+
const newStops = stops.slice(firstInvalidateIndex + 1);
|
|
4543
|
+
newStops[0].offset = 0;
|
|
4544
|
+
return newStops;
|
|
4545
|
+
}
|
|
4546
|
+
return stops;
|
|
4547
|
+
};
|
|
4349
4548
|
const splitLine = (spec, context)=>{
|
|
4350
4549
|
const { advancedVSeed } = context;
|
|
4351
4550
|
const { annotation, chartType, datasetReshapeInfo } = advancedVSeed;
|
|
@@ -4387,7 +4586,8 @@
|
|
|
4387
4586
|
});
|
|
4388
4587
|
});
|
|
4389
4588
|
if (!points || !points.length) return;
|
|
4390
|
-
const
|
|
4589
|
+
const scale = lineSeries.getYAxisHelper().getScale(0);
|
|
4590
|
+
const splitCoordinate = scale.scale(splitValue);
|
|
4391
4591
|
const minY = Math.min(...points.map((p)=>p.y));
|
|
4392
4592
|
const maxY = Math.max(...points.map((p)=>p.y));
|
|
4393
4593
|
const ratio = (splitCoordinate - minY) / (maxY - minY);
|
|
@@ -4397,7 +4597,7 @@
|
|
|
4397
4597
|
x1: 0,
|
|
4398
4598
|
y0: 0,
|
|
4399
4599
|
y1: 1,
|
|
4400
|
-
stops: [
|
|
4600
|
+
stops: formatGradientStops([
|
|
4401
4601
|
{
|
|
4402
4602
|
color: colorConfig.positiveColor,
|
|
4403
4603
|
offset: 0
|
|
@@ -4414,7 +4614,7 @@
|
|
|
4414
4614
|
color: colorConfig.negativeColor,
|
|
4415
4615
|
offset: 1
|
|
4416
4616
|
}
|
|
4417
|
-
]
|
|
4617
|
+
])
|
|
4418
4618
|
};
|
|
4419
4619
|
const areaFill = {
|
|
4420
4620
|
gradient: 'linear',
|
|
@@ -4422,7 +4622,7 @@
|
|
|
4422
4622
|
x1: 0,
|
|
4423
4623
|
y0: 0,
|
|
4424
4624
|
y1: 1,
|
|
4425
|
-
stops: [
|
|
4625
|
+
stops: formatGradientStops([
|
|
4426
4626
|
{
|
|
4427
4627
|
color: colorConfig.positiveColor,
|
|
4428
4628
|
offset: 0
|
|
@@ -4439,7 +4639,7 @@
|
|
|
4439
4639
|
color: colorConfig.negativeColor,
|
|
4440
4640
|
offset: 1
|
|
4441
4641
|
}
|
|
4442
|
-
]
|
|
4642
|
+
])
|
|
4443
4643
|
};
|
|
4444
4644
|
const attrs = {
|
|
4445
4645
|
segments: null,
|
|
@@ -4452,12 +4652,13 @@
|
|
|
4452
4652
|
lineGraphics[0].setAttributes(attrs);
|
|
4453
4653
|
lineGraphics[0].setFinalAttributes?.(attrs);
|
|
4454
4654
|
const start = lineSeries.getRegion().getLayoutStartPoint();
|
|
4655
|
+
const range = scale.range();
|
|
4455
4656
|
return {
|
|
4456
4657
|
points: points.map((entry)=>({
|
|
4457
4658
|
x: entry.x + start.x,
|
|
4458
4659
|
y: entry.y + start.y
|
|
4459
4660
|
})),
|
|
4460
|
-
splitCoordinate,
|
|
4661
|
+
splitCoordinate: clamper(range[0], range[range.length - 1])(splitCoordinate) + start.y,
|
|
4461
4662
|
areaFill,
|
|
4462
4663
|
lineStroke
|
|
4463
4664
|
};
|
|
@@ -4552,14 +4753,13 @@
|
|
|
4552
4753
|
};
|
|
4553
4754
|
const pivotGridStyle = (spec, context)=>{
|
|
4554
4755
|
const { vseed, advancedVSeed } = context;
|
|
4555
|
-
const { config, chartType
|
|
4756
|
+
const { config, chartType } = advancedVSeed;
|
|
4556
4757
|
const themConfig = config?.[chartType]?.pivotGrid ?? {};
|
|
4557
4758
|
const onlyCombination = !isPivot(vseed) && isCombination(vseed);
|
|
4558
4759
|
const result = {
|
|
4559
4760
|
...spec
|
|
4560
4761
|
};
|
|
4561
4762
|
const transparent = 'rgba(0,0,0,0)';
|
|
4562
|
-
const hasColumnDimension = dimensions.some((dim)=>'column' === dim.encoding);
|
|
4563
4763
|
const borderColor = themConfig.borderColor ?? '#e3e5eb';
|
|
4564
4764
|
const bodyFontColor = themConfig.bodyFontColor ?? '#141414';
|
|
4565
4765
|
const headerFontColor = themConfig.headerFontColor ?? '#21252c';
|
|
@@ -4577,12 +4777,15 @@
|
|
|
4577
4777
|
bodyStyle: {
|
|
4578
4778
|
borderColor,
|
|
4579
4779
|
color: bodyFontColor,
|
|
4580
|
-
borderLineWidth: (arg)=>
|
|
4780
|
+
borderLineWidth: (arg)=>{
|
|
4781
|
+
const noYAxis = 'pie' === chartType || 'rose' === chartType || 'donut' === chartType || 'funnel' === chartType || 'radar' === chartType || 'roseParallel' === chartType;
|
|
4782
|
+
return [
|
|
4581
4783
|
0 === arg.row ? outlineBorderLineWidth : 1,
|
|
4582
4784
|
outlineBorderLineWidth,
|
|
4583
4785
|
0,
|
|
4584
|
-
0 === arg.col ? outlineBorderLineWidth : 1
|
|
4585
|
-
]
|
|
4786
|
+
0 === arg.col || noYAxis && 1 === arg.col ? outlineBorderLineWidth : 1
|
|
4787
|
+
];
|
|
4788
|
+
},
|
|
4586
4789
|
bgColor: transparent,
|
|
4587
4790
|
hover: {
|
|
4588
4791
|
cellBgColor: 'transparent'
|
|
@@ -4612,7 +4815,7 @@
|
|
|
4612
4815
|
color: headerFontColor,
|
|
4613
4816
|
padding: [
|
|
4614
4817
|
0,
|
|
4615
|
-
|
|
4818
|
+
12,
|
|
4616
4819
|
0,
|
|
4617
4820
|
4
|
|
4618
4821
|
],
|
|
@@ -4636,7 +4839,7 @@
|
|
|
4636
4839
|
color: headerFontColor,
|
|
4637
4840
|
padding: [
|
|
4638
4841
|
0,
|
|
4639
|
-
|
|
4842
|
+
12,
|
|
4640
4843
|
0,
|
|
4641
4844
|
4
|
|
4642
4845
|
],
|
|
@@ -4644,34 +4847,17 @@
|
|
|
4644
4847
|
borderLineWidth: [
|
|
4645
4848
|
outlineBorderLineWidth,
|
|
4646
4849
|
1,
|
|
4647
|
-
1,
|
|
4648
|
-
outlineBorderLineWidth
|
|
4649
|
-
],
|
|
4650
|
-
bgColor: headerBackgroundColor,
|
|
4651
|
-
frameStyle: {
|
|
4652
|
-
borderColor
|
|
4653
|
-
},
|
|
4654
|
-
hover: {
|
|
4655
|
-
cellBgColor: hoverHeaderBackgroundColor,
|
|
4656
|
-
inlineRowBgColor: hoverHeaderInlineBackgroundColor || void 0,
|
|
4657
|
-
inlineColumnBgColor: hoverHeaderInlineBackgroundColor || void 0
|
|
4658
|
-
}
|
|
4659
|
-
},
|
|
4660
|
-
cornerRightTopCellStyle: {
|
|
4661
|
-
borderColor,
|
|
4662
|
-
borderLineWidth: 0,
|
|
4663
|
-
frameStyle: {
|
|
4664
|
-
borderColor,
|
|
4665
|
-
borderLineWidth: [
|
|
4666
|
-
outlineBorderLineWidth,
|
|
4667
|
-
outlineBorderLineWidth,
|
|
4668
|
-
1,
|
|
4669
|
-
1
|
|
4670
|
-
]
|
|
4671
|
-
},
|
|
4850
|
+
1,
|
|
4851
|
+
outlineBorderLineWidth
|
|
4852
|
+
],
|
|
4672
4853
|
bgColor: headerBackgroundColor,
|
|
4854
|
+
frameStyle: {
|
|
4855
|
+
borderColor
|
|
4856
|
+
},
|
|
4673
4857
|
hover: {
|
|
4674
|
-
cellBgColor: hoverHeaderBackgroundColor
|
|
4858
|
+
cellBgColor: hoverHeaderBackgroundColor,
|
|
4859
|
+
inlineRowBgColor: hoverHeaderInlineBackgroundColor || void 0,
|
|
4860
|
+
inlineColumnBgColor: hoverHeaderInlineBackgroundColor || void 0
|
|
4675
4861
|
}
|
|
4676
4862
|
},
|
|
4677
4863
|
cornerLeftBottomCellStyle: {
|
|
@@ -4696,24 +4882,19 @@
|
|
|
4696
4882
|
cellBgColor: hoverHeaderBackgroundColor
|
|
4697
4883
|
}
|
|
4698
4884
|
},
|
|
4699
|
-
|
|
4885
|
+
cornerRightTopCellStyle: {
|
|
4700
4886
|
borderColor,
|
|
4701
|
-
bgColor: headerBackgroundColor,
|
|
4702
4887
|
borderLineWidth: [
|
|
4703
|
-
1,
|
|
4704
4888
|
outlineBorderLineWidth,
|
|
4705
4889
|
outlineBorderLineWidth,
|
|
4890
|
+
1,
|
|
4706
4891
|
1
|
|
4707
4892
|
],
|
|
4708
4893
|
frameStyle: {
|
|
4709
4894
|
borderColor,
|
|
4710
|
-
borderLineWidth:
|
|
4711
|
-
1,
|
|
4712
|
-
outlineBorderLineWidth,
|
|
4713
|
-
outlineBorderLineWidth,
|
|
4714
|
-
1
|
|
4715
|
-
]
|
|
4895
|
+
borderLineWidth: 0
|
|
4716
4896
|
},
|
|
4897
|
+
bgColor: headerBackgroundColor,
|
|
4717
4898
|
hover: {
|
|
4718
4899
|
cellBgColor: hoverHeaderBackgroundColor
|
|
4719
4900
|
}
|
|
@@ -4722,16 +4903,41 @@
|
|
|
4722
4903
|
borderColor,
|
|
4723
4904
|
bgColor: headerBackgroundColor,
|
|
4724
4905
|
borderLineWidth: (arg)=>[
|
|
4725
|
-
0 === arg.row
|
|
4906
|
+
0 === arg.row ? outlineBorderLineWidth : 1,
|
|
4726
4907
|
outlineBorderLineWidth,
|
|
4727
4908
|
0,
|
|
4728
4909
|
1
|
|
4729
4910
|
],
|
|
4911
|
+
frameStyle: {
|
|
4912
|
+
borderLineWidth: 0
|
|
4913
|
+
},
|
|
4730
4914
|
hover: {
|
|
4731
4915
|
borderLineWidth: 0,
|
|
4732
4916
|
cellBgColor: hoverHeaderBackgroundColor
|
|
4733
4917
|
}
|
|
4734
4918
|
},
|
|
4919
|
+
cornerRightBottomCellStyle: {
|
|
4920
|
+
borderColor,
|
|
4921
|
+
bgColor: headerBackgroundColor,
|
|
4922
|
+
borderLineWidth: [
|
|
4923
|
+
1,
|
|
4924
|
+
outlineBorderLineWidth,
|
|
4925
|
+
outlineBorderLineWidth,
|
|
4926
|
+
1
|
|
4927
|
+
],
|
|
4928
|
+
frameStyle: {
|
|
4929
|
+
borderColor,
|
|
4930
|
+
borderLineWidth: [
|
|
4931
|
+
1,
|
|
4932
|
+
outlineBorderLineWidth,
|
|
4933
|
+
outlineBorderLineWidth,
|
|
4934
|
+
1
|
|
4935
|
+
]
|
|
4936
|
+
},
|
|
4937
|
+
hover: {
|
|
4938
|
+
cellBgColor: hoverHeaderBackgroundColor
|
|
4939
|
+
}
|
|
4940
|
+
},
|
|
4735
4941
|
bottomFrozenStyle: {
|
|
4736
4942
|
borderColor,
|
|
4737
4943
|
borderLineWidth: [
|
|
@@ -4762,10 +4968,13 @@
|
|
|
4762
4968
|
...spec
|
|
4763
4969
|
};
|
|
4764
4970
|
const { advancedVSeed } = context;
|
|
4765
|
-
const { measures, datasetReshapeInfo, dataset } = advancedVSeed;
|
|
4971
|
+
const { measures, datasetReshapeInfo, dataset, encoding } = advancedVSeed;
|
|
4766
4972
|
const colorItems = chunk_QJLMYOTX_i(datasetReshapeInfo.flatMap((d)=>d.unfoldInfo.colorItems));
|
|
4973
|
+
const allMeasureIds = chunk_QJLMYOTX_i(datasetReshapeInfo.flatMap((d)=>Object.keys(d.foldInfo.foldMap || {})));
|
|
4767
4974
|
const indicators = datasetReshapeInfo.map((reshapeInfo, index)=>{
|
|
4768
|
-
const
|
|
4975
|
+
const measureGroup = measures?.find((d)=>d.id === reshapeInfo.id);
|
|
4976
|
+
const subMeasuresId = (measureGroup?.children || []).map((d)=>d.id);
|
|
4977
|
+
const invalideMeasuresIds = allMeasureIds.filter((id)=>!subMeasuresId.includes(id));
|
|
4769
4978
|
const newDataset = dataset[index];
|
|
4770
4979
|
const newDatasetReshapeInfo = [
|
|
4771
4980
|
{
|
|
@@ -4781,13 +4990,17 @@
|
|
|
4781
4990
|
advancedVSeed: {
|
|
4782
4991
|
...advancedVSeed,
|
|
4783
4992
|
datasetReshapeInfo: newDatasetReshapeInfo,
|
|
4993
|
+
encoding: Object.keys(encoding).reduce((res, key)=>{
|
|
4994
|
+
res[key] = encoding[key]?.filter((e)=>!invalideMeasuresIds.includes(e));
|
|
4995
|
+
return res;
|
|
4996
|
+
}, {}),
|
|
4784
4997
|
dataset: newDataset
|
|
4785
4998
|
}
|
|
4786
4999
|
};
|
|
4787
5000
|
const chartSpec = execPipeline(chartPipeline, newContext, {});
|
|
4788
5001
|
return {
|
|
4789
5002
|
indicatorKey: reshapeInfo.id,
|
|
4790
|
-
title:
|
|
5003
|
+
title: measureGroup?.alias,
|
|
4791
5004
|
cellType: 'chart',
|
|
4792
5005
|
chartModule: 'vchart',
|
|
4793
5006
|
chartSpec: chartSpec,
|
|
@@ -4842,12 +5055,28 @@
|
|
|
4842
5055
|
};
|
|
4843
5056
|
const pivotAxisStyle = (axisStyle)=>(spec, context)=>{
|
|
4844
5057
|
const result = axisStyle(spec, context);
|
|
4845
|
-
if (result.axes)
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
};
|
|
4849
|
-
|
|
4850
|
-
|
|
5058
|
+
if (result.axes) {
|
|
5059
|
+
const { advancedVSeed } = context;
|
|
5060
|
+
const { config, chartType } = advancedVSeed;
|
|
5061
|
+
const themConfig = config?.[chartType]?.pivotGrid ?? {};
|
|
5062
|
+
result.axes.forEach((axis)=>{
|
|
5063
|
+
axis.domainLine = {
|
|
5064
|
+
visible: false
|
|
5065
|
+
};
|
|
5066
|
+
if (themConfig.chartGridColor && axis.grid && axis.grid.visible && axis.grid.style) axis.grid.style.stroke = themConfig.chartGridColor;
|
|
5067
|
+
if (themConfig.axisLabelColor && axis.label && axis.label.visible && axis.label.style) axis.label.style.fill = themConfig.axisLabelColor;
|
|
5068
|
+
if ('band' === axis.type) {
|
|
5069
|
+
if ('left' === axis.orient || 'right' === axis.orient) axis.innerOffset = {
|
|
5070
|
+
top: 2,
|
|
5071
|
+
bottom: 2
|
|
5072
|
+
};
|
|
5073
|
+
else if ('top' === axis.orient || 'bottom' === axis.orient) axis.innerOffset = {
|
|
5074
|
+
left: 2,
|
|
5075
|
+
right: 2
|
|
5076
|
+
};
|
|
5077
|
+
}
|
|
5078
|
+
});
|
|
5079
|
+
}
|
|
4851
5080
|
return result;
|
|
4852
5081
|
};
|
|
4853
5082
|
const pivotRowDimensions = (spec, context)=>{
|
|
@@ -4966,6 +5195,7 @@
|
|
|
4966
5195
|
'br'
|
|
4967
5196
|
].includes(position) ? 'end' : 'middle';
|
|
4968
5197
|
const legends = {
|
|
5198
|
+
padding: 0,
|
|
4969
5199
|
visible: enable,
|
|
4970
5200
|
type: 'discrete',
|
|
4971
5201
|
orient,
|
|
@@ -5286,7 +5516,7 @@
|
|
|
5286
5516
|
keys.forEach((key)=>{
|
|
5287
5517
|
if (vseed[key]) {
|
|
5288
5518
|
hasLine = true;
|
|
5289
|
-
regressionLineConfig[key] =
|
|
5519
|
+
regressionLineConfig[key] = vseed[key];
|
|
5290
5520
|
}
|
|
5291
5521
|
});
|
|
5292
5522
|
return hasLine ? {
|
|
@@ -5300,7 +5530,7 @@
|
|
|
5300
5530
|
initAdvancedVSeed_initAdvancedVSeed,
|
|
5301
5531
|
default_defaultMeasures_defaultMeasures,
|
|
5302
5532
|
defaultDimensions_defaultDimensions,
|
|
5303
|
-
|
|
5533
|
+
defaultMeasureId_defaultMeasureId,
|
|
5304
5534
|
encodingAdapter([
|
|
5305
5535
|
defaultEncodingForColumn,
|
|
5306
5536
|
buildMeasures
|
|
@@ -5458,7 +5688,7 @@
|
|
|
5458
5688
|
barStyle
|
|
5459
5689
|
];
|
|
5460
5690
|
const customMap = barStyles.reduce((result, style, index)=>{
|
|
5461
|
-
const { barBorderColor, barBorderStyle, barBorderWidth = 1, barColor, barColorOpacity, barRadius, barVisible = true } = style;
|
|
5691
|
+
const { barBorderColor, barBorderStyle, barBorderWidth = 1, barColor, barColorOpacity, barBorderOpacity, barRadius, barVisible = true } = style;
|
|
5462
5692
|
const lineDash = 'dashed' === barBorderStyle ? [
|
|
5463
5693
|
5,
|
|
5464
5694
|
2
|
|
@@ -5482,12 +5712,10 @@
|
|
|
5482
5712
|
fill: barColor,
|
|
5483
5713
|
fillOpacity: barColorOpacity,
|
|
5484
5714
|
cornerRadius: barRadius,
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
lineDash: lineDash
|
|
5490
|
-
}
|
|
5715
|
+
lineWidth: barBorderWidth,
|
|
5716
|
+
stroke: barBorderColor,
|
|
5717
|
+
strokeOpacity: barBorderOpacity,
|
|
5718
|
+
lineDash: lineDash
|
|
5491
5719
|
}
|
|
5492
5720
|
}
|
|
5493
5721
|
};
|
|
@@ -5608,6 +5836,7 @@
|
|
|
5608
5836
|
visible: true,
|
|
5609
5837
|
text: text,
|
|
5610
5838
|
style: {
|
|
5839
|
+
opacity: 0.95,
|
|
5611
5840
|
dy: dy,
|
|
5612
5841
|
textAlign: textAlign,
|
|
5613
5842
|
textBaseline: textBaseline,
|
|
@@ -5621,6 +5850,7 @@
|
|
|
5621
5850
|
visible: textBackgroundVisible,
|
|
5622
5851
|
padding: textBackgroundPadding,
|
|
5623
5852
|
style: {
|
|
5853
|
+
opacity: 0.95,
|
|
5624
5854
|
dy: dy,
|
|
5625
5855
|
cornerRadius: textBackgroundBorderRadius ?? 4,
|
|
5626
5856
|
fill: textBackgroundColor,
|
|
@@ -5648,10 +5878,6 @@
|
|
|
5648
5878
|
markArea: markArea
|
|
5649
5879
|
};
|
|
5650
5880
|
};
|
|
5651
|
-
function clamper(a, b) {
|
|
5652
|
-
let t;
|
|
5653
|
-
return a > b && (t = a, a = b, b = t), (x)=>Math.max(a, Math.min(b, x));
|
|
5654
|
-
}
|
|
5655
5881
|
function invNorm(p) {
|
|
5656
5882
|
if (p <= 0 || p >= 1) return 0;
|
|
5657
5883
|
const c1 = -0.00778489400243029, c2 = -0.322396458041136, c3 = -2.40075827716184, c4 = -2.54973253934373, c5 = 4.37466414146497, c6 = 2.93816398269878, d1 = .00778469570904146, d2 = .32246712907004, d3 = 2.445134137143, d4 = 3.75440866190742;
|
|
@@ -6182,7 +6408,7 @@
|
|
|
6182
6408
|
initAdvancedVSeed_initAdvancedVSeed,
|
|
6183
6409
|
default_defaultMeasures_defaultMeasures,
|
|
6184
6410
|
defaultDimensions_defaultDimensions,
|
|
6185
|
-
|
|
6411
|
+
defaultMeasureId_defaultMeasureId,
|
|
6186
6412
|
encodingAdapter([
|
|
6187
6413
|
defaultEncodingForColumn,
|
|
6188
6414
|
buildMeasures
|
|
@@ -6347,7 +6573,7 @@
|
|
|
6347
6573
|
initAdvancedVSeed_initAdvancedVSeed,
|
|
6348
6574
|
default_defaultMeasures_defaultMeasures,
|
|
6349
6575
|
defaultDimensions_defaultDimensions,
|
|
6350
|
-
|
|
6576
|
+
defaultMeasureId_defaultMeasureId,
|
|
6351
6577
|
encodingAdapter([
|
|
6352
6578
|
defaultEncodingForColumn,
|
|
6353
6579
|
buildMeasures
|
|
@@ -6529,7 +6755,7 @@
|
|
|
6529
6755
|
initAdvancedVSeed_initAdvancedVSeed,
|
|
6530
6756
|
default_defaultMeasures_defaultMeasures,
|
|
6531
6757
|
defaultDimensions_defaultDimensions,
|
|
6532
|
-
|
|
6758
|
+
defaultMeasureId_defaultMeasureId,
|
|
6533
6759
|
encodingAdapter([
|
|
6534
6760
|
defaultEncodingForBar,
|
|
6535
6761
|
buildMeasures
|
|
@@ -6645,6 +6871,7 @@
|
|
|
6645
6871
|
max,
|
|
6646
6872
|
min,
|
|
6647
6873
|
label: {
|
|
6874
|
+
space: 8,
|
|
6648
6875
|
visible: label?.visible,
|
|
6649
6876
|
formatMethod: (value)=>{
|
|
6650
6877
|
if (isBarPercent(vseed) || isColumnPercent(vseed) || isAreaPercent(vseed)) return createLinearPercentFormat(value, autoFormat, numFormat, formatter, percentFormatter);
|
|
@@ -6690,7 +6917,7 @@
|
|
|
6690
6917
|
}
|
|
6691
6918
|
},
|
|
6692
6919
|
innerOffset: {
|
|
6693
|
-
right:
|
|
6920
|
+
right: 12
|
|
6694
6921
|
}
|
|
6695
6922
|
};
|
|
6696
6923
|
result.axes = [
|
|
@@ -6885,7 +7112,7 @@
|
|
|
6885
7112
|
initAdvancedVSeed_initAdvancedVSeed,
|
|
6886
7113
|
default_defaultMeasures_defaultMeasures,
|
|
6887
7114
|
defaultDimensions_defaultDimensions,
|
|
6888
|
-
|
|
7115
|
+
defaultMeasureId_defaultMeasureId,
|
|
6889
7116
|
encodingAdapter([
|
|
6890
7117
|
defaultEncodingForBar,
|
|
6891
7118
|
buildMeasures
|
|
@@ -6999,7 +7226,7 @@
|
|
|
6999
7226
|
initAdvancedVSeed_initAdvancedVSeed,
|
|
7000
7227
|
default_defaultMeasures_defaultMeasures,
|
|
7001
7228
|
defaultDimensions_defaultDimensions,
|
|
7002
|
-
|
|
7229
|
+
defaultMeasureId_defaultMeasureId,
|
|
7003
7230
|
encodingAdapter([
|
|
7004
7231
|
defaultEncodingForBar,
|
|
7005
7232
|
buildMeasures
|
|
@@ -7086,7 +7313,7 @@
|
|
|
7086
7313
|
initAdvancedVSeed_initAdvancedVSeed,
|
|
7087
7314
|
default_defaultMeasures_defaultMeasures,
|
|
7088
7315
|
defaultDimensions_defaultDimensions,
|
|
7089
|
-
|
|
7316
|
+
defaultMeasureId_defaultMeasureId,
|
|
7090
7317
|
encodingAdapter([
|
|
7091
7318
|
defaultEncodingForLine,
|
|
7092
7319
|
buildMeasures
|
|
@@ -7283,7 +7510,7 @@
|
|
|
7283
7510
|
initAdvancedVSeed_initAdvancedVSeed,
|
|
7284
7511
|
default_defaultMeasures_defaultMeasures,
|
|
7285
7512
|
defaultDimensions_defaultDimensions,
|
|
7286
|
-
|
|
7513
|
+
defaultMeasureId_defaultMeasureId,
|
|
7287
7514
|
encodingAdapter([
|
|
7288
7515
|
defaultEncodingForLine,
|
|
7289
7516
|
buildMeasures
|
|
@@ -7696,7 +7923,7 @@
|
|
|
7696
7923
|
initAdvancedVSeed_initAdvancedVSeed,
|
|
7697
7924
|
default_defaultMeasures_defaultMeasures,
|
|
7698
7925
|
defaultDimensions_defaultDimensions,
|
|
7699
|
-
|
|
7926
|
+
defaultMeasureId_defaultMeasureId,
|
|
7700
7927
|
encodingAdapter([
|
|
7701
7928
|
defaultEncodingForScatter,
|
|
7702
7929
|
buildMeasuresForScatter
|
|
@@ -7802,6 +8029,7 @@
|
|
|
7802
8029
|
const { enable } = tooltip;
|
|
7803
8030
|
const { foldInfoList } = datasetReshapeInfo[0];
|
|
7804
8031
|
result.tooltip = {
|
|
8032
|
+
style: getTooltipStyle(tooltip),
|
|
7805
8033
|
visible: enable,
|
|
7806
8034
|
mark: {
|
|
7807
8035
|
title: {
|
|
@@ -8688,7 +8916,7 @@
|
|
|
8688
8916
|
initAdvancedVSeed_initAdvancedVSeed,
|
|
8689
8917
|
default_defaultMeasures_defaultMeasures,
|
|
8690
8918
|
defaultDimensions_defaultDimensions,
|
|
8691
|
-
|
|
8919
|
+
defaultMeasureId_defaultMeasureId,
|
|
8692
8920
|
encodingAdapter([
|
|
8693
8921
|
defaultEncodingForDualAxis,
|
|
8694
8922
|
buildMeasuresForDualAxis
|
|
@@ -9029,6 +9257,7 @@
|
|
|
9029
9257
|
const foldInfoList = datasetReshapeInfo[0].foldInfoList;
|
|
9030
9258
|
const unfoldInfo = datasetReshapeInfo[0].unfoldInfo;
|
|
9031
9259
|
result.tooltip = {
|
|
9260
|
+
style: getTooltipStyle(tooltip),
|
|
9032
9261
|
visible: enable,
|
|
9033
9262
|
mark: {
|
|
9034
9263
|
title: {
|
|
@@ -9112,6 +9341,7 @@
|
|
|
9112
9341
|
max,
|
|
9113
9342
|
min,
|
|
9114
9343
|
label: {
|
|
9344
|
+
space: 8,
|
|
9115
9345
|
visible: label?.visible,
|
|
9116
9346
|
formatMethod: (value)=>createLinearFormat(value, autoFormat, numFormat, formatter),
|
|
9117
9347
|
style: {
|
|
@@ -9154,7 +9384,7 @@
|
|
|
9154
9384
|
}
|
|
9155
9385
|
},
|
|
9156
9386
|
innerOffset: {
|
|
9157
|
-
top:
|
|
9387
|
+
top: 12
|
|
9158
9388
|
}
|
|
9159
9389
|
};
|
|
9160
9390
|
result.axes = [
|
|
@@ -9205,6 +9435,7 @@
|
|
|
9205
9435
|
max,
|
|
9206
9436
|
min,
|
|
9207
9437
|
label: {
|
|
9438
|
+
space: 8,
|
|
9208
9439
|
visible: label?.visible,
|
|
9209
9440
|
formatMethod: (value)=>createLinearFormat(value, autoFormat, numFormat, formatter),
|
|
9210
9441
|
style: {
|
|
@@ -9247,7 +9478,7 @@
|
|
|
9247
9478
|
}
|
|
9248
9479
|
},
|
|
9249
9480
|
innerOffset: {
|
|
9250
|
-
top:
|
|
9481
|
+
top: 12
|
|
9251
9482
|
}
|
|
9252
9483
|
};
|
|
9253
9484
|
result.axes = [
|
|
@@ -9460,7 +9691,7 @@
|
|
|
9460
9691
|
initAdvancedVSeed_initAdvancedVSeed,
|
|
9461
9692
|
default_defaultMeasures_defaultMeasures,
|
|
9462
9693
|
defaultDimensions_defaultDimensions,
|
|
9463
|
-
|
|
9694
|
+
defaultMeasureId_defaultMeasureId,
|
|
9464
9695
|
encodingAdapter([
|
|
9465
9696
|
defaultEncodingForPie,
|
|
9466
9697
|
buildMeasures
|
|
@@ -9621,7 +9852,7 @@
|
|
|
9621
9852
|
initAdvancedVSeed_initAdvancedVSeed,
|
|
9622
9853
|
default_defaultMeasures_defaultMeasures,
|
|
9623
9854
|
defaultDimensions_defaultDimensions,
|
|
9624
|
-
|
|
9855
|
+
defaultMeasureId_defaultMeasureId,
|
|
9625
9856
|
encodingAdapter([
|
|
9626
9857
|
defaultEncodingForPie,
|
|
9627
9858
|
buildMeasures
|
|
@@ -9786,7 +10017,7 @@
|
|
|
9786
10017
|
initAdvancedVSeed_initAdvancedVSeed,
|
|
9787
10018
|
default_defaultMeasures_defaultMeasures,
|
|
9788
10019
|
defaultDimensions_defaultDimensions,
|
|
9789
|
-
|
|
10020
|
+
defaultMeasureId_defaultMeasureId,
|
|
9790
10021
|
encodingAdapter([
|
|
9791
10022
|
defaultEncodingForRose,
|
|
9792
10023
|
buildMeasures
|
|
@@ -9939,7 +10170,7 @@
|
|
|
9939
10170
|
initAdvancedVSeed_initAdvancedVSeed,
|
|
9940
10171
|
default_defaultMeasures_defaultMeasures,
|
|
9941
10172
|
defaultDimensions_defaultDimensions,
|
|
9942
|
-
|
|
10173
|
+
defaultMeasureId_defaultMeasureId,
|
|
9943
10174
|
encodingAdapter([
|
|
9944
10175
|
defaultEncodingForRose,
|
|
9945
10176
|
buildMeasures
|
|
@@ -10134,7 +10365,7 @@
|
|
|
10134
10365
|
initAdvancedVSeed_initAdvancedVSeed,
|
|
10135
10366
|
default_defaultMeasures_defaultMeasures,
|
|
10136
10367
|
defaultDimensions_defaultDimensions,
|
|
10137
|
-
|
|
10368
|
+
defaultMeasureId_defaultMeasureId,
|
|
10138
10369
|
encodingAdapter([
|
|
10139
10370
|
defaultEncodingForRadar,
|
|
10140
10371
|
buildMeasures
|
|
@@ -10349,7 +10580,7 @@
|
|
|
10349
10580
|
initAdvancedVSeed_initAdvancedVSeed,
|
|
10350
10581
|
default_defaultMeasures_defaultMeasures,
|
|
10351
10582
|
defaultDimensions_defaultDimensions,
|
|
10352
|
-
|
|
10583
|
+
defaultMeasureId_defaultMeasureId,
|
|
10353
10584
|
encodingAdapter([
|
|
10354
10585
|
defaultEncodingForFunnel,
|
|
10355
10586
|
buildMeasures
|
|
@@ -10576,7 +10807,7 @@
|
|
|
10576
10807
|
initAdvancedVSeed_initAdvancedVSeed,
|
|
10577
10808
|
default_defaultMeasures_defaultMeasures,
|
|
10578
10809
|
defaultDimensions_defaultDimensions,
|
|
10579
|
-
|
|
10810
|
+
defaultMeasureId_defaultMeasureId,
|
|
10580
10811
|
encodingAdapter([
|
|
10581
10812
|
defaultEncodingForHeatmap,
|
|
10582
10813
|
buildMeasures
|
|
@@ -10627,7 +10858,7 @@
|
|
|
10627
10858
|
}
|
|
10628
10859
|
return result;
|
|
10629
10860
|
};
|
|
10630
|
-
const
|
|
10861
|
+
const markStyle_cellStyle_cellStyle = (spec, context)=>{
|
|
10631
10862
|
const result = {
|
|
10632
10863
|
...spec,
|
|
10633
10864
|
cell: {
|
|
@@ -10662,6 +10893,7 @@
|
|
|
10662
10893
|
const { enable } = tooltip;
|
|
10663
10894
|
const { foldInfo } = datasetReshapeInfo[0];
|
|
10664
10895
|
result.tooltip = {
|
|
10896
|
+
style: getTooltipStyle(tooltip),
|
|
10665
10897
|
visible: enable,
|
|
10666
10898
|
mark: {
|
|
10667
10899
|
title: {
|
|
@@ -10779,7 +11011,7 @@
|
|
|
10779
11011
|
colorAdapter(color_color, linearColor),
|
|
10780
11012
|
label_label,
|
|
10781
11013
|
colorAdapter(discreteLegend, heatmapColorLegend),
|
|
10782
|
-
colorCellStyleFill(
|
|
11014
|
+
colorCellStyleFill(markStyle_cellStyle_cellStyle),
|
|
10783
11015
|
tooltipHeatmap,
|
|
10784
11016
|
annotationPoint_annotationPoint,
|
|
10785
11017
|
annotationVerticalLine_annotationVerticalLine,
|
|
@@ -10798,7 +11030,7 @@
|
|
|
10798
11030
|
colorAdapter(color_color, linearColor),
|
|
10799
11031
|
label_label,
|
|
10800
11032
|
tooltipHeatmap,
|
|
10801
|
-
colorCellStyleFill(
|
|
11033
|
+
colorCellStyleFill(markStyle_cellStyle_cellStyle),
|
|
10802
11034
|
annotationPoint_annotationPoint,
|
|
10803
11035
|
annotationVerticalLine_annotationVerticalLine,
|
|
10804
11036
|
annotationHorizontalLine_annotationHorizontalLine,
|
|
@@ -11152,7 +11384,7 @@
|
|
|
11152
11384
|
initAdvancedVSeed_initAdvancedVSeed,
|
|
11153
11385
|
default_defaultMeasures_defaultMeasures,
|
|
11154
11386
|
defaultDimensions_defaultDimensions,
|
|
11155
|
-
|
|
11387
|
+
defaultMeasureId_defaultMeasureId,
|
|
11156
11388
|
boxplotConfig,
|
|
11157
11389
|
encodingAdapter([
|
|
11158
11390
|
defaultEncodingForBoxplot,
|
|
@@ -11247,6 +11479,7 @@
|
|
|
11247
11479
|
const defaultFormatter = valueMeasure ? createFormatterByMeasure(valueMeasure) : (v)=>v;
|
|
11248
11480
|
result.tooltip = {
|
|
11249
11481
|
visible: enable,
|
|
11482
|
+
style: getTooltipStyle(tooltip),
|
|
11250
11483
|
mark: {
|
|
11251
11484
|
title: {
|
|
11252
11485
|
visible: false
|
|
@@ -11374,6 +11607,7 @@
|
|
|
11374
11607
|
const result = {
|
|
11375
11608
|
...advancedVSeed
|
|
11376
11609
|
};
|
|
11610
|
+
const hasColorEncoding = (advancedVSeed?.dimensions || []).find((field)=>field?.encoding === 'color');
|
|
11377
11611
|
const pickedConfig = chunk_2T7K3PFL_i(vseed, [
|
|
11378
11612
|
'backgroundColor',
|
|
11379
11613
|
'color',
|
|
@@ -11387,7 +11621,14 @@
|
|
|
11387
11621
|
'binStep',
|
|
11388
11622
|
'binValueType'
|
|
11389
11623
|
]);
|
|
11390
|
-
|
|
11624
|
+
let config = replaceNullToUndefined(pickedConfig);
|
|
11625
|
+
if (!hasColorEncoding && !config?.legend?.enable) config = {
|
|
11626
|
+
...config,
|
|
11627
|
+
legend: {
|
|
11628
|
+
...config?.legend,
|
|
11629
|
+
enable: false
|
|
11630
|
+
}
|
|
11631
|
+
};
|
|
11391
11632
|
result.config = {
|
|
11392
11633
|
...result.config || {},
|
|
11393
11634
|
[chartType]: {
|
|
@@ -11396,6 +11637,30 @@
|
|
|
11396
11637
|
};
|
|
11397
11638
|
return result;
|
|
11398
11639
|
};
|
|
11640
|
+
const histogramXAxisConfig = (advancedVSeed, context)=>{
|
|
11641
|
+
const { vseed } = context;
|
|
11642
|
+
const { chartType } = vseed;
|
|
11643
|
+
const result = {
|
|
11644
|
+
...advancedVSeed
|
|
11645
|
+
};
|
|
11646
|
+
const { dataset = [] } = advancedVSeed;
|
|
11647
|
+
const flattenDatasert = dataset.flat();
|
|
11648
|
+
const minValue = Math.min(...flattenDatasert.map((v)=>+v[BinStartMeasureId]));
|
|
11649
|
+
const maxValue = Math.max(...flattenDatasert.map((v)=>+v[BinEndMeasureId]));
|
|
11650
|
+
const chartConfig = result.config?.[chartType];
|
|
11651
|
+
result.config = {
|
|
11652
|
+
...result.config || {},
|
|
11653
|
+
[chartType]: {
|
|
11654
|
+
...chartConfig,
|
|
11655
|
+
xAxis: {
|
|
11656
|
+
min: Number.isNaN(minValue) ? void 0 : minValue,
|
|
11657
|
+
max: Number.isNaN(maxValue) ? void 0 : maxValue,
|
|
11658
|
+
...chartConfig?.xAxis || {}
|
|
11659
|
+
}
|
|
11660
|
+
}
|
|
11661
|
+
};
|
|
11662
|
+
return result;
|
|
11663
|
+
};
|
|
11399
11664
|
const defaultEncodingForHistogram = (advancedVSeed)=>{
|
|
11400
11665
|
const { measures: vseedMeasures = [], dimensions = [] } = advancedVSeed;
|
|
11401
11666
|
const measures = findAllMeasures(vseedMeasures);
|
|
@@ -11487,17 +11752,17 @@
|
|
|
11487
11752
|
let startMin = min;
|
|
11488
11753
|
for(options.extent || (startMin = Math.floor(min / stepSize) * stepSize), thresholds = [
|
|
11489
11754
|
startMin
|
|
11490
|
-
]; startMin
|
|
11755
|
+
]; startMin <= max;)startMin += stepSize, thresholds.push(startMin);
|
|
11491
11756
|
} else {
|
|
11492
11757
|
const bins = options.bins && options.bins > 0 ? Math.floor(options.bins) : 10;
|
|
11493
11758
|
if (max - min > 1) {
|
|
11494
11759
|
const start = Math.floor(min), stepSizeInt = Math.ceil((max - start) / bins);
|
|
11495
11760
|
thresholds = new Array(bins + 1);
|
|
11496
|
-
for(let i = 0; i <= bins; i++)thresholds[i] =
|
|
11761
|
+
for(let i = 0; i <= bins; i++)thresholds[i] = start + stepSizeInt * i;
|
|
11497
11762
|
} else {
|
|
11498
11763
|
const stepSize = (max - min) / bins;
|
|
11499
11764
|
thresholds = new Array(bins + 1);
|
|
11500
|
-
for(let i = 0; i <= bins; i++)thresholds[i] =
|
|
11765
|
+
for(let i = 0; i <= bins; i++)thresholds[i] = min + stepSize * i;
|
|
11501
11766
|
}
|
|
11502
11767
|
}
|
|
11503
11768
|
const numBins = Math.max(0, thresholds.length - 1);
|
|
@@ -11578,7 +11843,20 @@
|
|
|
11578
11843
|
const binStep = chartConfig?.binStep;
|
|
11579
11844
|
const binValueType = chartConfig?.binValueType;
|
|
11580
11845
|
let newDatasets = [];
|
|
11581
|
-
let foldInfo = {
|
|
11846
|
+
let foldInfo = {
|
|
11847
|
+
foldMap: {},
|
|
11848
|
+
measureId: FoldMeasureId,
|
|
11849
|
+
measureName: FoldMeasureName,
|
|
11850
|
+
measureValue: FoldMeasureValue,
|
|
11851
|
+
statistics: {
|
|
11852
|
+
max: -1 / 0,
|
|
11853
|
+
min: 1 / 0,
|
|
11854
|
+
sum: 0,
|
|
11855
|
+
count: 0,
|
|
11856
|
+
colorMin: 1 / 0,
|
|
11857
|
+
colorMax: -1 / 0
|
|
11858
|
+
}
|
|
11859
|
+
};
|
|
11582
11860
|
let unfoldInfo = {};
|
|
11583
11861
|
const colorMeasureId = getColorMeasureId(advancedVSeed, vseed);
|
|
11584
11862
|
const allMeasures = findAllMeasures(measures);
|
|
@@ -11603,8 +11881,15 @@
|
|
|
11603
11881
|
binData.forEach((datum)=>{
|
|
11604
11882
|
datum[FoldMeasureId] = valueField;
|
|
11605
11883
|
datum[FoldMeasureName] = m?.alias ?? valueField;
|
|
11606
|
-
|
|
11884
|
+
const valueNumber = 'percentage' === binValueType ? +datum[BinPercentageMeasureId] : +datum[BinCountMeasureId];
|
|
11885
|
+
datum[FoldMeasureValue] = valueNumber;
|
|
11886
|
+
datum[valueField] = valueNumber;
|
|
11887
|
+
foldInfo.statistics.min = Math.min(foldInfo.statistics.min, valueNumber);
|
|
11888
|
+
foldInfo.statistics.max = Math.max(foldInfo.statistics.max, valueNumber);
|
|
11889
|
+
foldInfo.statistics.sum += valueNumber;
|
|
11890
|
+
foldInfo.statistics.count++;
|
|
11607
11891
|
});
|
|
11892
|
+
if (m?.id) foldInfo.foldMap[m?.id] = m?.alias;
|
|
11608
11893
|
const res = unfoldDimensions(binData, uniqDims, encoding, {
|
|
11609
11894
|
foldMeasureId: FoldMeasureId,
|
|
11610
11895
|
separator: "-",
|
|
@@ -11622,7 +11907,6 @@
|
|
|
11622
11907
|
res.dataset.forEach((datum)=>{
|
|
11623
11908
|
datum[BinStartMeasureId] = datum[encoding.x0[0]];
|
|
11624
11909
|
datum[BinEndMeasureId] = datum[encoding.x1[0]];
|
|
11625
|
-
datum[FoldMeasureId] = datum[encoding.y[0]];
|
|
11626
11910
|
});
|
|
11627
11911
|
newDatasets = res.dataset;
|
|
11628
11912
|
foldInfo = res.foldInfo;
|
|
@@ -11668,7 +11952,20 @@
|
|
|
11668
11952
|
if (!subMeasures) return;
|
|
11669
11953
|
const groupId = measureGroup.id;
|
|
11670
11954
|
let newDatasets = [];
|
|
11671
|
-
let foldInfo = {
|
|
11955
|
+
let foldInfo = {
|
|
11956
|
+
foldMap: {},
|
|
11957
|
+
measureId: FoldMeasureId,
|
|
11958
|
+
measureName: FoldMeasureName,
|
|
11959
|
+
measureValue: FoldMeasureValue,
|
|
11960
|
+
statistics: {
|
|
11961
|
+
max: -1 / 0,
|
|
11962
|
+
min: 1 / 0,
|
|
11963
|
+
sum: 0,
|
|
11964
|
+
count: 0,
|
|
11965
|
+
colorMin: 1 / 0,
|
|
11966
|
+
colorMax: -1 / 0
|
|
11967
|
+
}
|
|
11968
|
+
};
|
|
11672
11969
|
let unfoldInfo = {};
|
|
11673
11970
|
if (encoding.value?.length) {
|
|
11674
11971
|
const valueField = encoding.value[0];
|
|
@@ -11692,8 +11989,15 @@
|
|
|
11692
11989
|
binData.forEach((datum)=>{
|
|
11693
11990
|
datum[FoldMeasureId] = valueField;
|
|
11694
11991
|
datum[FoldMeasureName] = m?.alias ?? valueField;
|
|
11695
|
-
|
|
11992
|
+
const valueNumber = 'percentage' === binValueType ? +datum[BinPercentageMeasureId] : +datum[BinCountMeasureId];
|
|
11993
|
+
datum[FoldMeasureValue] = valueNumber;
|
|
11994
|
+
datum[valueField] = valueNumber;
|
|
11995
|
+
foldInfo.statistics.min = Math.min(foldInfo.statistics.min, valueNumber);
|
|
11996
|
+
foldInfo.statistics.max = Math.max(foldInfo.statistics.max, valueNumber);
|
|
11997
|
+
foldInfo.statistics.sum += valueNumber;
|
|
11998
|
+
foldInfo.statistics.count++;
|
|
11696
11999
|
});
|
|
12000
|
+
if (m?.id) foldInfo.foldMap[m?.id] = m?.alias;
|
|
11697
12001
|
const res = unfoldDimensions(binData, uniqDims, encoding, {
|
|
11698
12002
|
foldMeasureId: FoldMeasureId,
|
|
11699
12003
|
separator: "-",
|
|
@@ -11736,7 +12040,7 @@
|
|
|
11736
12040
|
initAdvancedVSeed_initAdvancedVSeed,
|
|
11737
12041
|
default_defaultMeasures_defaultMeasures,
|
|
11738
12042
|
defaultDimensions_defaultDimensions,
|
|
11739
|
-
|
|
12043
|
+
defaultMeasureId_defaultMeasureId,
|
|
11740
12044
|
histogramConfig,
|
|
11741
12045
|
encodingAdapter([
|
|
11742
12046
|
defaultEncodingForHistogram,
|
|
@@ -11756,6 +12060,7 @@
|
|
|
11756
12060
|
], [
|
|
11757
12061
|
pivotReshapeWithHistogramEncoding
|
|
11758
12062
|
]),
|
|
12063
|
+
histogramXAxisConfig,
|
|
11759
12064
|
sortLegend_sortLegend,
|
|
11760
12065
|
theme_theme,
|
|
11761
12066
|
markStyle_markStyle,
|
|
@@ -11776,6 +12081,10 @@
|
|
|
11776
12081
|
clip: true
|
|
11777
12082
|
}
|
|
11778
12083
|
];
|
|
12084
|
+
result.legends = {
|
|
12085
|
+
visible: false
|
|
12086
|
+
};
|
|
12087
|
+
result.barGap = 2;
|
|
11779
12088
|
result.animation = true;
|
|
11780
12089
|
return result;
|
|
11781
12090
|
};
|
|
@@ -11806,6 +12115,7 @@
|
|
|
11806
12115
|
} } = baseConfig;
|
|
11807
12116
|
const { enable } = tooltip;
|
|
11808
12117
|
result.tooltip = {
|
|
12118
|
+
style: getTooltipStyle(tooltip),
|
|
11809
12119
|
visible: enable,
|
|
11810
12120
|
mark: {
|
|
11811
12121
|
title: {
|
|
@@ -11973,7 +12283,7 @@
|
|
|
11973
12283
|
const lineTheme = advancedVSeed.config[chartType]?.regressionLine;
|
|
11974
12284
|
if (!regressionLine || !regressionLine.kdeRegressionLine) return result;
|
|
11975
12285
|
const rowColumnFields = T(dimensions.filter((dim)=>'row' === dim.encoding || 'column' === dim.encoding), (item)=>item.id);
|
|
11976
|
-
const lineList = array_array(regressionLine.kdeRegressionLine);
|
|
12286
|
+
const lineList = array_array(regressionLine.kdeRegressionLine).filter((kdeLine)=>false !== kdeLine.enable);
|
|
11977
12287
|
if (!result.customMark) result.customMark = [];
|
|
11978
12288
|
lineList.forEach((line, lineIndex)=>{
|
|
11979
12289
|
const theme = lineTheme.kdeRegressionLine ?? {};
|
|
@@ -12109,7 +12419,7 @@
|
|
|
12109
12419
|
const lineTheme = advancedVSeed.config[chartType]?.regressionLine;
|
|
12110
12420
|
if (!regressionLine || !regressionLine.ecdfRegressionLine) return result;
|
|
12111
12421
|
const rowColumnFields = T(dimensions.filter((dim)=>'row' === dim.encoding || 'column' === dim.encoding), (item)=>item.id);
|
|
12112
|
-
const lineList = array_array(regressionLine.ecdfRegressionLine);
|
|
12422
|
+
const lineList = array_array(regressionLine.ecdfRegressionLine).filter((ecdfLine)=>false !== ecdfLine.enable);
|
|
12113
12423
|
if (!result.customMark) result.customMark = [];
|
|
12114
12424
|
lineList.forEach((line, lineIndex)=>{
|
|
12115
12425
|
const theme = lineTheme?.ecdfRegressionLine ?? {};
|
|
@@ -12389,10 +12699,42 @@
|
|
|
12389
12699
|
titleFontSize: tableConfig.headerFontSize,
|
|
12390
12700
|
titleFontWeight: 'bold'
|
|
12391
12701
|
});
|
|
12392
|
-
const getLightPivotChartGridConfig = ()=>
|
|
12393
|
-
|
|
12702
|
+
const getLightPivotChartGridConfig = ()=>{
|
|
12703
|
+
const res = pickPivotChartGridConfig(getLightTableConfig());
|
|
12704
|
+
res.chartGridColor = '#F0F1F6';
|
|
12705
|
+
res.axisLabelColor = '#BCC1CB';
|
|
12706
|
+
return res;
|
|
12707
|
+
};
|
|
12708
|
+
const getDarkPivotChartGridConfig = ()=>{
|
|
12709
|
+
const res = pickPivotChartGridConfig(getDarkTableConfig());
|
|
12710
|
+
res.chartGridColor = '#303339';
|
|
12711
|
+
res.axisLabelColor = '#E2E3E6';
|
|
12712
|
+
return res;
|
|
12713
|
+
};
|
|
12394
12714
|
const getDefaultTooltip = ()=>({
|
|
12395
|
-
enable: true
|
|
12715
|
+
enable: true,
|
|
12716
|
+
borderRadius: 12,
|
|
12717
|
+
borderWidth: 1,
|
|
12718
|
+
padding: 7,
|
|
12719
|
+
lineHeight: 12,
|
|
12720
|
+
fontSize: 12,
|
|
12721
|
+
lineSpace: 6
|
|
12722
|
+
});
|
|
12723
|
+
const getLightTooltip = ()=>({
|
|
12724
|
+
...getDefaultTooltip(),
|
|
12725
|
+
borderColor: '#e3e5e8',
|
|
12726
|
+
backgroundColor: '#fff',
|
|
12727
|
+
keyColor: '#606773',
|
|
12728
|
+
valueColor: '#21252c',
|
|
12729
|
+
titleColor: '#21252c'
|
|
12730
|
+
});
|
|
12731
|
+
const getDarkTooltip = ()=>({
|
|
12732
|
+
...getDefaultTooltip(),
|
|
12733
|
+
borderColor: '#3c3f44',
|
|
12734
|
+
backgroundColor: '#2b2d30',
|
|
12735
|
+
keyColor: '#89909D',
|
|
12736
|
+
valueColor: '#E2E3E6',
|
|
12737
|
+
titleColor: '#E2E3E6'
|
|
12396
12738
|
});
|
|
12397
12739
|
const getLightLinearAxis = ()=>({
|
|
12398
12740
|
nice: true,
|
|
@@ -12401,7 +12743,7 @@
|
|
|
12401
12743
|
label: {
|
|
12402
12744
|
visible: true,
|
|
12403
12745
|
labelAngle: 0,
|
|
12404
|
-
labelColor: '#
|
|
12746
|
+
labelColor: '#8F959E',
|
|
12405
12747
|
labelFontSize: 12,
|
|
12406
12748
|
labelFontWeight: 400
|
|
12407
12749
|
},
|
|
@@ -12447,7 +12789,7 @@
|
|
|
12447
12789
|
label: {
|
|
12448
12790
|
visible: true,
|
|
12449
12791
|
labelAngle: 0,
|
|
12450
|
-
labelColor: '#
|
|
12792
|
+
labelColor: '#8F959E',
|
|
12451
12793
|
labelFontSize: 12,
|
|
12452
12794
|
labelFontWeight: 400
|
|
12453
12795
|
},
|
|
@@ -12759,7 +13101,7 @@
|
|
|
12759
13101
|
color: getLightColor(),
|
|
12760
13102
|
label: getLightLabel(),
|
|
12761
13103
|
legend: getDefaultLegend(),
|
|
12762
|
-
tooltip:
|
|
13104
|
+
tooltip: getLightTooltip()
|
|
12763
13105
|
};
|
|
12764
13106
|
const tableConfig = getLightTableConfig();
|
|
12765
13107
|
return {
|
|
@@ -13028,7 +13370,7 @@
|
|
|
13028
13370
|
color: getDarkColor(),
|
|
13029
13371
|
label: getDarkLabel(),
|
|
13030
13372
|
legend: getDefaultLegend(),
|
|
13031
|
-
tooltip:
|
|
13373
|
+
tooltip: getDarkTooltip()
|
|
13032
13374
|
};
|
|
13033
13375
|
const tableConfig = getDarkTableConfig();
|
|
13034
13376
|
return {
|
|
@@ -16996,6 +17338,61 @@
|
|
|
16996
17338
|
const zLinearColor = schemas_object({
|
|
16997
17339
|
linearColorScheme: schemas_array(schemas_string()).nullish()
|
|
16998
17340
|
});
|
|
17341
|
+
const zSelector = union([
|
|
17342
|
+
schemas_string(),
|
|
17343
|
+
schemas_number(),
|
|
17344
|
+
schemas_object({
|
|
17345
|
+
field: schemas_string(),
|
|
17346
|
+
operator: schemas_enum([
|
|
17347
|
+
'=',
|
|
17348
|
+
'==',
|
|
17349
|
+
'!=',
|
|
17350
|
+
'>',
|
|
17351
|
+
'<',
|
|
17352
|
+
'>=',
|
|
17353
|
+
'<=',
|
|
17354
|
+
'between'
|
|
17355
|
+
]).nullish(),
|
|
17356
|
+
op: schemas_enum([
|
|
17357
|
+
'=',
|
|
17358
|
+
'==',
|
|
17359
|
+
'!=',
|
|
17360
|
+
'>',
|
|
17361
|
+
'<',
|
|
17362
|
+
'>=',
|
|
17363
|
+
'<=',
|
|
17364
|
+
'between'
|
|
17365
|
+
]).nullish(),
|
|
17366
|
+
value: union([
|
|
17367
|
+
schemas_string(),
|
|
17368
|
+
schemas_number(),
|
|
17369
|
+
schemas_array(union([
|
|
17370
|
+
schemas_string(),
|
|
17371
|
+
schemas_number()
|
|
17372
|
+
]))
|
|
17373
|
+
])
|
|
17374
|
+
}),
|
|
17375
|
+
schemas_object({
|
|
17376
|
+
field: schemas_string(),
|
|
17377
|
+
operator: schemas_enum([
|
|
17378
|
+
'in',
|
|
17379
|
+
'not in'
|
|
17380
|
+
]).nullish(),
|
|
17381
|
+
op: schemas_enum([
|
|
17382
|
+
'in',
|
|
17383
|
+
'not in'
|
|
17384
|
+
]).nullish(),
|
|
17385
|
+
value: union([
|
|
17386
|
+
schemas_string(),
|
|
17387
|
+
schemas_number(),
|
|
17388
|
+
schemas_array(union([
|
|
17389
|
+
schemas_string(),
|
|
17390
|
+
schemas_number()
|
|
17391
|
+
]))
|
|
17392
|
+
])
|
|
17393
|
+
})
|
|
17394
|
+
]);
|
|
17395
|
+
const zSelectors = schemas_array(zSelector);
|
|
16999
17396
|
const zLabel = schemas_object({
|
|
17000
17397
|
enable: schemas_boolean().nullish(),
|
|
17001
17398
|
wrap: schemas_boolean().nullish(),
|
|
@@ -17010,7 +17407,11 @@
|
|
|
17010
17407
|
labelColor: schemas_string().nullish(),
|
|
17011
17408
|
labelColorSmartInvert: schemas_boolean().nullish(),
|
|
17012
17409
|
labelPosition: schemas_string().nullish(),
|
|
17013
|
-
labelOverlap: schemas_boolean().nullish()
|
|
17410
|
+
labelOverlap: schemas_boolean().nullish(),
|
|
17411
|
+
selector: union([
|
|
17412
|
+
zSelector,
|
|
17413
|
+
zSelectors
|
|
17414
|
+
]).nullish()
|
|
17014
17415
|
});
|
|
17015
17416
|
const zLegend = schemas_object({
|
|
17016
17417
|
enable: schemas_boolean().default(true).nullish(),
|
|
@@ -17092,63 +17493,19 @@
|
|
|
17092
17493
|
enable: schemas_boolean().default(true).nullish()
|
|
17093
17494
|
});
|
|
17094
17495
|
const zTooltip = schemas_object({
|
|
17095
|
-
enable: schemas_boolean().default(true).nullish()
|
|
17496
|
+
enable: schemas_boolean().default(true).nullish(),
|
|
17497
|
+
borderColor: schemas_string().nullish(),
|
|
17498
|
+
borderWidth: schemas_number().nullish(),
|
|
17499
|
+
borderRadius: schemas_number().nullish(),
|
|
17500
|
+
padding: schemas_number().or(schemas_array(schemas_number()).length(4)).nullish(),
|
|
17501
|
+
backgroundColor: schemas_string().nullish(),
|
|
17502
|
+
lineHeight: schemas_number().nullish(),
|
|
17503
|
+
fontSize: schemas_number().nullish(),
|
|
17504
|
+
lineSpace: schemas_number().nullish(),
|
|
17505
|
+
keyColor: schemas_string().nullish(),
|
|
17506
|
+
valueColor: schemas_string().nullish(),
|
|
17507
|
+
titleColor: schemas_string().nullish()
|
|
17096
17508
|
});
|
|
17097
|
-
const zSelector = union([
|
|
17098
|
-
schemas_string(),
|
|
17099
|
-
schemas_number(),
|
|
17100
|
-
schemas_object({
|
|
17101
|
-
field: schemas_string(),
|
|
17102
|
-
operator: schemas_enum([
|
|
17103
|
-
'=',
|
|
17104
|
-
'==',
|
|
17105
|
-
'!=',
|
|
17106
|
-
'>',
|
|
17107
|
-
'<',
|
|
17108
|
-
'>=',
|
|
17109
|
-
'<=',
|
|
17110
|
-
'between'
|
|
17111
|
-
]).nullish(),
|
|
17112
|
-
op: schemas_enum([
|
|
17113
|
-
'=',
|
|
17114
|
-
'==',
|
|
17115
|
-
'!=',
|
|
17116
|
-
'>',
|
|
17117
|
-
'<',
|
|
17118
|
-
'>=',
|
|
17119
|
-
'<=',
|
|
17120
|
-
'between'
|
|
17121
|
-
]).nullish(),
|
|
17122
|
-
value: union([
|
|
17123
|
-
schemas_string(),
|
|
17124
|
-
schemas_number(),
|
|
17125
|
-
schemas_array(union([
|
|
17126
|
-
schemas_string(),
|
|
17127
|
-
schemas_number()
|
|
17128
|
-
]))
|
|
17129
|
-
])
|
|
17130
|
-
}),
|
|
17131
|
-
schemas_object({
|
|
17132
|
-
field: schemas_string(),
|
|
17133
|
-
operator: schemas_enum([
|
|
17134
|
-
'in',
|
|
17135
|
-
'not in'
|
|
17136
|
-
]).nullish(),
|
|
17137
|
-
op: schemas_enum([
|
|
17138
|
-
'in',
|
|
17139
|
-
'not in'
|
|
17140
|
-
]).nullish(),
|
|
17141
|
-
value: union([
|
|
17142
|
-
schemas_string(),
|
|
17143
|
-
schemas_number(),
|
|
17144
|
-
schemas_array(union([
|
|
17145
|
-
schemas_string(),
|
|
17146
|
-
schemas_number()
|
|
17147
|
-
]))
|
|
17148
|
-
])
|
|
17149
|
-
})
|
|
17150
|
-
]);
|
|
17151
|
-
const zSelectors = schemas_array(zSelector);
|
|
17152
17509
|
const zAnnotationPoint = schemas_object({
|
|
17153
17510
|
selector: union([
|
|
17154
17511
|
zSelector,
|
|
@@ -17334,7 +17691,9 @@
|
|
|
17334
17691
|
minChartHeight: schemas_number().nullish(),
|
|
17335
17692
|
titleFontColor: schemas_string().nullish(),
|
|
17336
17693
|
titleFontSize: schemas_number().nullish(),
|
|
17337
|
-
titleFontWeight: schemas_string().nullish()
|
|
17694
|
+
titleFontWeight: schemas_string().nullish(),
|
|
17695
|
+
chartGridColor: schemas_string().nullish(),
|
|
17696
|
+
axisLabelColor: schemas_string().nullish()
|
|
17338
17697
|
});
|
|
17339
17698
|
const zLineConfig = schemas_object({
|
|
17340
17699
|
backgroundColor: zBackgroundColor.nullish(),
|
|
@@ -17357,6 +17716,7 @@
|
|
|
17357
17716
|
const zBarMaxWidth = schemas_number().or(schemas_string());
|
|
17358
17717
|
const zBarGapInGroup = schemas_number().or(schemas_string());
|
|
17359
17718
|
const zEcdfRegressionLine = schemas_object({
|
|
17719
|
+
enable: schemas_boolean().nullish(),
|
|
17360
17720
|
color: schemas_string().nullish(),
|
|
17361
17721
|
lineWidth: schemas_number().nullish(),
|
|
17362
17722
|
lineDash: schemas_array(schemas_number()).nullish(),
|
|
@@ -17723,6 +18083,17 @@
|
|
|
17723
18083
|
const zAnalysis = schemas_object({
|
|
17724
18084
|
orderMapping: record(schemas_string(), schemas_array(schemas_string())).nullish()
|
|
17725
18085
|
});
|
|
18086
|
+
const zBodyCellStyle = schemas_object({
|
|
18087
|
+
selector: union([
|
|
18088
|
+
zSelector,
|
|
18089
|
+
zSelectors
|
|
18090
|
+
]).nullish(),
|
|
18091
|
+
backgroundColor: schemas_string().nullish(),
|
|
18092
|
+
textColor: schemas_string().nullish(),
|
|
18093
|
+
textFontSize: schemas_number().nullish(),
|
|
18094
|
+
borderColor: schemas_string().nullish(),
|
|
18095
|
+
borderLineWidth: schemas_number().nullish()
|
|
18096
|
+
});
|
|
17726
18097
|
const zLocale = schemas_enum([
|
|
17727
18098
|
'zh-CN',
|
|
17728
18099
|
'en-US'
|
|
@@ -17746,6 +18117,7 @@
|
|
|
17746
18117
|
hoverHeaderInlineBackgroundColor: schemas_string().nullish(),
|
|
17747
18118
|
selectedBorderColor: schemas_string().nullish(),
|
|
17748
18119
|
selectedBackgroundColor: schemas_string().nullish(),
|
|
18120
|
+
bodyCellStyle: zBodyCellStyle.nullish(),
|
|
17749
18121
|
theme: zTheme.nullish(),
|
|
17750
18122
|
locale: zLocale.nullish()
|
|
17751
18123
|
});
|
|
@@ -17768,6 +18140,7 @@
|
|
|
17768
18140
|
hoverHeaderInlineBackgroundColor: schemas_string().nullish(),
|
|
17769
18141
|
selectedBorderColor: schemas_string().nullish(),
|
|
17770
18142
|
selectedBackgroundColor: schemas_string().nullish(),
|
|
18143
|
+
bodyCellStyle: zBodyCellStyle.nullish(),
|
|
17771
18144
|
theme: zTheme.nullish(),
|
|
17772
18145
|
locale: zLocale.nullish()
|
|
17773
18146
|
});
|
|
@@ -18077,8 +18450,8 @@
|
|
|
18077
18450
|
annotationVerticalLine: schemas_array(zAnnotationVerticalLine).or(zAnnotationVerticalLine).nullish(),
|
|
18078
18451
|
annotationHorizontalLine: schemas_array(zAnnotationHorizontalLine).or(zAnnotationHorizontalLine).nullish(),
|
|
18079
18452
|
annotationArea: schemas_array(zAnnotationArea).or(zAnnotationArea).nullish(),
|
|
18080
|
-
ecdfRegressionLine: schemas_array(zEcdfRegressionLine).or(zEcdfRegressionLine).
|
|
18081
|
-
kdeRegressionLine: schemas_array(zKdeRegressionLine).or(zKdeRegressionLine).
|
|
18453
|
+
ecdfRegressionLine: schemas_array(zEcdfRegressionLine).or(zEcdfRegressionLine).nullish(),
|
|
18454
|
+
kdeRegressionLine: schemas_array(zKdeRegressionLine).or(zKdeRegressionLine).nullish(),
|
|
18082
18455
|
locale: zLocale.nullish()
|
|
18083
18456
|
});
|
|
18084
18457
|
const zRose = schemas_object({
|
|
@@ -18226,6 +18599,9 @@
|
|
|
18226
18599
|
zBoxplot,
|
|
18227
18600
|
zHistogram
|
|
18228
18601
|
]);
|
|
18602
|
+
const zCellStyle = schemas_object({
|
|
18603
|
+
bodyCellStyle: zBodyCellStyle.nullish()
|
|
18604
|
+
});
|
|
18229
18605
|
const zAdvancedVSeed = schemas_object({
|
|
18230
18606
|
chartType: zChartType,
|
|
18231
18607
|
dataset: zDataset,
|
|
@@ -18237,6 +18613,7 @@
|
|
|
18237
18613
|
analysis: zAnalysis,
|
|
18238
18614
|
theme: zTheme,
|
|
18239
18615
|
markStyle: zMarkStyle,
|
|
18616
|
+
cellStyle: zCellStyle,
|
|
18240
18617
|
customTheme: zCustomThemeConfig,
|
|
18241
18618
|
annotation: zAnnotation,
|
|
18242
18619
|
locale: zLocale,
|