@visactor/vseed 0.2.8 → 0.2.9
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 +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/builder/builder/builder.d.ts +10 -10
- package/dist/esm/pipeline/spec/chart/pipeline/boxplot.js +3 -3
- package/dist/esm/pipeline/spec/chart/pipeline/boxplot.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/label/index.d.ts +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/label/index.js +2 -1
- package/dist/esm/pipeline/spec/chart/pipes/label/label.d.ts +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/label/label.js +4 -2
- package/dist/esm/pipeline/spec/chart/pipes/label/label.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/label/labelBoxPlot.d.ts +2 -0
- package/dist/esm/pipeline/spec/chart/pipes/label/labelBoxPlot.js +21 -0
- package/dist/esm/pipeline/spec/chart/pipes/label/labelBoxPlot.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/boxPlotStyle.js +7 -5
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/boxPlotStyle.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/outlierStyle.js +3 -6
- package/dist/esm/pipeline/spec/chart/pipes/markStyle/outlierStyle.js.map +1 -1
- package/dist/esm/theme/common/boxPlot.js +10 -7
- package/dist/esm/theme/common/boxPlot.js.map +1 -1
- package/dist/esm/types/advancedVSeed.d.ts +4 -4
- package/dist/esm/types/chartType/boxPlot/zBoxPlot.d.ts +2 -2
- package/dist/esm/types/properties/config/boxplot.d.ts +1 -1
- package/dist/esm/types/properties/config/config.d.ts +1 -1
- package/dist/esm/types/properties/markStyle/boxPlotStyle.d.ts +5 -5
- package/dist/esm/types/properties/markStyle/boxPlotStyle.js +2 -2
- package/dist/esm/types/properties/markStyle/boxPlotStyle.js.map +1 -1
- package/dist/esm/types/properties/markStyle/markStyle.d.ts +2 -2
- package/dist/esm/types/properties/theme/customTheme.d.ts +2 -2
- package/dist/esm/types/zVseed.d.ts +2 -2
- package/dist/umd/index.js +44 -24
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -18075,8 +18075,8 @@ export declare const zVSeed: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
18075
18075
|
boxBorderWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
18076
18076
|
boxBorderOpacity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
18077
18077
|
boxCornerRadius: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
18078
|
-
whiskerBorderColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
18079
18078
|
medianBorderColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
18079
|
+
whiskerBorderColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
18080
18080
|
}, z.core.$strip>>, z.ZodObject<{
|
|
18081
18081
|
selector: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
|
18082
18082
|
field: z.ZodString;
|
|
@@ -18154,8 +18154,8 @@ export declare const zVSeed: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
18154
18154
|
boxBorderWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
18155
18155
|
boxBorderOpacity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
18156
18156
|
boxCornerRadius: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
18157
|
-
whiskerBorderColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
18158
18157
|
medianBorderColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
18158
|
+
whiskerBorderColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
18159
18159
|
}, z.core.$strip>]>>>;
|
|
18160
18160
|
outlierStyle: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodArray<z.ZodObject<{
|
|
18161
18161
|
selector: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
package/dist/umd/index.js
CHANGED
|
@@ -3745,9 +3745,11 @@
|
|
|
3745
3745
|
const measure = findMeasureById(advancedVSeedMeasures, datum[measureId]);
|
|
3746
3746
|
if (measure) {
|
|
3747
3747
|
const measureValueLabel = generateMeasureValue(datum[measureValue], measure, autoFormat, numFormat);
|
|
3748
|
-
const measurePercentLabel = chunk_6GTAPB47_e(datum['__VCHART_ARC_RATIO']) ? generateMeasurePercent(datum['__VCHART_ARC_RATIO'], 1, percentFormatter) : generateMeasurePercent(datum[measureValue], statistics.sum, percentFormatter);
|
|
3749
3748
|
if (showValue) result.push(measureValueLabel);
|
|
3750
|
-
if (showValuePercent)
|
|
3749
|
+
if (showValuePercent) {
|
|
3750
|
+
if (chunk_6GTAPB47_e(datum['__VCHART_ARC_RATIO'])) result.push(generateMeasurePercent(datum['__VCHART_ARC_RATIO'], 1, percentFormatter));
|
|
3751
|
+
else if (statistics && chunk_6GTAPB47_e(statistics.sum)) result.push(generateMeasurePercent(datum[measureValue], statistics.sum, percentFormatter));
|
|
3752
|
+
}
|
|
3751
3753
|
}
|
|
3752
3754
|
});
|
|
3753
3755
|
result.push(...meaLabels);
|
|
@@ -11922,6 +11924,22 @@
|
|
|
11922
11924
|
}
|
|
11923
11925
|
};
|
|
11924
11926
|
};
|
|
11927
|
+
const labelBoxPlot = (spec, context)=>{
|
|
11928
|
+
const result = {
|
|
11929
|
+
...spec
|
|
11930
|
+
};
|
|
11931
|
+
const { advancedVSeed, vseed } = context;
|
|
11932
|
+
const { chartType, encoding } = advancedVSeed;
|
|
11933
|
+
const baseConfig = advancedVSeed.config[chartType];
|
|
11934
|
+
const { label } = baseConfig;
|
|
11935
|
+
result.label = buildLabel(label, vseed.measures, vseed.dimensions, advancedVSeed.dimensions, advancedVSeed.measures, encoding, [
|
|
11936
|
+
{
|
|
11937
|
+
measureId: FoldMeasureId,
|
|
11938
|
+
measureValue: MedianMeasureId
|
|
11939
|
+
}
|
|
11940
|
+
]);
|
|
11941
|
+
return result;
|
|
11942
|
+
};
|
|
11925
11943
|
const boxPlotMeasureKeys = [
|
|
11926
11944
|
UpperWhisker,
|
|
11927
11945
|
"__Q3__",
|
|
@@ -12080,9 +12098,8 @@
|
|
|
12080
12098
|
shaftShape: 'filled-line',
|
|
12081
12099
|
visible: true,
|
|
12082
12100
|
shaftWidth: '50%',
|
|
12083
|
-
stroke: theme?.
|
|
12101
|
+
stroke: theme?.whiskerBorderColor,
|
|
12084
12102
|
boxStroke: theme?.boxBorderColor,
|
|
12085
|
-
whiskerStroke: theme?.whiskerBorderColor,
|
|
12086
12103
|
boxCornerRadius: theme?.boxCornerRadius,
|
|
12087
12104
|
medianStroke: theme?.medianBorderColor ?? theme?.boxBorderColor
|
|
12088
12105
|
}
|
|
@@ -12093,7 +12110,7 @@
|
|
|
12093
12110
|
boxPlotStyle
|
|
12094
12111
|
];
|
|
12095
12112
|
const customMap = boxPlotStyles.reduce((result, style, index)=>{
|
|
12096
|
-
const { boxColor, boxColorOpacity, boxBorderColor, boxBorderWidth = 1, boxVisible = true, boxBorderOpacity } = style;
|
|
12113
|
+
const { boxColor, boxColorOpacity, boxBorderColor, boxBorderWidth = 1, boxVisible = true, boxBorderOpacity, medianBorderColor, whiskerBorderColor, boxCornerRadius } = style;
|
|
12097
12114
|
return {
|
|
12098
12115
|
...result,
|
|
12099
12116
|
[`custom${index + 1}`]: {
|
|
@@ -12107,8 +12124,11 @@
|
|
|
12107
12124
|
fill: boxColor,
|
|
12108
12125
|
fillOpacity: boxColorOpacity,
|
|
12109
12126
|
lineWidth: boxBorderWidth,
|
|
12110
|
-
stroke:
|
|
12111
|
-
|
|
12127
|
+
stroke: whiskerBorderColor,
|
|
12128
|
+
boxStroke: boxBorderColor,
|
|
12129
|
+
boxCornerRadius: boxCornerRadius,
|
|
12130
|
+
strokeOpacity: boxBorderOpacity,
|
|
12131
|
+
medianStroke: medianBorderColor ?? boxBorderColor
|
|
12112
12132
|
}
|
|
12113
12133
|
}
|
|
12114
12134
|
};
|
|
@@ -12163,12 +12183,9 @@
|
|
|
12163
12183
|
size: pointSize,
|
|
12164
12184
|
fill: pointColor,
|
|
12165
12185
|
fillOpacity: pointColorOpacity,
|
|
12166
|
-
|
|
12167
|
-
|
|
12168
|
-
|
|
12169
|
-
distance: (pointBorderWidth || 0) / 2,
|
|
12170
|
-
lineDash: lineDash
|
|
12171
|
-
}
|
|
12186
|
+
stroke: pointBorderColor,
|
|
12187
|
+
lineWidth: pointBorderWidth,
|
|
12188
|
+
lineDash: lineDash
|
|
12172
12189
|
}
|
|
12173
12190
|
}
|
|
12174
12191
|
};
|
|
@@ -12194,7 +12211,7 @@
|
|
|
12194
12211
|
progressive,
|
|
12195
12212
|
xBand,
|
|
12196
12213
|
yLinear,
|
|
12197
|
-
|
|
12214
|
+
labelBoxPlot,
|
|
12198
12215
|
tooltipBoxplot,
|
|
12199
12216
|
colorAdapter(discreteLegend, colorLegend),
|
|
12200
12217
|
verticalCrosshairRect,
|
|
@@ -12220,7 +12237,7 @@
|
|
|
12220
12237
|
progressive,
|
|
12221
12238
|
xBand,
|
|
12222
12239
|
pivotAxisStyle(yLinear),
|
|
12223
|
-
|
|
12240
|
+
labelBoxPlot,
|
|
12224
12241
|
tooltipBoxplot,
|
|
12225
12242
|
colorBoxPlotStyleFill(boxPlotStyle_boxPlotStyle),
|
|
12226
12243
|
outlierStyle_outlierStyle,
|
|
@@ -13984,27 +14001,30 @@
|
|
|
13984
14001
|
}
|
|
13985
14002
|
});
|
|
13986
14003
|
const getCommonBoxPlotStyle = ()=>({
|
|
13987
|
-
boxCornerRadius:
|
|
14004
|
+
boxCornerRadius: 2
|
|
13988
14005
|
});
|
|
13989
14006
|
const getLightBoxPlotStyle = ()=>({
|
|
13990
14007
|
...getCommonBoxPlotStyle(),
|
|
13991
|
-
boxBorderColor: '#
|
|
14008
|
+
boxBorderColor: '#606773',
|
|
13992
14009
|
whiskerBorderColor: '#606773'
|
|
13993
14010
|
});
|
|
13994
14011
|
const getDarkBoxPlotStyle = ()=>({
|
|
13995
14012
|
...getCommonBoxPlotStyle(),
|
|
13996
|
-
boxBorderColor: '#
|
|
13997
|
-
whiskerBorderColor: '#
|
|
14013
|
+
boxBorderColor: '#888C93',
|
|
14014
|
+
whiskerBorderColor: '#888C93'
|
|
13998
14015
|
});
|
|
13999
14016
|
const getCommonOutlierStyle = ()=>({
|
|
14000
|
-
|
|
14017
|
+
pointSize: 10,
|
|
14018
|
+
pointBorderWidth: 1.5,
|
|
14001
14019
|
pointColor: 'transparent'
|
|
14002
14020
|
});
|
|
14003
14021
|
const getLightOutlierStyle = ()=>({
|
|
14004
|
-
...getCommonOutlierStyle()
|
|
14022
|
+
...getCommonOutlierStyle(),
|
|
14023
|
+
pointBorderColor: '#606773'
|
|
14005
14024
|
});
|
|
14006
14025
|
const getDarkOutlierStyle = ()=>({
|
|
14007
|
-
...getCommonOutlierStyle()
|
|
14026
|
+
...getCommonOutlierStyle(),
|
|
14027
|
+
pointBorderColor: '#888C93'
|
|
14008
14028
|
});
|
|
14009
14029
|
const lightTheme = ()=>{
|
|
14010
14030
|
const linearAxis = getLightLinearAxis();
|
|
@@ -18867,8 +18887,8 @@
|
|
|
18867
18887
|
boxBorderWidth: schemas_number().min(0).nullish(),
|
|
18868
18888
|
boxBorderOpacity: schemas_number().min(0).max(1).nullish(),
|
|
18869
18889
|
boxCornerRadius: schemas_number().nullish(),
|
|
18870
|
-
|
|
18871
|
-
|
|
18890
|
+
medianBorderColor: schemas_string().nullish(),
|
|
18891
|
+
whiskerBorderColor: schemas_string().nullish()
|
|
18872
18892
|
});
|
|
18873
18893
|
const zOutlierStyle = schemas_object({
|
|
18874
18894
|
selector: union([
|