@visactor/vseed 0.1.51 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +2 -2
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/builder/builder/builder.d.ts +334 -0
- package/dist/esm/pipeline/advanced/chart/pipeline/donut.js +3 -3
- package/dist/esm/pipeline/advanced/chart/pipeline/donut.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/histogram.js +1 -2
- package/dist/esm/pipeline/advanced/chart/pipeline/histogram.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipeline/pie.js +3 -3
- package/dist/esm/pipeline/advanced/chart/pipeline/pie.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/pie.js +8 -6
- package/dist/esm/pipeline/advanced/chart/pipes/encoding/pie.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/markStyle/markStyle.js +3 -1
- package/dist/esm/pipeline/advanced/chart/pipes/markStyle/markStyle.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/measures/buildMeasures.js +2 -1
- package/dist/esm/pipeline/advanced/chart/pipes/measures/buildMeasures.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.js +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithBoxplotEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithEncoding.js.map +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js +1 -1
- package/dist/esm/pipeline/advanced/chart/pipes/reshape/pivotReshapeWithHistogramEncoding.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/boxplot.js +6 -5
- package/dist/esm/pipeline/spec/chart/pipeline/boxplot.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/dualAxis.js +15 -13
- package/dist/esm/pipeline/spec/chart/pipeline/dualAxis.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipeline/scatter.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipeline/scatter.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/color/colorBoxPlotStyleFill.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/color/colorBoxPlotStyleFill.js +17 -0
- package/dist/esm/pipeline/spec/chart/pipes/color/colorBoxPlotStyleFill.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/color/index.d.ts +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/color/index.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipes/crosshair/horizontalCrosshairRect.js +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/crosshair/horizontalCrosshairRect.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/crosshair/verticalCrosshairRect.js +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/crosshair/verticalCrosshairRect.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/index.d.ts +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/index.js +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/init/pivot.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/init/pivot.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/boxPlotStyle.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/boxPlotStyle.js +52 -0
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/boxPlotStyle.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/index.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/index.js +3 -1
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/outlierStyle.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/outlierStyle.js +67 -0
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/outlierStyle.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/areaStyleFilter.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/areaStyleFilter.js +7 -0
- package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/areaStyleFilter.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/barStyleFilter.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/barStyleFilter.js +7 -0
- package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/barStyleFilter.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/index.d.ts +4 -0
- package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/index.js +4 -0
- package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/lineStyleFilter.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/lineStyleFilter.js +7 -0
- package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/lineStyleFilter.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/pointStyleFilter.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/pointStyleFilter.js +7 -0
- package/dist/esm/pipeline/spec/chart/pipes/pipeFilter/pointStyleFilter.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/dimensionLinkage.js +18 -20
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/dimensionLinkage.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotAxisStyle.js +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotAxisStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotGridStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotIndicators.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/pivotChart/pivotIndicators.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/columnRegressionLine.js +5 -3
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/columnRegressionLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/common.d.ts +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/common.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/common.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/ecdfRegressionLine.js +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/ecdfRegressionLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/kdeRegressionLine.js +6 -1
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/kdeRegressionLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/linearRegressionLine.js +8 -3
- package/dist/esm/pipeline/spec/chart/pipes/regressionLine/linearRegressionLine.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/stack/stackCornerRadius.js +2 -3
- package/dist/esm/pipeline/spec/chart/pipes/stack/stackCornerRadius.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/index.d.ts +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/index.js +2 -2
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.d.ts +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.js +16 -2
- package/dist/esm/pipeline/spec/chart/pipes/tooltip/tooltipDualAxis.js.map +1 -1
- package/dist/esm/pipeline/utils/measures/find.d.ts +1 -0
- package/dist/esm/pipeline/utils/measures/find.js +13 -1
- package/dist/esm/pipeline/utils/measures/find.js.map +1 -1
- package/dist/esm/theme/common/axes.js +4 -4
- package/dist/esm/theme/common/axes.js.map +1 -1
- package/dist/esm/theme/common/boxPlot.d.ts +5 -0
- package/dist/esm/theme/common/boxPlot.js +15 -0
- package/dist/esm/theme/common/boxPlot.js.map +1 -0
- package/dist/esm/theme/common/crosshair.js +4 -4
- package/dist/esm/theme/common/crosshair.js.map +1 -1
- package/dist/esm/theme/common/table.js +2 -0
- package/dist/esm/theme/common/table.js.map +1 -1
- package/dist/esm/theme/dark/dark.js +4 -1
- package/dist/esm/theme/dark/dark.js.map +1 -1
- package/dist/esm/theme/light/light.js +4 -1
- package/dist/esm/theme/light/light.js.map +1 -1
- package/dist/esm/types/advancedVSeed.d.ts +358 -0
- package/dist/esm/types/chartType/boxplot/boxplot.d.ts +9 -1
- package/dist/esm/types/chartType/boxplot/zBoxplot.d.ts +316 -0
- package/dist/esm/types/chartType/boxplot/zBoxplot.js +3 -1
- package/dist/esm/types/chartType/boxplot/zBoxplot.js.map +1 -1
- package/dist/esm/types/properties/config/boxplot.d.ts +21 -0
- package/dist/esm/types/properties/config/boxplot.js +8 -1
- package/dist/esm/types/properties/config/boxplot.js.map +1 -1
- package/dist/esm/types/properties/config/config.d.ts +21 -0
- package/dist/esm/types/properties/markStyle/boxPlotStyle.d.ts +148 -0
- package/dist/esm/types/properties/markStyle/boxPlotStyle.js +14 -0
- package/dist/esm/types/properties/markStyle/boxPlotStyle.js.map +1 -0
- package/dist/esm/types/properties/markStyle/index.d.ts +2 -0
- package/dist/esm/types/properties/markStyle/index.js +2 -0
- package/dist/esm/types/properties/markStyle/markStyle.d.ts +316 -0
- package/dist/esm/types/properties/markStyle/markStyle.js +5 -1
- package/dist/esm/types/properties/markStyle/markStyle.js.map +1 -1
- package/dist/esm/types/properties/markStyle/outlierStyle.d.ts +161 -0
- package/dist/esm/types/properties/markStyle/outlierStyle.js +22 -0
- package/dist/esm/types/properties/markStyle/outlierStyle.js.map +1 -0
- package/dist/esm/types/properties/theme/customTheme.d.ts +42 -0
- package/dist/esm/types/zVseed.d.ts +316 -0
- package/dist/umd/index.js +330 -99
- package/dist/umd/index.js.map +1 -1
- package/package.json +3 -3
package/dist/umd/index.js
CHANGED
|
@@ -51,9 +51,10 @@
|
|
|
51
51
|
pivotTableAdvancedPipeline: ()=>pivotTableAdvancedPipeline,
|
|
52
52
|
zLogisticRegressionLine: ()=>zLogisticRegressionLine,
|
|
53
53
|
zAnnotationHorizontalLine: ()=>zAnnotationHorizontalLine,
|
|
54
|
-
|
|
54
|
+
zOutlierStyle: ()=>zOutlierStyle,
|
|
55
55
|
zMarkStyle: ()=>zMarkStyle,
|
|
56
56
|
registerFunnel: ()=>registerFunnel,
|
|
57
|
+
zYLinearAxis: ()=>zYLinearAxis,
|
|
57
58
|
columnAdvancedPipeline: ()=>columnAdvancedPipeline,
|
|
58
59
|
zLabel: ()=>zLabel,
|
|
59
60
|
registerColumn: ()=>registerColumn,
|
|
@@ -78,6 +79,7 @@
|
|
|
78
79
|
FoldXMeasureId: ()=>FoldXMeasureId,
|
|
79
80
|
zAnnotationAreaConfig: ()=>zAnnotationAreaConfig,
|
|
80
81
|
zAnnotationVerticalLineConfig: ()=>zAnnotationVerticalLineConfig,
|
|
82
|
+
zBoxPlotStyle: ()=>zBoxPlotStyle,
|
|
81
83
|
zHistogram: ()=>zHistogram,
|
|
82
84
|
zAnnotationConfig: ()=>zAnnotationConfig,
|
|
83
85
|
registerBarPercent: ()=>registerBarPercent,
|
|
@@ -172,13 +174,13 @@
|
|
|
172
174
|
Q3MeasureValue: ()=>"__Q3__",
|
|
173
175
|
createFormatter: ()=>createFormatter,
|
|
174
176
|
columnPercentSpecPipeline: ()=>columnPercentSpecPipeline,
|
|
175
|
-
BAND_AXIS_INNER_OFFSET_IN_PIVOT: ()=>2,
|
|
176
177
|
selectByPartial: ()=>selectByPartial,
|
|
177
178
|
isMeasureSelector: ()=>isMeasureSelector,
|
|
178
|
-
zBarConfig: ()=>zBarConfig,
|
|
179
179
|
areaAdvancedPipeline: ()=>areaAdvancedPipeline,
|
|
180
|
+
zBarConfig: ()=>zBarConfig,
|
|
180
181
|
areaPercentSpecPipeline: ()=>areaPercentSpecPipeline,
|
|
181
182
|
barParallelSpecPipeline: ()=>barParallelSpecPipeline,
|
|
183
|
+
BAND_AXIS_INNER_OFFSET_IN_PIVOT: ()=>2,
|
|
182
184
|
zPie: ()=>zPie,
|
|
183
185
|
zBar: ()=>zBar,
|
|
184
186
|
pieAdvancedPipeline: ()=>pieAdvancedPipeline,
|
|
@@ -211,6 +213,7 @@
|
|
|
211
213
|
registerHistogram: ()=>registerHistogram,
|
|
212
214
|
zRoseParallel: ()=>zRoseParallel,
|
|
213
215
|
MeasureName: ()=>MeasureName,
|
|
216
|
+
hasMultipleMeasureInSingleView: ()=>hasMultipleMeasureInSingleView,
|
|
214
217
|
selectorDatum: ()=>selectorDatum,
|
|
215
218
|
zRegressionLine: ()=>zRegressionLine,
|
|
216
219
|
zNumFormat: ()=>zNumFormat,
|
|
@@ -881,6 +884,18 @@
|
|
|
881
884
|
});
|
|
882
885
|
return result;
|
|
883
886
|
};
|
|
887
|
+
const hasMultipleMeasureInSingleView = (measures = [])=>{
|
|
888
|
+
if (measures.every((m)=>!('children' in m))) return measures.length > 1;
|
|
889
|
+
let found = false;
|
|
890
|
+
preorderTraverse(measures, (node)=>{
|
|
891
|
+
if (node.children && node.children.length > 1) {
|
|
892
|
+
found = true;
|
|
893
|
+
return true;
|
|
894
|
+
}
|
|
895
|
+
return false;
|
|
896
|
+
});
|
|
897
|
+
return found;
|
|
898
|
+
};
|
|
884
899
|
const defaultDimensions = (advancedVSeed, context)=>{
|
|
885
900
|
const result = {
|
|
886
901
|
...advancedVSeed
|
|
@@ -2309,7 +2324,7 @@
|
|
|
2309
2324
|
if (parent && 'children' in parent) {
|
|
2310
2325
|
parent.children = parent.children || [];
|
|
2311
2326
|
parent.children.push(measure);
|
|
2312
|
-
} else if (measure.parentId) measureTree.push({
|
|
2327
|
+
} else if (common_isValid(measure.parentId)) measureTree.push({
|
|
2313
2328
|
id: measure.parentId,
|
|
2314
2329
|
children: [
|
|
2315
2330
|
measure
|
|
@@ -2595,7 +2610,7 @@
|
|
|
2595
2610
|
omitIds: allMeasures.map((item)=>item.id)
|
|
2596
2611
|
});
|
|
2597
2612
|
const reshapeInfo = {
|
|
2598
|
-
id: groupId
|
|
2613
|
+
id: `${groupId}`,
|
|
2599
2614
|
index,
|
|
2600
2615
|
foldInfo,
|
|
2601
2616
|
unfoldInfo
|
|
@@ -2707,7 +2722,9 @@
|
|
|
2707
2722
|
'barStyle',
|
|
2708
2723
|
'pointStyle',
|
|
2709
2724
|
'lineStyle',
|
|
2710
|
-
'areaStyle'
|
|
2725
|
+
'areaStyle',
|
|
2726
|
+
'boxPlotStyle',
|
|
2727
|
+
'outlierStyle'
|
|
2711
2728
|
]);
|
|
2712
2729
|
const markStyle = replaceNullToUndefined(pickedMarkStyle);
|
|
2713
2730
|
return {
|
|
@@ -4849,10 +4866,10 @@
|
|
|
4849
4866
|
widthMode: 'standard',
|
|
4850
4867
|
autoFillWidth: true,
|
|
4851
4868
|
defaultHeaderColWidth: 'auto',
|
|
4852
|
-
defaultColWidth:
|
|
4869
|
+
defaultColWidth: 240,
|
|
4853
4870
|
heightMode: 'standard',
|
|
4854
4871
|
autoFillHeight: true,
|
|
4855
|
-
defaultRowHeight:
|
|
4872
|
+
defaultRowHeight: 180,
|
|
4856
4873
|
defaultHeaderRowHeight: 'auto',
|
|
4857
4874
|
indicatorsAsCol: false,
|
|
4858
4875
|
select: {
|
|
@@ -4907,7 +4924,7 @@
|
|
|
4907
4924
|
0 === arg.row ? outlineBorderLineWidth : 1,
|
|
4908
4925
|
outlineBorderLineWidth,
|
|
4909
4926
|
0,
|
|
4910
|
-
0 === arg.col || noYAxis && 1 === arg.col ? outlineBorderLineWidth : 1
|
|
4927
|
+
0 === arg.col || noYAxis && 1 === arg.col && arg.table.colCount <= 2 ? outlineBorderLineWidth : 1
|
|
4911
4928
|
];
|
|
4912
4929
|
},
|
|
4913
4930
|
bgColor: transparent,
|
|
@@ -5111,7 +5128,7 @@
|
|
|
5111
5128
|
const colorItems = chunk_QJLMYOTX_i(datasetReshapeInfo.flatMap((d)=>d.unfoldInfo.colorItems));
|
|
5112
5129
|
const allMeasureIds = chunk_QJLMYOTX_i(datasetReshapeInfo.flatMap((d)=>Object.keys(d.foldInfo.foldMap || {})));
|
|
5113
5130
|
const indicators = datasetReshapeInfo.map((reshapeInfo, index)=>{
|
|
5114
|
-
const measureGroup = measures?.find((d)
|
|
5131
|
+
const measureGroup = measures?.find((d)=>`${d.id}` === reshapeInfo.id);
|
|
5115
5132
|
const subMeasuresId = (measureGroup?.children || []).map((d)=>d.id);
|
|
5116
5133
|
const invalideMeasuresIds = allMeasureIds.filter((id)=>!subMeasuresId.includes(id));
|
|
5117
5134
|
const newDataset = dataset[index];
|
|
@@ -5139,7 +5156,7 @@
|
|
|
5139
5156
|
};
|
|
5140
5157
|
const chartSpec = execPipeline(chartPipeline, newContext, {});
|
|
5141
5158
|
return {
|
|
5142
|
-
indicatorKey: reshapeInfo.id
|
|
5159
|
+
indicatorKey: `${reshapeInfo.id}`,
|
|
5143
5160
|
title: measureGroup?.alias,
|
|
5144
5161
|
cellType: 'chart',
|
|
5145
5162
|
chartModule: 'vchart',
|
|
@@ -5214,6 +5231,8 @@
|
|
|
5214
5231
|
left: 2,
|
|
5215
5232
|
right: 2
|
|
5216
5233
|
};
|
|
5234
|
+
} else if ('linear' === axis.type) {
|
|
5235
|
+
if ('top' === axis.orient || 'bottom' === axis.orient) axis.label.flush = true;
|
|
5217
5236
|
}
|
|
5218
5237
|
});
|
|
5219
5238
|
}
|
|
@@ -5473,13 +5492,6 @@
|
|
|
5473
5492
|
legends
|
|
5474
5493
|
};
|
|
5475
5494
|
};
|
|
5476
|
-
const defaultScatterFormatter = (val)=>{
|
|
5477
|
-
if (chunk_JK3VNB42_n(val)) return '';
|
|
5478
|
-
if ('string' == typeof val) return val;
|
|
5479
|
-
if (0 === val) return '0';
|
|
5480
|
-
if (Math.abs(val) < 1) return val.toFixed(2);
|
|
5481
|
-
return val === Math.floor(val) ? `${val}` : val.toFixed(1);
|
|
5482
|
-
};
|
|
5483
5495
|
const dimensionLinkage = (spec, context)=>{
|
|
5484
5496
|
const { advancedVSeed, vseed } = context;
|
|
5485
5497
|
const { chartType } = vseed;
|
|
@@ -5489,18 +5501,24 @@
|
|
|
5489
5501
|
const labelHoverOnAxis = {};
|
|
5490
5502
|
const chartSpec = indicators?.[0]?.chartSpec;
|
|
5491
5503
|
const crosshair = chartSpec?.crosshair;
|
|
5492
|
-
if (crosshair?.xField)
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
+
if (crosshair?.xField) {
|
|
5505
|
+
const labelFormat = crosshair.xField.label?.formatMethod;
|
|
5506
|
+
labelHoverOnAxis.bottom = {
|
|
5507
|
+
visible: config.showLabel ?? crosshair.xField.label?.visible ?? true,
|
|
5508
|
+
background: crosshair.xField.label?.labelBackground,
|
|
5509
|
+
textStyle: crosshair.xField.label?.style,
|
|
5510
|
+
formatMethod: labelFormat ? (text)=>text || 0 === text ? labelFormat(text) : null : void 0
|
|
5511
|
+
};
|
|
5512
|
+
}
|
|
5513
|
+
if (crosshair?.yField) {
|
|
5514
|
+
const labelFormat = crosshair.yField.label?.formatMethod;
|
|
5515
|
+
labelHoverOnAxis.left = {
|
|
5516
|
+
visible: config.showLabel ?? crosshair.yField.label?.visible ?? true,
|
|
5517
|
+
background: crosshair.yField.label?.labelBackground,
|
|
5518
|
+
textStyle: crosshair.yField.label?.style,
|
|
5519
|
+
formatMethod: labelFormat ? (text)=>text || 0 === text ? labelFormat(text) : null : void 0
|
|
5520
|
+
};
|
|
5521
|
+
}
|
|
5504
5522
|
if (indicators && indicators.length) indicators.forEach((ind)=>{
|
|
5505
5523
|
const crosshair = ind?.chartSpec?.crosshair;
|
|
5506
5524
|
if (crosshair?.xField) crosshair.xField.label = {
|
|
@@ -5772,13 +5790,11 @@
|
|
|
5772
5790
|
const { advancedVSeed, vseed } = context;
|
|
5773
5791
|
const { chartType } = vseed;
|
|
5774
5792
|
const stackCornerRadius = advancedVSeed.config?.[chartType]?.stackCornerRadius;
|
|
5775
|
-
const { datasetReshapeInfo } = advancedVSeed;
|
|
5776
|
-
const { foldInfo } = datasetReshapeInfo[0];
|
|
5777
5793
|
if ('dualAxis' === chartType && 'bar' !== spec.type) return spec;
|
|
5778
5794
|
return {
|
|
5779
5795
|
...spec,
|
|
5780
5796
|
stackCornerRadius: (_, datum)=>{
|
|
5781
|
-
if (datum[
|
|
5797
|
+
if (datum && datum[datum[FoldMeasureId]] > 0) return stackCornerRadius;
|
|
5782
5798
|
return 0;
|
|
5783
5799
|
}
|
|
5784
5800
|
};
|
|
@@ -5821,7 +5837,7 @@
|
|
|
5821
5837
|
type: 'rect',
|
|
5822
5838
|
style: {
|
|
5823
5839
|
lineWidth: 0,
|
|
5824
|
-
opacity: 0.
|
|
5840
|
+
opacity: 0.26,
|
|
5825
5841
|
fill: rectColor
|
|
5826
5842
|
}
|
|
5827
5843
|
},
|
|
@@ -6353,6 +6369,7 @@
|
|
|
6353
6369
|
return points[points.length - 1]?.y;
|
|
6354
6370
|
}
|
|
6355
6371
|
};
|
|
6372
|
+
const getAlphaByConfidenceLevel = (confidenceLevel = 0.95)=>1 - Math.max(Math.min(1, confidenceLevel), 0);
|
|
6356
6373
|
const columnPolynomialRegressionLine = (spec, context)=>{
|
|
6357
6374
|
const result = {
|
|
6358
6375
|
...spec
|
|
@@ -6366,7 +6383,7 @@
|
|
|
6366
6383
|
lineList.forEach((line, lineIndex)=>{
|
|
6367
6384
|
if (false === line.enable) return;
|
|
6368
6385
|
const theme = lineTheme.linearRegressionLine ?? {};
|
|
6369
|
-
const { color, lineWidth, lineDash, text, textColor, textFontSize, textFontWeight, confidenceIntervalOpacity, confidenceIntervalVisible = theme.confidenceIntervalVisible } = line;
|
|
6386
|
+
const { color, lineWidth, lineDash, text, textColor, textFontSize, textFontWeight, confidenceIntervalOpacity, confidenceLevel = 0.95, confidenceIntervalVisible = theme.confidenceIntervalVisible } = line;
|
|
6370
6387
|
const childrenMarks = [];
|
|
6371
6388
|
result.extensionMark.push({
|
|
6372
6389
|
type: 'group',
|
|
@@ -6395,7 +6412,8 @@
|
|
|
6395
6412
|
y: Math.max(...filteredData.map((d)=>d[fieldY]))
|
|
6396
6413
|
};
|
|
6397
6414
|
}), void 0, void 0, {
|
|
6398
|
-
degree: line.degree ?? 2
|
|
6415
|
+
degree: line.degree ?? 2,
|
|
6416
|
+
alpha: getAlphaByConfidenceLevel(confidenceLevel)
|
|
6399
6417
|
});
|
|
6400
6418
|
const N = xValues.length;
|
|
6401
6419
|
const xAxisHelper = s.getXAxisHelper();
|
|
@@ -6476,6 +6494,7 @@
|
|
|
6476
6494
|
interactive: false,
|
|
6477
6495
|
zIndex: 500,
|
|
6478
6496
|
dataId: spec.data?.id,
|
|
6497
|
+
dataKey: ()=>`polynomialRegressionLine-label-${lineIndex}`,
|
|
6479
6498
|
style: {
|
|
6480
6499
|
textAlign: 'end',
|
|
6481
6500
|
fill: textColor ?? theme.textColor,
|
|
@@ -7245,7 +7264,7 @@
|
|
|
7245
7264
|
type: 'rect',
|
|
7246
7265
|
style: {
|
|
7247
7266
|
lineWidth: 0,
|
|
7248
|
-
opacity: 0.
|
|
7267
|
+
opacity: 0.26,
|
|
7249
7268
|
fill: rectColor
|
|
7250
7269
|
}
|
|
7251
7270
|
},
|
|
@@ -8757,6 +8776,7 @@
|
|
|
8757
8776
|
zIndex: 500,
|
|
8758
8777
|
animation: false,
|
|
8759
8778
|
dataId: spec.data?.id,
|
|
8779
|
+
dataKey: ()=>`regressionLine-label-${lineIndex}`,
|
|
8760
8780
|
style: {
|
|
8761
8781
|
textAlign: 'end',
|
|
8762
8782
|
fill: textColor ?? theme.textColor,
|
|
@@ -8782,9 +8802,12 @@
|
|
|
8782
8802
|
});
|
|
8783
8803
|
return result;
|
|
8784
8804
|
};
|
|
8785
|
-
const getDefaultRegressionOptions = (lineConfig)=>
|
|
8786
|
-
|
|
8787
|
-
|
|
8805
|
+
const getDefaultRegressionOptions = (lineConfig)=>{
|
|
8806
|
+
const alpha = getAlphaByConfidenceLevel(lineConfig?.confidenceLevel);
|
|
8807
|
+
return {
|
|
8808
|
+
alpha
|
|
8809
|
+
};
|
|
8810
|
+
};
|
|
8788
8811
|
const linearRegressionLine = generateRegressionLinePipe('linearRegressionLine', regressionLinear);
|
|
8789
8812
|
const lowessRegressionLine = generateRegressionLinePipe('lowessRegressionLine', regressionLowess);
|
|
8790
8813
|
const polynomialRegressionLine = generateRegressionLinePipe('polynomialRegressionLine', regressionPolynomial, (lineConfig)=>({
|
|
@@ -8842,7 +8865,9 @@
|
|
|
8842
8865
|
annotationHorizontalLine_annotationHorizontalLine,
|
|
8843
8866
|
annotationArea_annotationArea,
|
|
8844
8867
|
linearRegressionLine,
|
|
8845
|
-
lowessRegressionLine
|
|
8868
|
+
lowessRegressionLine,
|
|
8869
|
+
polynomialRegressionLine,
|
|
8870
|
+
logisticRegressionLine
|
|
8846
8871
|
]),
|
|
8847
8872
|
pivotRowDimensions,
|
|
8848
8873
|
pivotColumnDimensions,
|
|
@@ -9528,7 +9553,6 @@
|
|
|
9528
9553
|
const foldInfoList = datasetReshapeInfo[0].foldInfoList;
|
|
9529
9554
|
const unfoldInfo = datasetReshapeInfo[0].unfoldInfo;
|
|
9530
9555
|
result.tooltip = {
|
|
9531
|
-
style: getTooltipStyle(tooltip),
|
|
9532
9556
|
visible: enable,
|
|
9533
9557
|
mark: {
|
|
9534
9558
|
title: {
|
|
@@ -9576,6 +9600,37 @@
|
|
|
9576
9600
|
};
|
|
9577
9601
|
return result;
|
|
9578
9602
|
};
|
|
9603
|
+
const tooltipDualAxis = (spec, context)=>{
|
|
9604
|
+
const result = {
|
|
9605
|
+
...spec
|
|
9606
|
+
};
|
|
9607
|
+
const { advancedVSeed } = context;
|
|
9608
|
+
const { chartType } = advancedVSeed;
|
|
9609
|
+
const baseConfig = advancedVSeed.config[chartType];
|
|
9610
|
+
const { tooltip = {
|
|
9611
|
+
enable: true
|
|
9612
|
+
} } = baseConfig;
|
|
9613
|
+
result.tooltip = {
|
|
9614
|
+
style: getTooltipStyle(tooltip)
|
|
9615
|
+
};
|
|
9616
|
+
return result;
|
|
9617
|
+
};
|
|
9618
|
+
const barStyleFilter = (pipe)=>(spec, context)=>{
|
|
9619
|
+
if ('bar' === spec.type) return pipe(spec, context);
|
|
9620
|
+
return spec;
|
|
9621
|
+
};
|
|
9622
|
+
const pointStyleFilter = (pipe)=>(spec, context)=>{
|
|
9623
|
+
if ('line' === spec.type || 'area' === spec.type) return pipe(spec, context);
|
|
9624
|
+
return spec;
|
|
9625
|
+
};
|
|
9626
|
+
const lineStyleFilter = (pipe)=>(spec, context)=>{
|
|
9627
|
+
if ('line' === spec.type) return pipe(spec, context);
|
|
9628
|
+
return spec;
|
|
9629
|
+
};
|
|
9630
|
+
const areaStyleFilter = (pipe)=>(spec, context)=>{
|
|
9631
|
+
if ('area' === spec.type) return pipe(spec, context);
|
|
9632
|
+
return spec;
|
|
9633
|
+
};
|
|
9579
9634
|
const yLinearPrimary = (spec, context)=>{
|
|
9580
9635
|
const result = {
|
|
9581
9636
|
...spec
|
|
@@ -9791,21 +9846,21 @@
|
|
|
9791
9846
|
};
|
|
9792
9847
|
const isObjectLike = (value)=>"object" == typeof value && null !== value;
|
|
9793
9848
|
const common_isObjectLike = isObjectLike;
|
|
9794
|
-
const
|
|
9849
|
+
const isPlainObject = function(value) {
|
|
9795
9850
|
if (!common_isObjectLike(value) || !isType(value, "Object")) return !1;
|
|
9796
9851
|
if (null === Object.getPrototypeOf(value)) return !0;
|
|
9797
9852
|
let proto = value;
|
|
9798
9853
|
for(; null !== Object.getPrototypeOf(proto);)proto = Object.getPrototypeOf(proto);
|
|
9799
9854
|
return Object.getPrototypeOf(value) === proto;
|
|
9800
9855
|
};
|
|
9801
|
-
const
|
|
9856
|
+
const common_isPlainObject = isPlainObject;
|
|
9802
9857
|
const isString = (value, fuzzy = !1)=>{
|
|
9803
9858
|
const type = typeof value;
|
|
9804
9859
|
return fuzzy ? "string" === type : "string" === type || isType(value, "String");
|
|
9805
9860
|
};
|
|
9806
9861
|
const common_isString = isString;
|
|
9807
9862
|
function pickWithout(obj, keys) {
|
|
9808
|
-
if (!obj || !
|
|
9863
|
+
if (!obj || !common_isPlainObject(obj)) return obj;
|
|
9809
9864
|
const result = {};
|
|
9810
9865
|
return Object.keys(obj).forEach((k)=>{
|
|
9811
9866
|
const v = obj[k];
|
|
@@ -9910,11 +9965,11 @@
|
|
|
9910
9965
|
barMaxWidth_barMaxWidth,
|
|
9911
9966
|
barGapInGroup_barGapInGroup,
|
|
9912
9967
|
stackCornerRadius_stackCornerRadius,
|
|
9913
|
-
colorBarStyleFill(barStyle_barStyle),
|
|
9914
|
-
colorPointStyleFill(pointStyle_pointStyle),
|
|
9915
|
-
pointStateDimensionHover,
|
|
9916
|
-
colorLineStyleFill(lineStyle_lineStyle),
|
|
9917
|
-
colorAreaStyleFill(areaStyle_areaStyle)
|
|
9968
|
+
barStyleFilter(colorBarStyleFill(barStyle_barStyle)),
|
|
9969
|
+
pointStyleFilter(colorPointStyleFill(pointStyle_pointStyle)),
|
|
9970
|
+
pointStyleFilter(pointStateDimensionHover),
|
|
9971
|
+
lineStyleFilter(colorLineStyleFill(lineStyle_lineStyle)),
|
|
9972
|
+
areaStyleFilter(colorAreaStyleFill(areaStyle_areaStyle))
|
|
9918
9973
|
], [
|
|
9919
9974
|
initDualAxisSecondary,
|
|
9920
9975
|
dualChartTypeSecondary,
|
|
@@ -9925,11 +9980,11 @@
|
|
|
9925
9980
|
barMaxWidth_barMaxWidth,
|
|
9926
9981
|
barGapInGroup_barGapInGroup,
|
|
9927
9982
|
stackCornerRadius_stackCornerRadius,
|
|
9928
|
-
colorBarStyleFill(barStyle_barStyle),
|
|
9929
|
-
colorPointStyleFill(pointStyle_pointStyle),
|
|
9930
|
-
pointStateDimensionHover,
|
|
9931
|
-
colorLineStyleFill(lineStyle_lineStyle),
|
|
9932
|
-
colorAreaStyleFill(areaStyle_areaStyle)
|
|
9983
|
+
barStyleFilter(colorBarStyleFill(barStyle_barStyle)),
|
|
9984
|
+
pointStyleFilter(colorPointStyleFill(pointStyle_pointStyle)),
|
|
9985
|
+
pointStyleFilter(pointStateDimensionHover),
|
|
9986
|
+
lineStyleFilter(colorLineStyleFill(lineStyle_lineStyle)),
|
|
9987
|
+
areaStyleFilter(colorAreaStyleFill(areaStyle_areaStyle))
|
|
9933
9988
|
]),
|
|
9934
9989
|
xBand,
|
|
9935
9990
|
yLinearPrimary,
|
|
@@ -9941,7 +9996,8 @@
|
|
|
9941
9996
|
annotationPointOfDualAxis,
|
|
9942
9997
|
annotationVerticalLine_annotationVerticalLine,
|
|
9943
9998
|
annotationHorizontalLine_annotationHorizontalLine,
|
|
9944
|
-
annotationAreaBand
|
|
9999
|
+
annotationAreaBand,
|
|
10000
|
+
tooltipDualAxis
|
|
9945
10001
|
];
|
|
9946
10002
|
const pivotDualAxis = [
|
|
9947
10003
|
initPivot,
|
|
@@ -9989,7 +10045,8 @@
|
|
|
9989
10045
|
annotationPointOfDualAxis,
|
|
9990
10046
|
annotationVerticalLine_annotationVerticalLine,
|
|
9991
10047
|
annotationHorizontalLine_annotationHorizontalLine,
|
|
9992
|
-
annotationAreaBand
|
|
10048
|
+
annotationAreaBand,
|
|
10049
|
+
tooltipDualAxis
|
|
9993
10050
|
]),
|
|
9994
10051
|
pivotRowDimensions,
|
|
9995
10052
|
pivotColumnDimensions,
|
|
@@ -10008,7 +10065,7 @@
|
|
|
10008
10065
|
const { measures: vseedMeasures = [], dimensions = [] } = advancedVSeed;
|
|
10009
10066
|
const measures = findAllMeasures(vseedMeasures);
|
|
10010
10067
|
const encoding = {};
|
|
10011
|
-
pie_generateDefaultDimensionEncoding(dimensions, encoding);
|
|
10068
|
+
pie_generateDefaultDimensionEncoding(dimensions, encoding, hasMultipleMeasureInSingleView(vseedMeasures));
|
|
10012
10069
|
pie_generateDefaultMeasureEncoding(measures, encoding);
|
|
10013
10070
|
return {
|
|
10014
10071
|
...advancedVSeed,
|
|
@@ -10021,8 +10078,9 @@
|
|
|
10021
10078
|
const hasDimensionEncoding = dimensions.some((item)=>item.encoding);
|
|
10022
10079
|
const hasMeasureEncoding = measures.some((item)=>item.encoding);
|
|
10023
10080
|
const encoding = {};
|
|
10024
|
-
|
|
10025
|
-
|
|
10081
|
+
const hasMulti = hasMultipleMeasureInSingleView(vseedMeasures);
|
|
10082
|
+
if (hasDimensionEncoding) pie_generateDimensionEncoding(dimensions, encoding, hasMulti);
|
|
10083
|
+
else pie_generateDefaultDimensionEncoding(dimensions, encoding, hasMulti);
|
|
10026
10084
|
if (hasMeasureEncoding) pie_generateMeasureEncoding(measures, encoding);
|
|
10027
10085
|
else pie_generateDefaultMeasureEncoding(measures, encoding);
|
|
10028
10086
|
return {
|
|
@@ -10030,9 +10088,10 @@
|
|
|
10030
10088
|
encoding
|
|
10031
10089
|
};
|
|
10032
10090
|
};
|
|
10033
|
-
const pie_generateDefaultDimensionEncoding = (dimensions, encoding)=>{
|
|
10091
|
+
const pie_generateDefaultDimensionEncoding = (dimensions, encoding, isMultiMeasure)=>{
|
|
10034
10092
|
const uniqueDimIds = chunk_QJLMYOTX_i(dimensions.map((d)=>d.id));
|
|
10035
|
-
encoding.color = uniqueDimIds.slice(0);
|
|
10093
|
+
if (isMultiMeasure) encoding.color = uniqueDimIds.slice(0);
|
|
10094
|
+
else encoding.color = uniqueDimIds.filter((d)=>d !== MeasureId);
|
|
10036
10095
|
encoding.detail = encoding.color;
|
|
10037
10096
|
encoding.tooltip = uniqueDimIds.filter((d)=>d !== MeasureId);
|
|
10038
10097
|
encoding.label = [];
|
|
@@ -10075,11 +10134,11 @@
|
|
|
10075
10134
|
defaultDimensions_defaultDimensions,
|
|
10076
10135
|
defaultMeasureId_defaultMeasureId,
|
|
10077
10136
|
encodingAdapter([
|
|
10078
|
-
|
|
10079
|
-
|
|
10137
|
+
buildMeasures,
|
|
10138
|
+
defaultEncodingForPie
|
|
10080
10139
|
], [
|
|
10081
|
-
encodingForPie,
|
|
10082
10140
|
buildMeasures,
|
|
10141
|
+
encodingForPie,
|
|
10083
10142
|
pickMeasuresForReshape([
|
|
10084
10143
|
'tooltip',
|
|
10085
10144
|
'label',
|
|
@@ -10236,11 +10295,11 @@
|
|
|
10236
10295
|
defaultDimensions_defaultDimensions,
|
|
10237
10296
|
defaultMeasureId_defaultMeasureId,
|
|
10238
10297
|
encodingAdapter([
|
|
10239
|
-
|
|
10240
|
-
|
|
10298
|
+
buildMeasures,
|
|
10299
|
+
defaultEncodingForPie
|
|
10241
10300
|
], [
|
|
10242
|
-
encodingForPie,
|
|
10243
10301
|
buildMeasures,
|
|
10302
|
+
encodingForPie,
|
|
10244
10303
|
pickMeasuresForReshape([
|
|
10245
10304
|
'tooltip',
|
|
10246
10305
|
'label',
|
|
@@ -11749,7 +11808,7 @@
|
|
|
11749
11808
|
unfoldInfo = res.unfoldInfo;
|
|
11750
11809
|
}
|
|
11751
11810
|
const reshapeInfo = {
|
|
11752
|
-
id: groupId
|
|
11811
|
+
id: `${groupId}`,
|
|
11753
11812
|
index,
|
|
11754
11813
|
foldInfo,
|
|
11755
11814
|
unfoldInfo
|
|
@@ -11939,16 +11998,127 @@
|
|
|
11939
11998
|
defaultContent
|
|
11940
11999
|
];
|
|
11941
12000
|
};
|
|
11942
|
-
const
|
|
11943
|
-
|
|
11944
|
-
|
|
11945
|
-
|
|
11946
|
-
|
|
11947
|
-
|
|
11948
|
-
|
|
11949
|
-
|
|
12001
|
+
const colorBoxPlotStyleFill = (stylePipe)=>(spec, context)=>{
|
|
12002
|
+
const result = stylePipe(spec, context);
|
|
12003
|
+
const { advancedVSeed, vseed } = context;
|
|
12004
|
+
const { datasetReshapeInfo } = advancedVSeed;
|
|
12005
|
+
const { unfoldInfo } = datasetReshapeInfo[0];
|
|
12006
|
+
if (isLinearColor(advancedVSeed, vseed)) {
|
|
12007
|
+
if (result?.boxPlot?.style) result.boxPlot.style.fill = {
|
|
12008
|
+
field: unfoldInfo.encodingColor,
|
|
12009
|
+
scale: 'color'
|
|
12010
|
+
};
|
|
12011
|
+
}
|
|
12012
|
+
return result;
|
|
12013
|
+
};
|
|
12014
|
+
const boxPlotStyle_boxPlotStyle = (spec, context)=>{
|
|
12015
|
+
const { advancedVSeed, vseed } = context;
|
|
12016
|
+
const { markStyle, config } = advancedVSeed;
|
|
12017
|
+
const { boxPlotStyle } = markStyle;
|
|
12018
|
+
const theme = config?.[vseed.chartType]?.boxPlotStyle;
|
|
12019
|
+
const result = {
|
|
12020
|
+
...spec,
|
|
12021
|
+
boxPlot: {
|
|
12022
|
+
style: {
|
|
12023
|
+
shaftShape: 'filled-line',
|
|
12024
|
+
visible: true,
|
|
12025
|
+
shaftWidth: '50%',
|
|
12026
|
+
stroke: theme?.boxBorderColor
|
|
12027
|
+
}
|
|
12028
|
+
}
|
|
12029
|
+
};
|
|
12030
|
+
if (chunk_JK3VNB42_n(boxPlotStyle) || chunk_VCYTMP4D_n(boxPlotStyle)) return result;
|
|
12031
|
+
const boxPlotStyles = Array.isArray(boxPlotStyle) ? boxPlotStyle : [
|
|
12032
|
+
boxPlotStyle
|
|
12033
|
+
];
|
|
12034
|
+
const customMap = boxPlotStyles.reduce((result, style, index)=>{
|
|
12035
|
+
const { boxColor, boxColorOpacity, boxBorderColor, boxBorderWidth = 1, boxVisible = true, boxBorderOpacity } = style;
|
|
12036
|
+
return {
|
|
12037
|
+
...result,
|
|
12038
|
+
[`custom${index + 1}`]: {
|
|
12039
|
+
level: index + 1,
|
|
12040
|
+
filter: (datum)=>{
|
|
12041
|
+
if (selector_selector(datum, style.selector)) return true;
|
|
12042
|
+
return false;
|
|
12043
|
+
},
|
|
12044
|
+
style: {
|
|
12045
|
+
visible: boxVisible,
|
|
12046
|
+
fill: boxColor,
|
|
12047
|
+
fillOpacity: boxColorOpacity,
|
|
12048
|
+
lineWidth: boxBorderWidth,
|
|
12049
|
+
stroke: boxBorderColor,
|
|
12050
|
+
strokeOpacity: boxBorderOpacity
|
|
12051
|
+
}
|
|
12052
|
+
}
|
|
12053
|
+
};
|
|
12054
|
+
}, {});
|
|
12055
|
+
result.boxPlot.state = {
|
|
12056
|
+
...result.boxPlot.state,
|
|
12057
|
+
...customMap
|
|
12058
|
+
};
|
|
12059
|
+
return result;
|
|
12060
|
+
};
|
|
12061
|
+
const outlierStyle_outlierStyle = (spec, context)=>{
|
|
12062
|
+
const { advancedVSeed, vseed } = context;
|
|
12063
|
+
const { markStyle, config } = advancedVSeed;
|
|
12064
|
+
const { outlierStyle } = markStyle;
|
|
12065
|
+
const theme = config?.[vseed.chartType]?.outlierStyle;
|
|
12066
|
+
const result = {
|
|
12067
|
+
...spec,
|
|
12068
|
+
outlier: {
|
|
12069
|
+
style: {
|
|
12070
|
+
fill: theme?.pointColor
|
|
12071
|
+
}
|
|
12072
|
+
}
|
|
12073
|
+
};
|
|
12074
|
+
if (chunk_JK3VNB42_n(outlierStyle) || chunk_VCYTMP4D_n(outlierStyle)) return result;
|
|
12075
|
+
const outlierStyles = Array.isArray(outlierStyle) ? outlierStyle : [
|
|
12076
|
+
outlierStyle
|
|
12077
|
+
];
|
|
12078
|
+
const customMap = outlierStyles.reduce((result, style, index)=>{
|
|
12079
|
+
const { pointBorderColor, pointBorderStyle, pointBorderWidth = 1, pointColor, pointColorOpacity, pointSize, pointVisible = true } = style;
|
|
12080
|
+
const lineDash = 'dashed' === pointBorderStyle ? [
|
|
12081
|
+
5,
|
|
12082
|
+
2
|
|
12083
|
+
] : 'dotted' === pointBorderStyle ? [
|
|
12084
|
+
2,
|
|
12085
|
+
5
|
|
12086
|
+
] : [
|
|
12087
|
+
0,
|
|
12088
|
+
0
|
|
12089
|
+
];
|
|
12090
|
+
return {
|
|
12091
|
+
...result,
|
|
12092
|
+
[`custom${index + 1}`]: {
|
|
12093
|
+
level: index + 1,
|
|
12094
|
+
filter: (datum)=>{
|
|
12095
|
+
if (selector_selector(datum, style.selector)) return true;
|
|
12096
|
+
return false;
|
|
12097
|
+
},
|
|
12098
|
+
style: {
|
|
12099
|
+
visible: pointVisible,
|
|
12100
|
+
size: pointSize,
|
|
12101
|
+
fill: pointColor,
|
|
12102
|
+
fillOpacity: pointColorOpacity,
|
|
12103
|
+
innerBorder: {
|
|
12104
|
+
stroke: pointBorderColor,
|
|
12105
|
+
lineWidth: pointBorderWidth,
|
|
12106
|
+
distance: (pointBorderWidth || 0) / 2,
|
|
12107
|
+
lineDash: lineDash
|
|
12108
|
+
}
|
|
12109
|
+
}
|
|
12110
|
+
}
|
|
12111
|
+
};
|
|
12112
|
+
}, {});
|
|
12113
|
+
return {
|
|
12114
|
+
...result,
|
|
12115
|
+
outlier: {
|
|
12116
|
+
...result.outlier,
|
|
12117
|
+
state: {
|
|
12118
|
+
...customMap
|
|
12119
|
+
}
|
|
12120
|
+
}
|
|
11950
12121
|
};
|
|
11951
|
-
return normalLegend;
|
|
11952
12122
|
};
|
|
11953
12123
|
const pipeline_boxplot_boxplot = [
|
|
11954
12124
|
initBoxplot,
|
|
@@ -11961,9 +12131,10 @@
|
|
|
11961
12131
|
yLinear,
|
|
11962
12132
|
label_label,
|
|
11963
12133
|
tooltipBoxplot,
|
|
11964
|
-
colorAdapter(
|
|
12134
|
+
colorAdapter(discreteLegend, colorLegend),
|
|
11965
12135
|
verticalCrosshairRect,
|
|
11966
|
-
|
|
12136
|
+
colorBoxPlotStyleFill(boxPlotStyle_boxPlotStyle),
|
|
12137
|
+
outlierStyle_outlierStyle,
|
|
11967
12138
|
annotationPoint_annotationPoint,
|
|
11968
12139
|
annotationVerticalLine_annotationVerticalLine,
|
|
11969
12140
|
annotationHorizontalLine_annotationHorizontalLine,
|
|
@@ -11984,7 +12155,8 @@
|
|
|
11984
12155
|
pivotAxisStyle(yLinear),
|
|
11985
12156
|
label_label,
|
|
11986
12157
|
tooltipBoxplot,
|
|
11987
|
-
|
|
12158
|
+
colorBoxPlotStyleFill(boxPlotStyle_boxPlotStyle),
|
|
12159
|
+
outlierStyle_outlierStyle,
|
|
11988
12160
|
verticalCrosshairRect,
|
|
11989
12161
|
annotationPoint_annotationPoint,
|
|
11990
12162
|
annotationVerticalLine_annotationVerticalLine,
|
|
@@ -12462,7 +12634,7 @@
|
|
|
12462
12634
|
unfoldInfo = res.unfoldInfo;
|
|
12463
12635
|
}
|
|
12464
12636
|
const reshapeInfo = {
|
|
12465
|
-
id: groupId
|
|
12637
|
+
id: `${groupId}`,
|
|
12466
12638
|
index,
|
|
12467
12639
|
foldInfo,
|
|
12468
12640
|
unfoldInfo
|
|
@@ -12480,7 +12652,6 @@
|
|
|
12480
12652
|
initAdvancedVSeed_initAdvancedVSeed,
|
|
12481
12653
|
default_defaultMeasures_defaultMeasures,
|
|
12482
12654
|
defaultDimensions_defaultDimensions,
|
|
12483
|
-
defaultMeasureId_defaultMeasureId,
|
|
12484
12655
|
histogramConfig,
|
|
12485
12656
|
encodingAdapter([
|
|
12486
12657
|
defaultEncodingForHistogram,
|
|
@@ -12750,6 +12921,7 @@
|
|
|
12750
12921
|
const { chartType, encoding = {}, dimensions, regressionLine } = advancedVSeed;
|
|
12751
12922
|
const { dataset } = vseed;
|
|
12752
12923
|
const lineTheme = advancedVSeed.config[chartType]?.regressionLine;
|
|
12924
|
+
const binValueType = advancedVSeed.config[chartType]?.binValueType;
|
|
12753
12925
|
if (!regressionLine || !regressionLine.kdeRegressionLine) return result;
|
|
12754
12926
|
const rowColumnFields = T(dimensions.filter((dim)=>'row' === dim.encoding || 'column' === dim.encoding), (item)=>item.id);
|
|
12755
12927
|
const lineList = array_array(regressionLine.kdeRegressionLine).filter((kdeLine)=>false !== kdeLine.enable);
|
|
@@ -12782,7 +12954,10 @@
|
|
|
12782
12954
|
});
|
|
12783
12955
|
const N = Math.max(3, Math.floor(simpleData.length / 4));
|
|
12784
12956
|
const lineData = res.evaluateGrid(N);
|
|
12785
|
-
const scaleR = (k)=>
|
|
12957
|
+
const scaleR = (k)=>{
|
|
12958
|
+
if ('percentage' === binValueType) return scaleY.scale(k * res.bandwidth);
|
|
12959
|
+
return scaleY.scale(k * simpleData.length * res.bandwidth);
|
|
12960
|
+
};
|
|
12786
12961
|
const linePoints = lineData.map((ld)=>{
|
|
12787
12962
|
const d = {
|
|
12788
12963
|
[fieldX]: ld.x
|
|
@@ -12823,6 +12998,7 @@
|
|
|
12823
12998
|
interactive: false,
|
|
12824
12999
|
zIndex: 500,
|
|
12825
13000
|
dataId: spec.data?.id,
|
|
13001
|
+
dataKey: ()=>`kdeRegressionLine-label-${lineIndex}`,
|
|
12826
13002
|
style: {
|
|
12827
13003
|
textAlign: 'end',
|
|
12828
13004
|
fill: textColor ?? theme.textColor,
|
|
@@ -12963,6 +13139,7 @@
|
|
|
12963
13139
|
interactive: false,
|
|
12964
13140
|
zIndex: 500,
|
|
12965
13141
|
dataId: spec.data?.id,
|
|
13142
|
+
dataKey: ()=>`ecdfRegressionLine-label-${lineIndex}`,
|
|
12966
13143
|
style: {
|
|
12967
13144
|
textAlign: 'end',
|
|
12968
13145
|
fill: textColor ?? theme.textColor,
|
|
@@ -13072,9 +13249,9 @@
|
|
|
13072
13249
|
const getDarkCrosshairRect = ()=>({
|
|
13073
13250
|
visible: true,
|
|
13074
13251
|
labelVisible: true,
|
|
13075
|
-
labelColor: '#
|
|
13076
|
-
labelBackgroundColor: '#
|
|
13077
|
-
rectColor: '#
|
|
13252
|
+
labelColor: '#ffffff',
|
|
13253
|
+
labelBackgroundColor: '#404349',
|
|
13254
|
+
rectColor: '#4B4F54'
|
|
13078
13255
|
});
|
|
13079
13256
|
const getLightCrosshairLine = ()=>({
|
|
13080
13257
|
visible: true,
|
|
@@ -13088,7 +13265,7 @@
|
|
|
13088
13265
|
labelVisible: true,
|
|
13089
13266
|
labelColor: '#ffffff',
|
|
13090
13267
|
labelBackgroundColor: '#364159',
|
|
13091
|
-
rectColor: '#
|
|
13268
|
+
rectColor: '#D9DDE4'
|
|
13092
13269
|
});
|
|
13093
13270
|
const getLightColorScheme = ()=>[
|
|
13094
13271
|
'#8D72F6',
|
|
@@ -13218,12 +13395,14 @@
|
|
|
13218
13395
|
});
|
|
13219
13396
|
const getLightPivotChartGridConfig = ()=>{
|
|
13220
13397
|
const res = pickPivotChartGridConfig(getLightTableConfig());
|
|
13398
|
+
res.hoverHeaderInlineBackgroundColor = '#D9DDE446';
|
|
13221
13399
|
res.chartGridColor = '#F0F1F6';
|
|
13222
13400
|
res.axisLabelColor = '#BCC1CB';
|
|
13223
13401
|
return res;
|
|
13224
13402
|
};
|
|
13225
13403
|
const getDarkPivotChartGridConfig = ()=>{
|
|
13226
13404
|
const res = pickPivotChartGridConfig(getDarkTableConfig());
|
|
13405
|
+
res.hoverHeaderInlineBackgroundColor = '#4b4f5446';
|
|
13227
13406
|
return res;
|
|
13228
13407
|
};
|
|
13229
13408
|
const getDefaultTooltip = ()=>({
|
|
@@ -13282,11 +13461,11 @@
|
|
|
13282
13461
|
visible: false,
|
|
13283
13462
|
tickInside: false,
|
|
13284
13463
|
tickSize: 4,
|
|
13285
|
-
tickColor: '#
|
|
13464
|
+
tickColor: '#E3E5EB'
|
|
13286
13465
|
},
|
|
13287
13466
|
line: {
|
|
13288
13467
|
visible: false,
|
|
13289
|
-
lineColor: '#
|
|
13468
|
+
lineColor: '#E3E5EB',
|
|
13290
13469
|
lineWidth: 1
|
|
13291
13470
|
}
|
|
13292
13471
|
});
|
|
@@ -13328,11 +13507,11 @@
|
|
|
13328
13507
|
visible: false,
|
|
13329
13508
|
tickInside: false,
|
|
13330
13509
|
tickSize: 4,
|
|
13331
|
-
tickColor: '#
|
|
13510
|
+
tickColor: '#E3E5EB'
|
|
13332
13511
|
},
|
|
13333
13512
|
line: {
|
|
13334
13513
|
visible: true,
|
|
13335
|
-
lineColor: '#
|
|
13514
|
+
lineColor: '#E3E5EB',
|
|
13336
13515
|
lineWidth: 1
|
|
13337
13516
|
}
|
|
13338
13517
|
});
|
|
@@ -13593,6 +13772,18 @@
|
|
|
13593
13772
|
confidenceIntervalOpacity: 0.2
|
|
13594
13773
|
}
|
|
13595
13774
|
});
|
|
13775
|
+
const getLightBoxPlotStyle = ()=>({
|
|
13776
|
+
boxBorderColor: '#e3e5eb'
|
|
13777
|
+
});
|
|
13778
|
+
const getDarkBoxPlotStyle = ()=>({
|
|
13779
|
+
boxBorderColor: '#4b4e53'
|
|
13780
|
+
});
|
|
13781
|
+
const getLightOutlierStyle = ()=>({
|
|
13782
|
+
pointColor: '#8F959E'
|
|
13783
|
+
});
|
|
13784
|
+
const getDarkOutlierStyle = ()=>({
|
|
13785
|
+
pointColor: '#36393e'
|
|
13786
|
+
});
|
|
13596
13787
|
const lightTheme = ()=>{
|
|
13597
13788
|
const linearAxis = getLightLinearAxis();
|
|
13598
13789
|
const bandAxis = getLightBandAxis();
|
|
@@ -13857,7 +14048,9 @@
|
|
|
13857
14048
|
yAxis: linearAxis,
|
|
13858
14049
|
crosshairRect,
|
|
13859
14050
|
pivotGrid: getLightPivotChartGridConfig(),
|
|
13860
|
-
annotation: getLightAnnotation()
|
|
14051
|
+
annotation: getLightAnnotation(),
|
|
14052
|
+
boxPlotStyle: getLightBoxPlotStyle(),
|
|
14053
|
+
outlierStyle: getLightOutlierStyle()
|
|
13861
14054
|
}
|
|
13862
14055
|
}
|
|
13863
14056
|
};
|
|
@@ -14120,7 +14313,9 @@
|
|
|
14120
14313
|
yAxis: linearAxis,
|
|
14121
14314
|
crosshairRect: crosshairRect,
|
|
14122
14315
|
pivotGrid: getDarkPivotChartGridConfig(),
|
|
14123
|
-
annotation: getDarkAnnotation()
|
|
14316
|
+
annotation: getDarkAnnotation(),
|
|
14317
|
+
boxPlotStyle: getDarkBoxPlotStyle(),
|
|
14318
|
+
outlierStyle: getDarkOutlierStyle()
|
|
14124
14319
|
}
|
|
14125
14320
|
}
|
|
14126
14321
|
};
|
|
@@ -16909,11 +17104,11 @@
|
|
|
16909
17104
|
arg
|
|
16910
17105
|
]);
|
|
16911
17106
|
inst.and = (arg)=>intersection(inst, arg);
|
|
16912
|
-
inst.transform = (tx)=>
|
|
17107
|
+
inst.transform = (tx)=>schemas_pipe(inst, transform(tx));
|
|
16913
17108
|
inst.default = (def)=>schemas_default(inst, def);
|
|
16914
17109
|
inst.prefault = (def)=>prefault(inst, def);
|
|
16915
17110
|
inst.catch = (params)=>schemas_catch(inst, params);
|
|
16916
|
-
inst.pipe = (target)=>
|
|
17111
|
+
inst.pipe = (target)=>schemas_pipe(inst, target);
|
|
16917
17112
|
inst.readonly = ()=>readonly(inst);
|
|
16918
17113
|
inst.describe = (description)=>{
|
|
16919
17114
|
const cl = inst.clone();
|
|
@@ -17425,7 +17620,7 @@
|
|
|
17425
17620
|
inst.in = def.in;
|
|
17426
17621
|
inst.out = def.out;
|
|
17427
17622
|
});
|
|
17428
|
-
function
|
|
17623
|
+
function schemas_pipe(in_, out) {
|
|
17429
17624
|
return new ZodPipe({
|
|
17430
17625
|
type: "pipe",
|
|
17431
17626
|
in: in_,
|
|
@@ -18414,6 +18609,32 @@
|
|
|
18414
18609
|
});
|
|
18415
18610
|
const zPivotTableConfig = zTableConfig;
|
|
18416
18611
|
const zWhiskersConfig = schemas_number().or(schemas_array(schemas_number())).default(1.5);
|
|
18612
|
+
const zBoxPlotStyle = schemas_object({
|
|
18613
|
+
selector: zSelector.or(zSelectors).nullish(),
|
|
18614
|
+
boxVisible: schemas_boolean().nullish(),
|
|
18615
|
+
boxColor: schemas_string().nullish(),
|
|
18616
|
+
boxColorOpacity: schemas_number().min(0).max(1).nullish(),
|
|
18617
|
+
boxBorderColor: schemas_string().nullish(),
|
|
18618
|
+
boxBorderWidth: schemas_number().min(0).nullish(),
|
|
18619
|
+
boxBorderOpacity: schemas_number().min(0).max(1).nullish()
|
|
18620
|
+
});
|
|
18621
|
+
const zOutlierStyle = schemas_object({
|
|
18622
|
+
selector: union([
|
|
18623
|
+
zSelector,
|
|
18624
|
+
zSelectors
|
|
18625
|
+
]).optional(),
|
|
18626
|
+
pointVisible: schemas_boolean().optional(),
|
|
18627
|
+
pointSize: schemas_number().optional(),
|
|
18628
|
+
pointColor: schemas_string().optional(),
|
|
18629
|
+
pointColorOpacity: schemas_number().min(0).max(1).optional(),
|
|
18630
|
+
pointBorderColor: schemas_string().optional(),
|
|
18631
|
+
pointBorderWidth: schemas_number().min(0).optional(),
|
|
18632
|
+
pointBorderStyle: schemas_enum([
|
|
18633
|
+
'solid',
|
|
18634
|
+
'dashed',
|
|
18635
|
+
'dotted'
|
|
18636
|
+
]).optional()
|
|
18637
|
+
});
|
|
18417
18638
|
const zBoxplotConfig = schemas_object({
|
|
18418
18639
|
backgroundColor: zBackgroundColor.nullish(),
|
|
18419
18640
|
label: zLabel.nullish(),
|
|
@@ -18426,7 +18647,13 @@
|
|
|
18426
18647
|
pivotGrid: zPivotChartGridConfig.nullish(),
|
|
18427
18648
|
annotation: zAnnotationConfig.nullish(),
|
|
18428
18649
|
whiskers: zWhiskersConfig.nullish(),
|
|
18429
|
-
dimensionLinkage: zDimensionLinkage.nullish()
|
|
18650
|
+
dimensionLinkage: zDimensionLinkage.nullish(),
|
|
18651
|
+
boxPlotStyle: zBoxPlotStyle.omit({
|
|
18652
|
+
selector: true
|
|
18653
|
+
}).nullish(),
|
|
18654
|
+
outlierStyle: zOutlierStyle.omit({
|
|
18655
|
+
selector: true
|
|
18656
|
+
}).nullish()
|
|
18430
18657
|
});
|
|
18431
18658
|
const zHistogramConfig = schemas_object({
|
|
18432
18659
|
backgroundColor: zBackgroundColor.nullish(),
|
|
@@ -18545,7 +18772,9 @@
|
|
|
18545
18772
|
barStyle: zBarStyle.or(schemas_array(zBarStyle)).nullish(),
|
|
18546
18773
|
pointStyle: zPointStyle.or(schemas_array(zPointStyle)).nullish(),
|
|
18547
18774
|
lineStyle: zLineStyle.or(schemas_array(zLineStyle)).nullish(),
|
|
18548
|
-
areaStyle: zAreaStyle.or(schemas_array(zAreaStyle)).nullish()
|
|
18775
|
+
areaStyle: zAreaStyle.or(schemas_array(zAreaStyle)).nullish(),
|
|
18776
|
+
boxPlotStyle: zBoxPlotStyle.or(schemas_array(zBoxPlotStyle)).nullish(),
|
|
18777
|
+
outlierStyle: zOutlierStyle.or(schemas_array(zOutlierStyle)).nullish()
|
|
18549
18778
|
});
|
|
18550
18779
|
const zAnnotationVerticalLine = schemas_object({
|
|
18551
18780
|
selector: union([
|
|
@@ -19118,6 +19347,8 @@
|
|
|
19118
19347
|
sort: zSort.nullish(),
|
|
19119
19348
|
sortLegent: zSortLegend.nullish(),
|
|
19120
19349
|
crosshairRect: zCrosshairRect.nullish(),
|
|
19350
|
+
boxPlotStyle: schemas_array(zBoxPlotStyle).or(zBoxPlotStyle).nullish(),
|
|
19351
|
+
outlierStyle: schemas_array(zOutlierStyle).or(zOutlierStyle).nullish(),
|
|
19121
19352
|
theme: zTheme.nullish(),
|
|
19122
19353
|
whiskers: zWhiskersConfig.nullish(),
|
|
19123
19354
|
annotationPoint: schemas_array(zAnnotationPoint).or(zAnnotationPoint).nullish(),
|