@visactor/vchart 1.10.2-alpha.0 → 1.10.2-alpha.2
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.js +19 -13
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/chart/funnel/funnel-transformer.js +1 -0
- package/cjs/chart/funnel/funnel-transformer.js.map +1 -1
- package/cjs/chart/stack.js +1 -2
- package/cjs/compile/grammar-item.js +2 -1
- package/cjs/component/crosshair/base.js +7 -4
- package/cjs/component/crosshair/base.js.map +1 -1
- package/cjs/component/data-zoom/scroll-bar/scroll-bar.js +4 -2
- package/cjs/component/data-zoom/scroll-bar/scroll-bar.js.map +1 -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/event/event-dispatcher.js +7 -3
- package/cjs/event/event-dispatcher.js.map +1 -1
- package/cjs/series/funnel/funnel.js +2 -2
- package/cjs/series/funnel/funnel.js.map +1 -1
- package/cjs/series/funnel/interface.d.ts +1 -0
- package/cjs/series/funnel/interface.js.map +1 -1
- package/cjs/theme/builtin/common/component/crosshair.js +2 -12
- package/cjs/theme/builtin/common/component/crosshair.js.map +1 -1
- package/esm/chart/funnel/funnel-transformer.js +1 -0
- package/esm/chart/funnel/funnel-transformer.js.map +1 -1
- package/esm/chart/stack.js +1 -2
- package/esm/compile/grammar-item.js +2 -1
- package/esm/component/crosshair/base.js +7 -4
- package/esm/component/crosshair/base.js.map +1 -1
- package/esm/component/data-zoom/scroll-bar/scroll-bar.js +5 -1
- package/esm/component/data-zoom/scroll-bar/scroll-bar.js.map +1 -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/event/event-dispatcher.js +7 -3
- package/esm/event/event-dispatcher.js.map +1 -1
- package/esm/series/funnel/funnel.js +2 -2
- package/esm/series/funnel/funnel.js.map +1 -1
- package/esm/series/funnel/interface.d.ts +1 -0
- package/esm/series/funnel/interface.js.map +1 -1
- package/esm/theme/builtin/common/component/crosshair.js +2 -12
- package/esm/theme/builtin/common/component/crosshair.js.map +1 -1
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -26262,6 +26262,7 @@
|
|
|
26262
26262
|
if (!isNil$3(path)) return get$1(target, path, defaultValue);
|
|
26263
26263
|
};
|
|
26264
26264
|
|
|
26265
|
+
const isClose = isNumberClose;
|
|
26265
26266
|
function polarToCartesian$1(point) {
|
|
26266
26267
|
if (!point.radius) {
|
|
26267
26268
|
return { x: 0, y: 0 };
|
|
@@ -52341,11 +52342,9 @@
|
|
|
52341
52342
|
type: 'rect',
|
|
52342
52343
|
visible: true,
|
|
52343
52344
|
style: {
|
|
52344
|
-
lineWidth: 0,
|
|
52345
|
-
stroke: { type: 'palette', key: 'markLineStrokeColor' },
|
|
52346
52345
|
fill: { type: 'palette', key: 'axisGridColor' },
|
|
52347
52346
|
opacity: 0.7,
|
|
52348
|
-
lineDash: [
|
|
52347
|
+
lineDash: []
|
|
52349
52348
|
}
|
|
52350
52349
|
},
|
|
52351
52350
|
label: getLabelSpec()
|
|
@@ -54145,8 +54144,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54145
54144
|
const bubble = bubbles.get(eType);
|
|
54146
54145
|
bubble.addHandler(handler, (_c = handler.filter) === null || _c === void 0 ? void 0 : _c.level);
|
|
54147
54146
|
if (this._isValidEvent(eType) && !listeners.has(eType)) {
|
|
54148
|
-
|
|
54149
|
-
|
|
54147
|
+
const callback = this._onDelegate.bind(this);
|
|
54148
|
+
this._compiler.addEventListener((_d = handler.filter) === null || _d === void 0 ? void 0 : _d.source, eType, callback);
|
|
54149
|
+
listeners.set(eType, callback);
|
|
54150
54150
|
}
|
|
54151
54151
|
return this;
|
|
54152
54152
|
}
|
|
@@ -64188,7 +64188,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
64188
64188
|
registerComponentPlugin(CanvasTooltipHandler);
|
|
64189
64189
|
};
|
|
64190
64190
|
|
|
64191
|
-
const version = "1.10.2-alpha.
|
|
64191
|
+
const version = "1.10.2-alpha.2";
|
|
64192
64192
|
|
|
64193
64193
|
const addVChartProperty = (data, op) => {
|
|
64194
64194
|
const context = op.beforeCall();
|
|
@@ -78916,9 +78916,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
78916
78916
|
const hasTransform = !!this._spec.isTransform;
|
|
78917
78917
|
const gap = hasTransform ? 0 : (_a = this._spec.gap) !== null && _a !== void 0 ? _a : 0;
|
|
78918
78918
|
const transformCount = hasTransform ? Math.max(0, funnelCount - 1) : 0;
|
|
78919
|
-
const
|
|
78919
|
+
const heightRatio = this._spec.heightRatio || 0.5;
|
|
78920
|
+
const funnelHeight = (viewHeight - gap * Math.max(0, funnelCount - 1)) / (funnelCount + heightRatio * transformCount);
|
|
78920
78921
|
if (isTransform) {
|
|
78921
|
-
return hasTransform ? funnelHeight *
|
|
78922
|
+
return hasTransform ? funnelHeight * heightRatio : 0;
|
|
78922
78923
|
}
|
|
78923
78924
|
return funnelHeight;
|
|
78924
78925
|
}
|
|
@@ -85185,7 +85186,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
85185
85186
|
return false;
|
|
85186
85187
|
}
|
|
85187
85188
|
_getDefaultSeriesSpec(spec) {
|
|
85188
|
-
const series = Object.assign(Object.assign({}, super._getDefaultSeriesSpec(spec)), { categoryField: spec.categoryField, valueField: spec.valueField, seriesField: spec.seriesField, funnelAlign: spec.funnelAlign, funnelOrient: spec.funnelOrient, shape: spec.shape, funnel: spec.funnel, transform: spec.transform, outerLabel: spec.outerLabel, transformLabel: spec.transformLabel, isTransform: spec.isTransform, maxSize: spec.maxSize, minSize: spec.minSize, gap: spec.gap, isCone: spec.isCone, range: spec.range });
|
|
85189
|
+
const series = Object.assign(Object.assign({}, super._getDefaultSeriesSpec(spec)), { categoryField: spec.categoryField, valueField: spec.valueField, seriesField: spec.seriesField, funnelAlign: spec.funnelAlign, funnelOrient: spec.funnelOrient, heightRatio: spec.heightRatio, shape: spec.shape, funnel: spec.funnel, transform: spec.transform, outerLabel: spec.outerLabel, transformLabel: spec.transformLabel, isTransform: spec.isTransform, maxSize: spec.maxSize, minSize: spec.minSize, gap: spec.gap, isCone: spec.isCone, range: spec.range });
|
|
85189
85190
|
const seriesType = this.seriesType;
|
|
85190
85191
|
if (seriesType) {
|
|
85191
85192
|
series.type = seriesType;
|
|
@@ -89838,9 +89839,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89838
89839
|
}
|
|
89839
89840
|
else {
|
|
89840
89841
|
const style = line.style || {};
|
|
89841
|
-
const { stroke, fill, lineWidth } =
|
|
89842
|
+
const _d = style, { strokeOpacity, fillOpacity, opacity, stroke, fill, lineWidth } = _d, restStyle = __rest$7(_d, ["strokeOpacity", "fillOpacity", "opacity", "stroke", "fill", "lineWidth"]);
|
|
89842
89843
|
const isLineType = hair.type === 'line';
|
|
89843
|
-
|
|
89844
|
+
let finalOpacity = isLineType ? strokeOpacity : fillOpacity;
|
|
89845
|
+
if (isNumber$3(opacity)) {
|
|
89846
|
+
finalOpacity = (finalOpacity !== null && finalOpacity !== void 0 ? finalOpacity : 1) * opacity;
|
|
89847
|
+
}
|
|
89848
|
+
hair.style = Object.assign({ opacity: finalOpacity, pickable: false, visible: true }, restStyle);
|
|
89844
89849
|
if (isLineType) {
|
|
89845
89850
|
hair.style.stroke = stroke || fill;
|
|
89846
89851
|
hair.style.lineWidth = get$1(line, 'width', lineWidth || 2);
|
|
@@ -89863,7 +89868,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89863
89868
|
if (!!label.visible) {
|
|
89864
89869
|
const labelBackground = label.labelBackground || {};
|
|
89865
89870
|
const labelStyle = label.style || {};
|
|
89866
|
-
const
|
|
89871
|
+
const _e = labelBackground.style || {}, { fill: rectFill = 'rgba(47, 59, 82, 0.9)', stroke: rectStroke, outerBorder } = _e, rectStyle = __rest$7(_e, ["fill", "stroke", "outerBorder"]);
|
|
89867
89872
|
hair.label = {
|
|
89868
89873
|
visible: true,
|
|
89869
89874
|
formatMethod: label.formatMethod,
|
|
@@ -91944,7 +91949,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
91944
91949
|
}
|
|
91945
91950
|
_handleChange(start, end, updateComponent) {
|
|
91946
91951
|
super._handleChange(start, end, updateComponent);
|
|
91947
|
-
|
|
91952
|
+
const isSameScrollValue = isClose(this._start, start) && isClose(this._end, end);
|
|
91953
|
+
if (this._shouldChange && !isSameScrollValue) {
|
|
91948
91954
|
if (updateComponent && this._component) {
|
|
91949
91955
|
this._component.setAttribute('range', [start, end]);
|
|
91950
91956
|
}
|