@visactor/vchart-extension 2.0.5 → 2.0.6
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/index.js +24 -18
- package/build/index.min.js +2 -2
- package/cjs/charts/3d/rect-3d.js +2 -1
- package/cjs/charts/axis-3d/linear-axis.js +1 -2
- package/cjs/charts/bar-3d/interface.js +2 -1
- package/cjs/charts/candlestick/candlestick.js +1 -2
- package/cjs/charts/candlestick/util.js +1 -1
- package/cjs/charts/combination-candlestick/combination-candlestick-transformer.js +1 -1
- package/cjs/charts/combination-candlestick/combination-candlestick.js +1 -1
- package/cjs/charts/combination-candlestick/constant.js +1 -1
- package/cjs/charts/combination-candlestick/index.js +1 -1
- package/cjs/charts/combination-candlestick/interface.js +1 -1
- package/cjs/charts/conversion-funnel/arrow-data-transform.js +1 -1
- package/cjs/charts/conversion-funnel/constants.js +1 -1
- package/cjs/charts/conversion-funnel/conversion-funnel-transformer.js +1 -1
- package/cjs/charts/conversion-funnel/conversion-funnel.js +1 -1
- package/cjs/charts/conversion-funnel/index.js +1 -1
- package/cjs/charts/conversion-funnel/interface.js +1 -1
- package/cjs/charts/conversion-funnel/util.js +1 -1
- package/cjs/charts/funnel-3d/chart.js +1 -2
- package/cjs/charts/funnel-3d/constant.js +1 -1
- package/cjs/charts/funnel-3d/index.js +1 -1
- package/cjs/charts/funnel-3d/interface.js +1 -1
- package/cjs/charts/funnel-3d/series-spec-transformer.js +1 -1
- package/cjs/charts/funnel-3d/series.js +1 -1
- package/cjs/charts/funnel-3d/theme.js +1 -1
- package/cjs/charts/histogram-3d/chart.js +1 -1
- package/cjs/components/bar-link/bar-link.js +1 -1
- package/cjs/components/bar-link/constant.js +1 -1
- package/cjs/components/bar-link/index.js +1 -1
- package/cjs/components/bar-link/type.js +1 -1
- package/cjs/components/bar-link/util.js +1 -1
- package/cjs/components/map-label/index.js +1 -1
- package/cjs/components/map-label/layout.js +1 -1
- package/cjs/components/map-label/map-label-transformer.js +1 -1
- package/cjs/components/map-label/map-label.js +1 -1
- package/cjs/components/map-label/theme.js +1 -1
- package/cjs/components/map-label/type.js +1 -1
- package/cjs/components/series-break/constant.js +2 -1
- package/cjs/components/series-break/index.js +1 -1
- package/cjs/components/series-break/series-break.js +1 -1
- package/cjs/components/series-break/type.js +1 -1
- package/cjs/components/series-break/util.js +1 -1
- package/cjs/components/series-label/constant.js +1 -1
- package/cjs/components/series-label/index.js +1 -1
- package/cjs/components/series-label/series-label.js +1 -1
- package/cjs/components/series-label/type.js +1 -1
- package/cjs/components/series-label/util.js +1 -1
- package/esm/charts/3d/rect-3d.js +2 -1
- package/esm/charts/axis-3d/linear-axis.js +1 -2
- package/esm/charts/bar-3d/interface.js +2 -1
- package/esm/charts/candlestick/candlestick.js +1 -2
- package/esm/charts/candlestick/util.js +1 -1
- package/esm/charts/combination-candlestick/combination-candlestick-transformer.js +1 -1
- package/esm/charts/combination-candlestick/combination-candlestick.js +1 -1
- package/esm/charts/combination-candlestick/constant.js +1 -1
- package/esm/charts/combination-candlestick/index.js +1 -1
- package/esm/charts/combination-candlestick/interface.js +1 -1
- package/esm/charts/conversion-funnel/arrow-data-transform.js +1 -1
- package/esm/charts/conversion-funnel/constants.js +1 -1
- package/esm/charts/conversion-funnel/conversion-funnel-transformer.js +1 -1
- package/esm/charts/conversion-funnel/conversion-funnel.js +1 -1
- package/esm/charts/conversion-funnel/index.js +1 -1
- package/esm/charts/conversion-funnel/interface.js +1 -1
- package/esm/charts/conversion-funnel/util.js +1 -1
- package/esm/charts/funnel-3d/chart.js +1 -2
- package/esm/charts/funnel-3d/constant.js +1 -1
- package/esm/charts/funnel-3d/index.js +1 -1
- package/esm/charts/funnel-3d/interface.js +1 -1
- package/esm/charts/funnel-3d/series-spec-transformer.js +1 -1
- package/esm/charts/funnel-3d/series.js +1 -1
- package/esm/charts/funnel-3d/theme.js +1 -1
- package/esm/charts/histogram-3d/chart.js +1 -1
- package/esm/components/bar-link/bar-link.js +1 -1
- package/esm/components/bar-link/constant.js +1 -1
- package/esm/components/bar-link/index.js +1 -1
- package/esm/components/bar-link/type.js +1 -1
- package/esm/components/bar-link/util.js +1 -1
- package/esm/components/map-label/index.js +1 -1
- package/esm/components/map-label/layout.js +1 -1
- package/esm/components/map-label/map-label-transformer.js +1 -1
- package/esm/components/map-label/map-label.js +1 -1
- package/esm/components/map-label/theme.js +1 -1
- package/esm/components/map-label/type.js +1 -1
- package/esm/components/series-break/constant.js +2 -1
- package/esm/components/series-break/index.js +1 -1
- package/esm/components/series-break/series-break.js +1 -1
- package/esm/components/series-break/type.js +1 -1
- package/esm/components/series-break/util.js +1 -1
- package/esm/components/series-label/constant.js +1 -1
- package/esm/components/series-label/index.js +1 -1
- package/esm/components/series-label/series-label.js +1 -1
- package/esm/components/series-label/type.js +1 -1
- package/esm/components/series-label/util.js +1 -1
- package/package.json +7 -7
package/build/index.js
CHANGED
|
@@ -5380,7 +5380,15 @@
|
|
|
5380
5380
|
|
|
5381
5381
|
const DEFAULT_TEXT_FONT_FAMILY$1 = "PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,-apple-system,segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol";
|
|
5382
5382
|
|
|
5383
|
-
|
|
5383
|
+
const container = new Container();
|
|
5384
|
+
|
|
5385
|
+
const RenderService = Symbol.for("RenderService");
|
|
5386
|
+
|
|
5387
|
+
class Application {
|
|
5388
|
+
get renderService() {
|
|
5389
|
+
return this._renderService || (this._renderService = container.get(RenderService)), this._renderService;
|
|
5390
|
+
}
|
|
5391
|
+
}
|
|
5384
5392
|
const application = new Application();
|
|
5385
5393
|
|
|
5386
5394
|
let idx = 0;
|
|
@@ -7519,8 +7527,6 @@
|
|
|
7519
7527
|
return result.width += space, result;
|
|
7520
7528
|
}
|
|
7521
7529
|
|
|
7522
|
-
const container = new Container();
|
|
7523
|
-
|
|
7524
7530
|
const CanvasFactory = Symbol.for("CanvasFactory");
|
|
7525
7531
|
|
|
7526
7532
|
function wrapCanvas(params) {
|
|
@@ -11392,7 +11398,7 @@
|
|
|
11392
11398
|
this.cache.layoutData.lines.forEach(item => {
|
|
11393
11399
|
mergedText += item.str;
|
|
11394
11400
|
});
|
|
11395
|
-
return (Array.isArray(text) ? text.join("") : text) !== mergedText;
|
|
11401
|
+
return (Array.isArray(text) ? text.join("") : text).toString() !== mergedText;
|
|
11396
11402
|
}
|
|
11397
11403
|
return "vertical" === attribute.direction && this.cache.verticalList && this.cache.verticalList[0] ? this.cache.verticalList[0].map(item => item.text).join("") !== attribute.text.toString() : null != this.clipedText && this.clipedText !== attribute.text.toString();
|
|
11398
11404
|
}
|
|
@@ -11491,7 +11497,7 @@
|
|
|
11491
11497
|
return fontSize ? .1 * fontSize : 0;
|
|
11492
11498
|
}
|
|
11493
11499
|
updateHorizontalMultilineAABBBounds(text) {
|
|
11494
|
-
var _a;
|
|
11500
|
+
var _a, _b;
|
|
11495
11501
|
const textTheme = this.getGraphicTheme(),
|
|
11496
11502
|
attribute = this.attribute,
|
|
11497
11503
|
{
|
|
@@ -11518,7 +11524,7 @@
|
|
|
11518
11524
|
const bbox = this.cache.layoutData.bbox;
|
|
11519
11525
|
return this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
|
|
11520
11526
|
}
|
|
11521
|
-
const textMeasure = application.graphicUtil.
|
|
11527
|
+
const textMeasure = application.graphicUtil.getTextMeasureInstance(this.textMeasureId || (null === (_b = this.stage) || void 0 === _b ? void 0 : _b.textMeasureId)),
|
|
11522
11528
|
layoutData = new CanvasTextLayout(fontFamily, {
|
|
11523
11529
|
fontSize: fontSize,
|
|
11524
11530
|
fontWeight: fontWeight,
|
|
@@ -11536,7 +11542,7 @@
|
|
|
11536
11542
|
return this.cache.layoutData = layoutData, this.clearUpdateShapeTag(), this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
|
|
11537
11543
|
}
|
|
11538
11544
|
updateWrapAABBBounds(text) {
|
|
11539
|
-
var _a, _b, _c;
|
|
11545
|
+
var _a, _b, _c, _d;
|
|
11540
11546
|
const textTheme = this.getGraphicTheme(),
|
|
11541
11547
|
{
|
|
11542
11548
|
fontFamily = textTheme.fontFamily,
|
|
@@ -11562,7 +11568,7 @@
|
|
|
11562
11568
|
const bbox = this.cache.layoutData.bbox;
|
|
11563
11569
|
return this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
|
|
11564
11570
|
}
|
|
11565
|
-
const textMeasure = application.graphicUtil.
|
|
11571
|
+
const textMeasure = application.graphicUtil.getTextMeasureInstance(this.textMeasureId || (null === (_b = this.stage) || void 0 === _b ? void 0 : _b.textMeasureId)),
|
|
11566
11572
|
textOptions = {
|
|
11567
11573
|
fontSize: fontSize,
|
|
11568
11574
|
fontWeight: fontWeight,
|
|
@@ -11594,7 +11600,7 @@
|
|
|
11594
11600
|
if ("" !== str && "" === clip.str || clip.wordBreaked) {
|
|
11595
11601
|
if (ellipsis) {
|
|
11596
11602
|
const clipEllipsis = textMeasure.clipTextWithSuffix(str, textOptions, maxLineWidth, ellipsis, !1, suffixPosition);
|
|
11597
|
-
clip.str = null !== (
|
|
11603
|
+
clip.str = null !== (_c = clipEllipsis.str) && void 0 !== _c ? _c : "", clip.width = null !== (_d = clipEllipsis.width) && void 0 !== _d ? _d : 0;
|
|
11598
11604
|
} else clip.str = "", clip.width = 0;
|
|
11599
11605
|
needCut = !1;
|
|
11600
11606
|
}
|
|
@@ -11657,9 +11663,9 @@
|
|
|
11657
11663
|
return this.cache.layoutData = layoutData, this.clearUpdateShapeTag(), this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
|
|
11658
11664
|
}
|
|
11659
11665
|
updateVerticalMultilineAABBBounds(text) {
|
|
11660
|
-
var _a, _b;
|
|
11666
|
+
var _a, _b, _c;
|
|
11661
11667
|
const textTheme = this.getGraphicTheme(),
|
|
11662
|
-
textMeasure = application.graphicUtil.
|
|
11668
|
+
textMeasure = application.graphicUtil.getTextMeasureInstance(this.textMeasureId || (null === (_a = this.stage) || void 0 === _a ? void 0 : _a.textMeasureId));
|
|
11663
11669
|
let width;
|
|
11664
11670
|
const attribute = this.attribute,
|
|
11665
11671
|
{
|
|
@@ -11680,7 +11686,7 @@
|
|
|
11680
11686
|
} = attribute;
|
|
11681
11687
|
if (!verticalMode) {
|
|
11682
11688
|
const t = textAlign;
|
|
11683
|
-
textAlign = null !== (
|
|
11689
|
+
textAlign = null !== (_b = Text.baselineMapAlign[textBaseline]) && void 0 !== _b ? _b : "left", textBaseline = null !== (_c = Text.alignMapBaseline[t]) && void 0 !== _c ? _c : "top";
|
|
11684
11690
|
}
|
|
11685
11691
|
if (width = 0, !this.shouldUpdateShape() && this.cache) {
|
|
11686
11692
|
this.cache.verticalList.forEach(item => {
|
|
@@ -14651,7 +14657,7 @@
|
|
|
14651
14657
|
doFill && (fillCb ? fillCb(context, arc.attribute, arcAttribute) : fVisible && (context.setCommonStyle(arc, arc.attribute, originX - x, originY - y, arcAttribute), context.fill()));
|
|
14652
14658
|
}
|
|
14653
14659
|
_runStroke(arc, context, x, y, arcAttribute, doStroke, isFullStroke, sVisible, strokeCb) {
|
|
14654
|
-
doStroke && isFullStroke && (strokeCb
|
|
14660
|
+
doStroke && isFullStroke && (strokeCb ? strokeCb(context, arc.attribute, arcAttribute) : sVisible && (context.setStrokeStyle(arc, arc.attribute, x, y, arcAttribute), context.stroke()));
|
|
14655
14661
|
}
|
|
14656
14662
|
draw(arc, renderService, drawContext, params) {
|
|
14657
14663
|
const arcAttribute = getTheme(arc, null == params ? void 0 : params.theme).arc;
|
|
@@ -18735,12 +18741,12 @@
|
|
|
18735
18741
|
const parsedParams = this.parseParams(params, isTimeline);
|
|
18736
18742
|
return animate = isTimeline ? this.executeTimelineItem(parsedParams, graphic, index, count) : this.executeTypeConfigItem(parsedParams, graphic, index, count), animate && this._trackAnimation(animate), animate;
|
|
18737
18743
|
}
|
|
18738
|
-
stop(type) {
|
|
18744
|
+
stop(type, callEnd = !0) {
|
|
18739
18745
|
for (; this._animates.length > 0;) {
|
|
18740
18746
|
const animate = this._animates.pop();
|
|
18741
|
-
null == animate || animate.stop(type);
|
|
18747
|
+
!1 === callEnd && (animate.status = AnimateStatus.END), null == animate || animate.stop(type);
|
|
18742
18748
|
}
|
|
18743
|
-
this._animates = [], this._activeCount = 0, this._started && (this._started = !1, this.onEnd());
|
|
18749
|
+
this._animates = [], this._activeCount = 0, this._started && (this._started = !1, callEnd && this.onEnd());
|
|
18744
18750
|
}
|
|
18745
18751
|
}
|
|
18746
18752
|
AnimateExecutor.builtInAnimateMap = {};
|
|
@@ -18800,7 +18806,7 @@
|
|
|
18800
18806
|
executor: new AnimateExecutor(this.graphic)
|
|
18801
18807
|
});
|
|
18802
18808
|
}), shouldStopState.forEach(state => {
|
|
18803
|
-
state.executor.stop();
|
|
18809
|
+
state.executor.stop(null, !1);
|
|
18804
18810
|
}), shouldApplyState.length) {
|
|
18805
18811
|
shouldApplyState[0].executor.execute(shouldApplyState[0].animationConfig);
|
|
18806
18812
|
for (let i = 0; i < shouldApplyState.length; i++) {
|
|
@@ -18851,7 +18857,7 @@
|
|
|
18851
18857
|
clearState() {
|
|
18852
18858
|
var _a;
|
|
18853
18859
|
null === (_a = this.stateList) || void 0 === _a || _a.forEach(state => {
|
|
18854
|
-
state.executor.stop();
|
|
18860
|
+
state.executor.stop(null, !1);
|
|
18855
18861
|
}), this.stateList = null;
|
|
18856
18862
|
}
|
|
18857
18863
|
reApplyState(state) {
|