@visactor/vchart 2.0.11-alpha.8 → 2.0.12-alpha.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/build/es5/index.js +1 -1
- package/build/index.es.js +25 -16
- package/build/index.js +25 -16
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/chart/index.js +1 -1
- package/cjs/chart/stack.js +1 -1
- package/cjs/chart/util.js +1 -1
- package/cjs/constant/attribute.js +1 -2
- package/cjs/constant/correlation.js +2 -1
- package/cjs/constant/waterfall.js +1 -2
- package/cjs/core/factory.js +2 -1
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/index.js.map +1 -1
- package/cjs/core/vchart.js +1 -1
- package/cjs/data/initialize.js +1 -1
- package/cjs/data/register.js +1 -1
- package/cjs/data/transforms/box-plot.d.ts +1 -0
- package/cjs/data/transforms/box-plot.js +3 -2
- package/cjs/data/transforms/box-plot.js.map +1 -1
- package/cjs/mark/box-plot.js +17 -1
- package/cjs/mark/box-plot.js.map +1 -1
- package/cjs/series/box-plot/box-plot.d.ts +4 -3
- package/cjs/series/box-plot/box-plot.js +14 -13
- package/cjs/series/box-plot/box-plot.js.map +1 -1
- package/cjs/typings/visual.d.ts +15 -6
- package/cjs/typings/visual.js.map +1 -1
- package/esm/chart/index.js +1 -1
- package/esm/chart/stack.js +1 -1
- package/esm/chart/util.js +1 -1
- package/esm/constant/attribute.js +1 -2
- package/esm/constant/correlation.js +2 -1
- package/esm/constant/waterfall.js +1 -2
- package/esm/core/factory.js +2 -1
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/index.js.map +1 -1
- package/esm/core/vchart.js +1 -1
- package/esm/data/initialize.js +1 -1
- package/esm/data/register.js +1 -1
- package/esm/data/transforms/box-plot.d.ts +1 -0
- package/esm/data/transforms/box-plot.js +3 -3
- package/esm/data/transforms/box-plot.js.map +1 -1
- package/esm/mark/box-plot.js +17 -1
- package/esm/mark/box-plot.js.map +1 -1
- package/esm/series/box-plot/box-plot.d.ts +4 -3
- package/esm/series/box-plot/box-plot.js +14 -13
- package/esm/series/box-plot/box-plot.js.map +1 -1
- package/esm/typings/visual.d.ts +15 -6
- package/esm/typings/visual.js.map +1 -1
- package/package.json +5 -5
package/build/index.es.js
CHANGED
|
@@ -61672,7 +61672,7 @@ const lookup = (data, opt) => {
|
|
|
61672
61672
|
});
|
|
61673
61673
|
};
|
|
61674
61674
|
|
|
61675
|
-
const version = "2.0.
|
|
61675
|
+
const version = "2.0.11";
|
|
61676
61676
|
|
|
61677
61677
|
const addVChartProperty = (data, op) => {
|
|
61678
61678
|
const context = op.beforeCall();
|
|
@@ -75963,7 +75963,7 @@ var BOX_PLOT_TOOLTIP_KEYS;
|
|
|
75963
75963
|
|
|
75964
75964
|
const foldOutlierData = (data, op) => {
|
|
75965
75965
|
const result = [];
|
|
75966
|
-
const { outliersField, dimensionField } = op;
|
|
75966
|
+
const { outliersField, dimensionField, seriesField } = op;
|
|
75967
75967
|
const latestData = data[0].latestData || [];
|
|
75968
75968
|
latestData.forEach((d) => {
|
|
75969
75969
|
let outlierValues = d[outliersField];
|
|
@@ -75977,6 +75977,9 @@ const foldOutlierData = (data, op) => {
|
|
|
75977
75977
|
dimensionField.forEach(field => {
|
|
75978
75978
|
resData[field] = d[field];
|
|
75979
75979
|
});
|
|
75980
|
+
if (isValid$1(seriesField)) {
|
|
75981
|
+
resData[seriesField] = d[seriesField];
|
|
75982
|
+
}
|
|
75980
75983
|
return resData;
|
|
75981
75984
|
}));
|
|
75982
75985
|
});
|
|
@@ -76347,7 +76350,11 @@ class BoxPlotMark extends GlyphMark {
|
|
|
76347
76350
|
median: { type: 'line', defaultAttributes: { x: 0, y: 0 } }
|
|
76348
76351
|
};
|
|
76349
76352
|
this._positionChannels = BOX_PLOT_CHANNELS;
|
|
76350
|
-
this._channelEncoder =
|
|
76353
|
+
this._channelEncoder = {
|
|
76354
|
+
boxStroke: (val) => ({ box: { stroke: val } }),
|
|
76355
|
+
medianStroke: (val) => ({ median: { stroke: val } }),
|
|
76356
|
+
boxCornerRadius: (val) => ({ box: { cornerRadius: val } })
|
|
76357
|
+
};
|
|
76351
76358
|
this._positionEncoder = (glyphAttrs, datum, g) => {
|
|
76352
76359
|
var _a;
|
|
76353
76360
|
const { x = g.attribute.x, y = g.attribute.y, boxWidth = g.attribute.boxWidth, boxHeight = g.attribute.boxHeight, ruleWidth = g.attribute.ruleWidth, ruleHeight = g.attribute.ruleHeight, q1 = g.attribute.q1, q3 = g.attribute.q3, min = g.attribute.min, max = g.attribute.max, median = g.attribute.median, angle } = glyphAttrs;
|
|
@@ -76823,14 +76830,13 @@ class BoxPlotSeries extends CartesianSeries {
|
|
|
76823
76830
|
if (this._outliersField) {
|
|
76824
76831
|
this._outlierMark = this._createMark(BoxPlotSeries.mark.outlier, {
|
|
76825
76832
|
key: DEFAULT_DATA_INDEX,
|
|
76826
|
-
groupKey: this._seriesField
|
|
76827
|
-
dataView: this._outlierDataView.getDataView(),
|
|
76828
|
-
dataProductId: this._outlierDataView.getProductId()
|
|
76833
|
+
groupKey: this._seriesField
|
|
76829
76834
|
});
|
|
76835
|
+
this._outlierMark.setData(this._outlierData);
|
|
76830
76836
|
}
|
|
76831
76837
|
}
|
|
76832
76838
|
initMarkStyle() {
|
|
76833
|
-
var _a, _b, _c, _d, _e;
|
|
76839
|
+
var _a, _b, _c, _d, _e, _f;
|
|
76834
76840
|
const boxPlotMark = this._boxPlotMark;
|
|
76835
76841
|
if (boxPlotMark) {
|
|
76836
76842
|
const commonBoxplotStyles = {
|
|
@@ -76864,8 +76870,9 @@ class BoxPlotSeries extends CartesianSeries {
|
|
|
76864
76870
|
const outlierMark = this._outlierMark;
|
|
76865
76871
|
if (outlierMark) {
|
|
76866
76872
|
this.setMarkStyle(outlierMark, {
|
|
76867
|
-
fill: (_d = (_c = this._outliersStyle) === null || _c === void 0 ? void 0 : _c.fill) !== null && _d !== void 0 ? _d : this.getColorAttribute(),
|
|
76868
|
-
|
|
76873
|
+
fill: (_e = (_d = (_c = this._outliersStyle) === null || _c === void 0 ? void 0 : _c.fill) !== null && _d !== void 0 ? _d : this._boxFillColor) !== null && _e !== void 0 ? _e : this.getColorAttribute(),
|
|
76874
|
+
stroke: this.getColorAttribute(),
|
|
76875
|
+
size: isNumber$1((_f = this._outliersStyle) === null || _f === void 0 ? void 0 : _f.size) ? this._outliersStyle.size : DEFAULT_OUTLIER_SIZE
|
|
76869
76876
|
}, STATE_VALUE_ENUM.STATE_NORMAL, AttributeLevel.Series);
|
|
76870
76877
|
}
|
|
76871
76878
|
}
|
|
@@ -76942,7 +76949,8 @@ class BoxPlotSeries extends CartesianSeries {
|
|
|
76942
76949
|
type: 'foldOutlierData',
|
|
76943
76950
|
options: {
|
|
76944
76951
|
dimensionField: this._direction === "horizontal" ? this._fieldY : this._fieldX,
|
|
76945
|
-
outliersField: this._outliersField
|
|
76952
|
+
outliersField: this._outliersField,
|
|
76953
|
+
seriesField: this._seriesField
|
|
76946
76954
|
}
|
|
76947
76955
|
});
|
|
76948
76956
|
outlierDataView.transform({
|
|
@@ -76952,12 +76960,17 @@ class BoxPlotSeries extends CartesianSeries {
|
|
|
76952
76960
|
call: addDataKey
|
|
76953
76961
|
}
|
|
76954
76962
|
}, false);
|
|
76955
|
-
this.
|
|
76963
|
+
this._outlierData = new CompilableData(this._option, outlierDataView);
|
|
76956
76964
|
}
|
|
76957
76965
|
compileData() {
|
|
76958
76966
|
var _a;
|
|
76959
76967
|
super.compileData();
|
|
76960
|
-
(_a = this.
|
|
76968
|
+
(_a = this._outlierData) === null || _a === void 0 ? void 0 : _a.compile();
|
|
76969
|
+
}
|
|
76970
|
+
viewDataUpdate(d) {
|
|
76971
|
+
var _a;
|
|
76972
|
+
super.viewDataUpdate(d);
|
|
76973
|
+
(_a = this._outlierData) === null || _a === void 0 ? void 0 : _a.updateData();
|
|
76961
76974
|
}
|
|
76962
76975
|
init(option) {
|
|
76963
76976
|
super.init(option);
|
|
@@ -77079,10 +77092,6 @@ class BoxPlotSeries extends CartesianSeries {
|
|
|
77079
77092
|
}
|
|
77080
77093
|
return fields;
|
|
77081
77094
|
}
|
|
77082
|
-
onEvaluateEnd(ctx) {
|
|
77083
|
-
super.onEvaluateEnd(ctx);
|
|
77084
|
-
this._outlierDataView.updateData();
|
|
77085
|
-
}
|
|
77086
77095
|
getDefaultShapeType() {
|
|
77087
77096
|
return 'square';
|
|
77088
77097
|
}
|
package/build/index.js
CHANGED
|
@@ -61678,7 +61678,7 @@
|
|
|
61678
61678
|
});
|
|
61679
61679
|
};
|
|
61680
61680
|
|
|
61681
|
-
const version = "2.0.
|
|
61681
|
+
const version = "2.0.11";
|
|
61682
61682
|
|
|
61683
61683
|
const addVChartProperty = (data, op) => {
|
|
61684
61684
|
const context = op.beforeCall();
|
|
@@ -75969,7 +75969,7 @@
|
|
|
75969
75969
|
|
|
75970
75970
|
const foldOutlierData = (data, op) => {
|
|
75971
75971
|
const result = [];
|
|
75972
|
-
const { outliersField, dimensionField } = op;
|
|
75972
|
+
const { outliersField, dimensionField, seriesField } = op;
|
|
75973
75973
|
const latestData = data[0].latestData || [];
|
|
75974
75974
|
latestData.forEach((d) => {
|
|
75975
75975
|
let outlierValues = d[outliersField];
|
|
@@ -75983,6 +75983,9 @@
|
|
|
75983
75983
|
dimensionField.forEach(field => {
|
|
75984
75984
|
resData[field] = d[field];
|
|
75985
75985
|
});
|
|
75986
|
+
if (isValid$1(seriesField)) {
|
|
75987
|
+
resData[seriesField] = d[seriesField];
|
|
75988
|
+
}
|
|
75986
75989
|
return resData;
|
|
75987
75990
|
}));
|
|
75988
75991
|
});
|
|
@@ -76353,7 +76356,11 @@
|
|
|
76353
76356
|
median: { type: 'line', defaultAttributes: { x: 0, y: 0 } }
|
|
76354
76357
|
};
|
|
76355
76358
|
this._positionChannels = BOX_PLOT_CHANNELS;
|
|
76356
|
-
this._channelEncoder =
|
|
76359
|
+
this._channelEncoder = {
|
|
76360
|
+
boxStroke: (val) => ({ box: { stroke: val } }),
|
|
76361
|
+
medianStroke: (val) => ({ median: { stroke: val } }),
|
|
76362
|
+
boxCornerRadius: (val) => ({ box: { cornerRadius: val } })
|
|
76363
|
+
};
|
|
76357
76364
|
this._positionEncoder = (glyphAttrs, datum, g) => {
|
|
76358
76365
|
var _a;
|
|
76359
76366
|
const { x = g.attribute.x, y = g.attribute.y, boxWidth = g.attribute.boxWidth, boxHeight = g.attribute.boxHeight, ruleWidth = g.attribute.ruleWidth, ruleHeight = g.attribute.ruleHeight, q1 = g.attribute.q1, q3 = g.attribute.q3, min = g.attribute.min, max = g.attribute.max, median = g.attribute.median, angle } = glyphAttrs;
|
|
@@ -76829,14 +76836,13 @@
|
|
|
76829
76836
|
if (this._outliersField) {
|
|
76830
76837
|
this._outlierMark = this._createMark(BoxPlotSeries.mark.outlier, {
|
|
76831
76838
|
key: DEFAULT_DATA_INDEX,
|
|
76832
|
-
groupKey: this._seriesField
|
|
76833
|
-
dataView: this._outlierDataView.getDataView(),
|
|
76834
|
-
dataProductId: this._outlierDataView.getProductId()
|
|
76839
|
+
groupKey: this._seriesField
|
|
76835
76840
|
});
|
|
76841
|
+
this._outlierMark.setData(this._outlierData);
|
|
76836
76842
|
}
|
|
76837
76843
|
}
|
|
76838
76844
|
initMarkStyle() {
|
|
76839
|
-
var _a, _b, _c, _d, _e;
|
|
76845
|
+
var _a, _b, _c, _d, _e, _f;
|
|
76840
76846
|
const boxPlotMark = this._boxPlotMark;
|
|
76841
76847
|
if (boxPlotMark) {
|
|
76842
76848
|
const commonBoxplotStyles = {
|
|
@@ -76870,8 +76876,9 @@
|
|
|
76870
76876
|
const outlierMark = this._outlierMark;
|
|
76871
76877
|
if (outlierMark) {
|
|
76872
76878
|
this.setMarkStyle(outlierMark, {
|
|
76873
|
-
fill: (_d = (_c = this._outliersStyle) === null || _c === void 0 ? void 0 : _c.fill) !== null && _d !== void 0 ? _d : this.getColorAttribute(),
|
|
76874
|
-
|
|
76879
|
+
fill: (_e = (_d = (_c = this._outliersStyle) === null || _c === void 0 ? void 0 : _c.fill) !== null && _d !== void 0 ? _d : this._boxFillColor) !== null && _e !== void 0 ? _e : this.getColorAttribute(),
|
|
76880
|
+
stroke: this.getColorAttribute(),
|
|
76881
|
+
size: isNumber$1((_f = this._outliersStyle) === null || _f === void 0 ? void 0 : _f.size) ? this._outliersStyle.size : DEFAULT_OUTLIER_SIZE
|
|
76875
76882
|
}, exports.STATE_VALUE_ENUM.STATE_NORMAL, exports.AttributeLevel.Series);
|
|
76876
76883
|
}
|
|
76877
76884
|
}
|
|
@@ -76948,7 +76955,8 @@
|
|
|
76948
76955
|
type: 'foldOutlierData',
|
|
76949
76956
|
options: {
|
|
76950
76957
|
dimensionField: this._direction === "horizontal" ? this._fieldY : this._fieldX,
|
|
76951
|
-
outliersField: this._outliersField
|
|
76958
|
+
outliersField: this._outliersField,
|
|
76959
|
+
seriesField: this._seriesField
|
|
76952
76960
|
}
|
|
76953
76961
|
});
|
|
76954
76962
|
outlierDataView.transform({
|
|
@@ -76958,12 +76966,17 @@
|
|
|
76958
76966
|
call: addDataKey
|
|
76959
76967
|
}
|
|
76960
76968
|
}, false);
|
|
76961
|
-
this.
|
|
76969
|
+
this._outlierData = new CompilableData(this._option, outlierDataView);
|
|
76962
76970
|
}
|
|
76963
76971
|
compileData() {
|
|
76964
76972
|
var _a;
|
|
76965
76973
|
super.compileData();
|
|
76966
|
-
(_a = this.
|
|
76974
|
+
(_a = this._outlierData) === null || _a === void 0 ? void 0 : _a.compile();
|
|
76975
|
+
}
|
|
76976
|
+
viewDataUpdate(d) {
|
|
76977
|
+
var _a;
|
|
76978
|
+
super.viewDataUpdate(d);
|
|
76979
|
+
(_a = this._outlierData) === null || _a === void 0 ? void 0 : _a.updateData();
|
|
76967
76980
|
}
|
|
76968
76981
|
init(option) {
|
|
76969
76982
|
super.init(option);
|
|
@@ -77085,10 +77098,6 @@
|
|
|
77085
77098
|
}
|
|
77086
77099
|
return fields;
|
|
77087
77100
|
}
|
|
77088
|
-
onEvaluateEnd(ctx) {
|
|
77089
|
-
super.onEvaluateEnd(ctx);
|
|
77090
|
-
this._outlierDataView.updateData();
|
|
77091
|
-
}
|
|
77092
77101
|
getDefaultShapeType() {
|
|
77093
77102
|
return 'square';
|
|
77094
77103
|
}
|