@visactor/vchart 1.6.2 → 1.6.3
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 +324 -222
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/animation/config.js +1 -0
- package/cjs/animation/config.js.map +1 -1
- package/cjs/animation/utils.js +13 -13
- package/cjs/animation/utils.js.map +1 -1
- package/cjs/compile/compilable-base.js +2 -1
- package/cjs/compile/compiler.js +1 -1
- package/cjs/compile/compiler.js.map +1 -1
- package/cjs/compile/grammar-item.js +1 -2
- package/cjs/compile/mark/compilable-mark.d.ts +1 -2
- package/cjs/compile/mark/compilable-mark.js +4 -7
- package/cjs/compile/mark/compilable-mark.js.map +1 -1
- package/cjs/component/tooltip/handler/dom/model/content-column-model.js +12 -10
- package/cjs/component/tooltip/handler/dom/model/content-column-model.js.map +1 -1
- package/cjs/component/tooltip/handler/dom/model/shape-model.d.ts +1 -0
- package/cjs/component/tooltip/handler/dom/model/shape-model.js +4 -4
- package/cjs/component/tooltip/handler/dom/model/shape-model.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/core/vchart.d.ts +1 -0
- package/cjs/core/vchart.js +9 -6
- package/cjs/core/vchart.js.map +1 -1
- package/cjs/mark/arc.js +2 -2
- package/cjs/mark/arc.js.map +1 -1
- package/cjs/mark/base/base-mark.d.ts +3 -3
- package/cjs/mark/base/base-mark.js +32 -72
- package/cjs/mark/base/base-mark.js.map +1 -1
- package/cjs/series/cartesian/cartesian.js +6 -3
- package/cjs/series/cartesian/cartesian.js.map +1 -1
- package/cjs/series/sankey/sankey.d.ts +2 -1
- package/cjs/series/sankey/sankey.js +23 -28
- package/cjs/series/sankey/sankey.js.map +1 -1
- package/cjs/util/type.js +1 -1
- package/cjs/util/type.js.map +1 -1
- package/esm/animation/config.js +1 -0
- package/esm/animation/config.js.map +1 -1
- package/esm/animation/utils.js +13 -13
- package/esm/animation/utils.js.map +1 -1
- package/esm/compile/compilable-base.js +2 -1
- package/esm/compile/compiler.js +1 -1
- package/esm/compile/compiler.js.map +1 -1
- package/esm/compile/grammar-item.js +1 -2
- package/esm/compile/mark/compilable-mark.d.ts +1 -2
- package/esm/compile/mark/compilable-mark.js +3 -7
- package/esm/compile/mark/compilable-mark.js.map +1 -1
- package/esm/component/tooltip/handler/dom/model/content-column-model.js +13 -9
- package/esm/component/tooltip/handler/dom/model/content-column-model.js.map +1 -1
- package/esm/component/tooltip/handler/dom/model/shape-model.d.ts +1 -0
- package/esm/component/tooltip/handler/dom/model/shape-model.js +4 -4
- package/esm/component/tooltip/handler/dom/model/shape-model.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/core/vchart.d.ts +1 -0
- package/esm/core/vchart.js +9 -6
- package/esm/core/vchart.js.map +1 -1
- package/esm/mark/arc.js +2 -2
- package/esm/mark/arc.js.map +1 -1
- package/esm/mark/base/base-mark.d.ts +3 -3
- package/esm/mark/base/base-mark.js +30 -69
- package/esm/mark/base/base-mark.js.map +1 -1
- package/esm/series/cartesian/cartesian.js +4 -1
- package/esm/series/cartesian/cartesian.js.map +1 -1
- package/esm/series/sankey/sankey.d.ts +2 -1
- package/esm/series/sankey/sankey.js +23 -27
- package/esm/series/sankey/sankey.js.map +1 -1
- package/esm/util/type.js +1 -1
- package/esm/util/type.js.map +1 -1
- package/package.json +16 -16
package/build/index.js
CHANGED
|
@@ -6421,7 +6421,7 @@
|
|
|
6421
6421
|
}
|
|
6422
6422
|
|
|
6423
6423
|
function couldBeValidNumber(v) {
|
|
6424
|
-
if (
|
|
6424
|
+
if (v === null || v === undefined || v === '') {
|
|
6425
6425
|
return false;
|
|
6426
6426
|
}
|
|
6427
6427
|
if (isNumber$2(v)) {
|
|
@@ -10936,7 +10936,10 @@
|
|
|
10936
10936
|
direction: "horizontal",
|
|
10937
10937
|
wordBreak: "break-all",
|
|
10938
10938
|
ignoreBuf: !1,
|
|
10939
|
-
verticalMode: 0
|
|
10939
|
+
verticalMode: 0,
|
|
10940
|
+
whiteSpace: "no-wrap",
|
|
10941
|
+
heightLimit: 1 / 0,
|
|
10942
|
+
lineClamp: 1 / 0
|
|
10940
10943
|
};
|
|
10941
10944
|
const DefaultStyle = Object.assign(Object.assign(Object.assign({
|
|
10942
10945
|
opacity: 1,
|
|
@@ -16967,7 +16970,7 @@
|
|
|
16967
16970
|
}
|
|
16968
16971
|
}
|
|
16969
16972
|
|
|
16970
|
-
const TEXT_UPDATE_TAG_KEY = ["text", "maxLineWidth", "fontSize", "fontFamily", "fontWeight", "ellipsis", "lineHeight", "direction", "wordBreak", ...GRAPHIC_UPDATE_TAG_KEY];
|
|
16973
|
+
const TEXT_UPDATE_TAG_KEY = ["text", "maxLineWidth", "heightLimit", "lineClamp", "fontSize", "fontFamily", "fontWeight", "ellipsis", "lineHeight", "direction", "wordBreak", ...GRAPHIC_UPDATE_TAG_KEY];
|
|
16971
16974
|
let Text$1 = class Text extends Graphic {
|
|
16972
16975
|
get font() {
|
|
16973
16976
|
const textTheme = getTheme$1(this).text;
|
|
@@ -17025,6 +17028,103 @@
|
|
|
17025
17028
|
paddingArray = parsePadding(boundsPadding);
|
|
17026
17029
|
return paddingArray && bounds.expand(paddingArray), this.clearUpdateBoundTag(), bounds;
|
|
17027
17030
|
}
|
|
17031
|
+
updateWrapAABBBounds(text) {
|
|
17032
|
+
var _a, _b, _c;
|
|
17033
|
+
const textTheme = getTheme$1(this).text,
|
|
17034
|
+
{
|
|
17035
|
+
fontFamily = textTheme.fontFamily,
|
|
17036
|
+
textAlign = textTheme.textAlign,
|
|
17037
|
+
textBaseline = textTheme.textBaseline,
|
|
17038
|
+
fontSize = textTheme.fontSize,
|
|
17039
|
+
lineHeight = this.attribute.lineHeight || this.attribute.fontSize || textTheme.fontSize,
|
|
17040
|
+
ellipsis = textTheme.ellipsis,
|
|
17041
|
+
maxLineWidth: maxLineWidth,
|
|
17042
|
+
stroke = textTheme.stroke,
|
|
17043
|
+
lineWidth = textTheme.lineWidth,
|
|
17044
|
+
wordBreak = textTheme.wordBreak,
|
|
17045
|
+
fontWeight = textTheme.fontWeight,
|
|
17046
|
+
ignoreBuf = textTheme.ignoreBuf,
|
|
17047
|
+
heightLimit = 0,
|
|
17048
|
+
lineClamp: lineClamp
|
|
17049
|
+
} = this.attribute,
|
|
17050
|
+
buf = ignoreBuf ? 0 : 2;
|
|
17051
|
+
if (!this.shouldUpdateShape() && (null === (_a = this.cache) || void 0 === _a ? void 0 : _a.layoutData)) {
|
|
17052
|
+
const bbox = this.cache.layoutData.bbox;
|
|
17053
|
+
return this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
|
|
17054
|
+
}
|
|
17055
|
+
const textMeasure = application.graphicUtil.textMeasure,
|
|
17056
|
+
layoutObj = new CanvasTextLayout(fontFamily, {
|
|
17057
|
+
fontSize: fontSize,
|
|
17058
|
+
fontWeight: fontWeight,
|
|
17059
|
+
fontFamily: fontFamily
|
|
17060
|
+
}, textMeasure),
|
|
17061
|
+
lines = isArray$1(text) ? text.map(l => l.toString()) : [text.toString()],
|
|
17062
|
+
linesLayout = [],
|
|
17063
|
+
bboxWH = [0, 0];
|
|
17064
|
+
let lineCountLimit = 1 / 0;
|
|
17065
|
+
if (heightLimit > 0 && (lineCountLimit = Math.max(Math.floor(heightLimit / lineHeight), 1)), lineClamp && (lineCountLimit = Math.min(lineCountLimit, lineClamp)), "number" == typeof maxLineWidth && maxLineWidth !== 1 / 0) {
|
|
17066
|
+
if (maxLineWidth > 0) for (let i = 0; i < lines.length; i++) {
|
|
17067
|
+
const str = lines[i];
|
|
17068
|
+
let needCut = !0;
|
|
17069
|
+
if (i === lineCountLimit - 1) {
|
|
17070
|
+
const clip = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, !1);
|
|
17071
|
+
linesLayout.push({
|
|
17072
|
+
str: clip.str,
|
|
17073
|
+
width: clip.width
|
|
17074
|
+
});
|
|
17075
|
+
break;
|
|
17076
|
+
}
|
|
17077
|
+
const clip = layoutObj.textMeasure.clipText(str, layoutObj.textOptions, maxLineWidth, "break-word" === wordBreak);
|
|
17078
|
+
if ("" !== str && "" === clip.str) {
|
|
17079
|
+
if (ellipsis) {
|
|
17080
|
+
const clipEllipsis = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, !1);
|
|
17081
|
+
clip.str = null !== (_b = clipEllipsis.str) && void 0 !== _b ? _b : "", clip.width = null !== (_c = clipEllipsis.width) && void 0 !== _c ? _c : 0;
|
|
17082
|
+
} else clip.str = "", clip.width = 0;
|
|
17083
|
+
needCut = !1;
|
|
17084
|
+
}
|
|
17085
|
+
if (linesLayout.push({
|
|
17086
|
+
str: clip.str,
|
|
17087
|
+
width: clip.width
|
|
17088
|
+
}), clip.str.length === str.length) ;else if (needCut) {
|
|
17089
|
+
const newStr = str.substring(clip.str.length);
|
|
17090
|
+
lines.splice(i + 1, 0, newStr);
|
|
17091
|
+
}
|
|
17092
|
+
}
|
|
17093
|
+
let maxWidth = 0;
|
|
17094
|
+
linesLayout.forEach(layout => {
|
|
17095
|
+
maxWidth = Math.max(maxWidth, layout.width);
|
|
17096
|
+
}), bboxWH[0] = maxWidth;
|
|
17097
|
+
} else {
|
|
17098
|
+
let width,
|
|
17099
|
+
text,
|
|
17100
|
+
lineWidth = 0;
|
|
17101
|
+
for (let i = 0, len = lines.length; i < len; i++) {
|
|
17102
|
+
if (i === lineCountLimit - 1) {
|
|
17103
|
+
const clip = layoutObj.textMeasure.clipTextWithSuffix(lines[i], layoutObj.textOptions, maxLineWidth, ellipsis, !1);
|
|
17104
|
+
linesLayout.push({
|
|
17105
|
+
str: clip.str,
|
|
17106
|
+
width: clip.width
|
|
17107
|
+
}), lineWidth = Math.max(lineWidth, clip.width);
|
|
17108
|
+
break;
|
|
17109
|
+
}
|
|
17110
|
+
text = lines[i], width = layoutObj.textMeasure.measureTextWidth(text, layoutObj.textOptions, "break-word" === wordBreak), lineWidth = Math.max(lineWidth, width), linesLayout.push({
|
|
17111
|
+
str: text,
|
|
17112
|
+
width: width
|
|
17113
|
+
});
|
|
17114
|
+
}
|
|
17115
|
+
bboxWH[0] = lineWidth;
|
|
17116
|
+
}
|
|
17117
|
+
bboxWH[1] = linesLayout.length * (lineHeight + buf);
|
|
17118
|
+
const bbox = {
|
|
17119
|
+
xOffset: 0,
|
|
17120
|
+
yOffset: 0,
|
|
17121
|
+
width: bboxWH[0],
|
|
17122
|
+
height: bboxWH[1]
|
|
17123
|
+
};
|
|
17124
|
+
layoutObj.LayoutBBox(bbox, textAlign, textBaseline);
|
|
17125
|
+
const layoutData = layoutObj.layoutWithBBox(bbox, linesLayout, textAlign, textBaseline, lineHeight);
|
|
17126
|
+
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;
|
|
17127
|
+
}
|
|
17028
17128
|
updateSingallineAABBBounds(text) {
|
|
17029
17129
|
const textTheme = getTheme$1(this).text,
|
|
17030
17130
|
{
|
|
@@ -17056,9 +17156,11 @@
|
|
|
17056
17156
|
stroke = textTheme.stroke,
|
|
17057
17157
|
lineWidth = textTheme.lineWidth,
|
|
17058
17158
|
wordBreak = textTheme.wordBreak,
|
|
17059
|
-
ignoreBuf = textTheme.ignoreBuf
|
|
17060
|
-
|
|
17061
|
-
|
|
17159
|
+
ignoreBuf = textTheme.ignoreBuf,
|
|
17160
|
+
whiteSpace = textTheme.whiteSpace
|
|
17161
|
+
} = attribute;
|
|
17162
|
+
if ("normal" === whiteSpace) return this.updateWrapAABBBounds(text);
|
|
17163
|
+
const buf = ignoreBuf ? 0 : Math.max(2, .075 * fontSize),
|
|
17062
17164
|
{
|
|
17063
17165
|
lineHeight = null !== (_a = attribute.lineHeight) && void 0 !== _a ? _a : (attribute.fontSize || textTheme.fontSize) + buf
|
|
17064
17166
|
} = attribute;
|
|
@@ -17186,8 +17288,9 @@
|
|
|
17186
17288
|
maxLineWidth: maxLineWidth,
|
|
17187
17289
|
stroke = textTheme.stroke,
|
|
17188
17290
|
lineWidth = textTheme.lineWidth,
|
|
17189
|
-
|
|
17291
|
+
whiteSpace = textTheme.whiteSpace
|
|
17190
17292
|
} = attribute;
|
|
17293
|
+
if ("normal" === whiteSpace) return this.updateWrapAABBBounds(text);
|
|
17191
17294
|
if (!this.shouldUpdateShape() && (null === (_a = this.cache) || void 0 === _a ? void 0 : _a.layoutData)) {
|
|
17192
17295
|
const bbox = this.cache.layoutData.bbox;
|
|
17193
17296
|
return this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
|
|
@@ -25137,13 +25240,16 @@
|
|
|
25137
25240
|
background: this._background
|
|
25138
25241
|
});
|
|
25139
25242
|
}
|
|
25243
|
+
preventRender(prevent) {
|
|
25244
|
+
prevent ? this._skipRender = -1 / 0 : this.params && this.params.optimize && !1 !== this.params.optimize.skipRenderWithOutRange ? this._skipRender = this.window.isVisible() ? 0 : 1 : this._skipRender = 0;
|
|
25245
|
+
}
|
|
25140
25246
|
optmize(params) {
|
|
25141
25247
|
this.optmizeRender(null == params ? void 0 : params.skipRenderWithOutRange);
|
|
25142
25248
|
}
|
|
25143
25249
|
optmizeRender() {
|
|
25144
25250
|
let skipRenderWithOutRange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
|
|
25145
|
-
skipRenderWithOutRange && (this._skipRender = this.window.isVisible() ? 0 : 1, this.window.onVisibleChange(visible => {
|
|
25146
|
-
visible ? (this.dirtyBounds && this.dirtyBounds.setValue(0, 0, this._viewBox.width(), this._viewBox.height()), this._skipRender > 1 && this.renderNextFrame(), this._skipRender = 0) : this._skipRender = 1;
|
|
25251
|
+
skipRenderWithOutRange && (this._skipRender = this._skipRender < 0 ? this._skipRender : this.window.isVisible() ? 0 : 1, this.window.onVisibleChange(visible => {
|
|
25252
|
+
this._skipRender < 0 || (visible ? (this.dirtyBounds && this.dirtyBounds.setValue(0, 0, this._viewBox.width(), this._viewBox.height()), this._skipRender > 1 && this.renderNextFrame(), this._skipRender = 0) : this._skipRender = 1);
|
|
25147
25253
|
}));
|
|
25148
25254
|
}
|
|
25149
25255
|
getTimeline() {
|
|
@@ -37003,7 +37109,7 @@
|
|
|
37003
37109
|
function moveToHead(array, idx, start, cmp) {
|
|
37004
37110
|
let parent, pidx;
|
|
37005
37111
|
const item = array[idx];
|
|
37006
|
-
for (; idx > start && (pidx = Math.floor((idx - 1) / 2), parent = array[pidx], cmp(item, parent) < 0);) array[idx] = parent, idx = pidx;
|
|
37112
|
+
for (; idx > start && (pidx = Math.floor((idx - 1) / 2), parent = array[pidx], item && parent && cmp(item, parent) < 0);) array[idx] = parent, idx = pidx;
|
|
37007
37113
|
return array[idx] = item;
|
|
37008
37114
|
}
|
|
37009
37115
|
function moveToTail(array, idx, end, cmp) {
|
|
@@ -37170,6 +37276,7 @@
|
|
|
37170
37276
|
}
|
|
37171
37277
|
evaluate() {
|
|
37172
37278
|
return __awaiter$5(this, void 0, void 0, function* () {
|
|
37279
|
+
if (this._isReleased) return;
|
|
37173
37280
|
if (this._beforeRunner && (yield this.asyncCallback(this._beforeRunner)), !this._committed.length) return this.logger.info("Dataflow invoked, but nothing to do."), !1;
|
|
37174
37281
|
this._isRunning = !0, this._updateCounter += 1;
|
|
37175
37282
|
let grammar,
|
|
@@ -37179,14 +37286,14 @@
|
|
|
37179
37286
|
count = 0;
|
|
37180
37287
|
this.logger.canLogInfo() && (dt = Date.now(), this.logger.debug(`-- START PROPAGATION (${this._updateCounter}) -----`)), this._beforeEvaluate();
|
|
37181
37288
|
try {
|
|
37182
|
-
for (; this._heap.size() > 0;) if (grammar = this._heap.pop(), grammar.rank === grammar.qrank) {
|
|
37289
|
+
for (; this._heap.size() > 0 && !this._isReleased;) if (grammar = this._heap.pop(), grammar.rank === grammar.qrank) {
|
|
37183
37290
|
if (next = grammar.run(), next && next.then && (next = yield next), !this._isRunning) return !1;
|
|
37184
37291
|
this._logGrammarRunInfo(grammar), this._enqueueTargets(grammar), count += 1;
|
|
37185
37292
|
} else this._enqueue(grammar);
|
|
37186
37293
|
} catch (err) {
|
|
37187
37294
|
this._heap.clear(), error = err;
|
|
37188
37295
|
}
|
|
37189
|
-
return this._isRunning = !1, this.logger.canLogInfo() && (dt = Date.now() - dt, this.logger.info(`> ${count} grammars; ${dt} ms`)), error ? this.logger.error(error) : this._afterRunner && (yield this.asyncCallback(this._afterRunner)), this._finishFirstRender = !0, !0;
|
|
37296
|
+
return !this._isReleased && (this._isRunning = !1, this.logger.canLogInfo() && (dt = Date.now() - dt, this.logger.info(`> ${count} grammars; ${dt} ms`)), error ? this.logger.error(error) : this._afterRunner && (yield this.asyncCallback(this._afterRunner)), this._finishFirstRender = !0, !0);
|
|
37190
37297
|
});
|
|
37191
37298
|
}
|
|
37192
37299
|
evaluateSync() {
|
|
@@ -37208,7 +37315,7 @@
|
|
|
37208
37315
|
this._afterRunner = callback;
|
|
37209
37316
|
}
|
|
37210
37317
|
release() {
|
|
37211
|
-
this.stop(), this._heap && (this._heap.clear(), this._heap = null), this.logger = null, this._committed = null;
|
|
37318
|
+
this.stop(), this._isReleased = !0, this._heap && (this._heap.clear(), this._heap = null), this.logger = null, this._committed = null;
|
|
37212
37319
|
}
|
|
37213
37320
|
}
|
|
37214
37321
|
|
|
@@ -40617,6 +40724,11 @@
|
|
|
40617
40724
|
_context.globalAlpha = strokeOpacity * opacity, _context.lineWidth = getScaledStroke(this, lineWidth, this.dpr), _context.strokeStyle = createColor(this, stroke, params, offsetX, offsetY), _context.lineJoin = lineJoin, 0 === lineDash[0] && 0 === lineDash[1] || _context.setLineDash(lineDash), _context.lineCap = lineCap, _context.miterLimit = miterLimit;
|
|
40618
40725
|
}
|
|
40619
40726
|
}
|
|
40727
|
+
measureText(text) {
|
|
40728
|
+
let method = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : application.global.measureTextMethod;
|
|
40729
|
+
this.setTransform(1, 0, 0, 1, 0, 0, !0, application.global.devicePixelRatio);
|
|
40730
|
+
return super.measureText(text, method);
|
|
40731
|
+
}
|
|
40620
40732
|
createPattern(image, repetition) {
|
|
40621
40733
|
return null;
|
|
40622
40734
|
}
|
|
@@ -41498,10 +41610,14 @@
|
|
|
41498
41610
|
toCanvas() {
|
|
41499
41611
|
return this._stage ? this._stage.toCanvas() : null;
|
|
41500
41612
|
}
|
|
41613
|
+
preventRender(tag) {
|
|
41614
|
+
this._stage && this._stage.preventRender(tag);
|
|
41615
|
+
}
|
|
41501
41616
|
release() {
|
|
41617
|
+
var _a;
|
|
41502
41618
|
this._view.traverseMarkTree(mark => {
|
|
41503
41619
|
mark.release();
|
|
41504
|
-
}), this._dragController && this._dragController.release(), this._gestureController && this._gestureController.release(), this._stage && this._stage.release(), this._stage = null, this._layer = null, this._dragController = null, this._gestureController = null;
|
|
41620
|
+
}), this._dragController && this._dragController.release(), this._gestureController && this._gestureController.release(), this._stage !== (null === (_a = this._viewOptions) || void 0 === _a ? void 0 : _a.stage) && this._stage.release(), this._stage = null, this._layer = null, this._dragController = null, this._gestureController = null;
|
|
41505
41621
|
}
|
|
41506
41622
|
createStage() {
|
|
41507
41623
|
var _a, _b, _c, _d, _e;
|
|
@@ -43440,8 +43556,8 @@
|
|
|
43440
43556
|
return null === (_c = null === (_b = null === (_a = this.elements) || void 0 === _a ? void 0 : _a[0]) || void 0 === _b ? void 0 : _b.getGraphicItem) || void 0 === _c ? void 0 : _c.call(_b);
|
|
43441
43557
|
}
|
|
43442
43558
|
getBounds() {
|
|
43443
|
-
var _a, _b, _c
|
|
43444
|
-
return this.graphicItem ? this.graphicItem.AABBBounds : null === (
|
|
43559
|
+
var _a, _b, _c;
|
|
43560
|
+
return this.graphicItem ? this.graphicItem.AABBBounds : null === (_c = null === (_b = null === (_a = this.elements) || void 0 === _a ? void 0 : _a[0]) || void 0 === _b ? void 0 : _b.getGraphicItem()) || void 0 === _c ? void 0 : _c.AABBBounds;
|
|
43445
43561
|
}
|
|
43446
43562
|
getMorphConfig() {
|
|
43447
43563
|
var _a;
|
|
@@ -45421,6 +45537,11 @@
|
|
|
45421
45537
|
"signal" === grammar.grammarType && BuiltInSignalID.includes(grammar.id()) || "mark" === grammar.grammarType && "root" === grammar.id() || this.removeGrammar(grammar);
|
|
45422
45538
|
}), this;
|
|
45423
45539
|
}
|
|
45540
|
+
removeAllGraphicItems() {
|
|
45541
|
+
return this.traverseMarkTree(mark => {
|
|
45542
|
+
mark.graphicItem && removeGraphicItem(mark.graphicItem), mark.graphicItem = null;
|
|
45543
|
+
}), this;
|
|
45544
|
+
}
|
|
45424
45545
|
parseSpec(spec) {
|
|
45425
45546
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
45426
45547
|
if (this.emit(HOOK_EVENT.BEFORE_PARSE_VIEW), this._spec = spec, normalizeMarkTree(spec), spec.theme ? this.theme(spec.theme) : this.theme(ThemeManager$1.getDefaultTheme()), spec.width && this.width(spec.width), spec.height && this.height(spec.height), this.padding(null !== (_b = null !== (_a = spec.padding) && void 0 !== _a ? _a : this._options.padding) && void 0 !== _b ? _b : this._theme.padding), !this.width() || !this.height()) {
|
|
@@ -45502,9 +45623,15 @@
|
|
|
45502
45623
|
setCurrentTheme(theme) {
|
|
45503
45624
|
let render = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
45504
45625
|
return __awaiter$2(this, void 0, void 0, function* () {
|
|
45505
|
-
|
|
45506
|
-
|
|
45507
|
-
|
|
45626
|
+
if (!this._isReleased) {
|
|
45627
|
+
if (this.theme(theme), this.grammars.getAllMarks().forEach(mark => {
|
|
45628
|
+
mark.commit();
|
|
45629
|
+
}), render) {
|
|
45630
|
+
if (yield this.evaluate(), this._isReleased) return;
|
|
45631
|
+
this.renderer.render(!0);
|
|
45632
|
+
} else yield this._dataflow.evaluate();
|
|
45633
|
+
return this;
|
|
45634
|
+
}
|
|
45508
45635
|
});
|
|
45509
45636
|
}
|
|
45510
45637
|
background(value) {
|
|
@@ -45594,7 +45721,8 @@
|
|
|
45594
45721
|
}
|
|
45595
45722
|
runAsync(runningConfig) {
|
|
45596
45723
|
return __awaiter$2(this, void 0, void 0, function* () {
|
|
45597
|
-
|
|
45724
|
+
if (this._isReleased) return;
|
|
45725
|
+
for (; this._running && (yield this._running, !this._isReleased););
|
|
45598
45726
|
const clear = () => {
|
|
45599
45727
|
this._running = null;
|
|
45600
45728
|
};
|
|
@@ -45614,25 +45742,31 @@
|
|
|
45614
45742
|
this.emit(HOOK_EVENT.BEFORE_DO_RENDER), this.renderer && (this._progressiveMarks || this.animate.animate(), this.renderer.render(immediately), this.handleRenderEnd()), this.emit(HOOK_EVENT.AFTER_DO_RENDER);
|
|
45615
45743
|
}
|
|
45616
45744
|
evaluate(runningConfig) {
|
|
45617
|
-
var _a, _b;
|
|
45745
|
+
var _a, _b, _c, _d;
|
|
45618
45746
|
return __awaiter$2(this, void 0, void 0, function* () {
|
|
45619
|
-
|
|
45620
|
-
|
|
45621
|
-
|
|
45622
|
-
grammarWillDetach && this.detachCachedGrammar();
|
|
45747
|
+
if (this._isReleased) return;
|
|
45748
|
+
const normalizedRunningConfig = normalizeRunningConfig(runningConfig),
|
|
45749
|
+
grammarWillDetach = this._cachedGrammars.size() > 0;
|
|
45750
|
+
grammarWillDetach && (this.reuseCachedGrammars(normalizedRunningConfig), this.detachCachedGrammar());
|
|
45623
45751
|
const hasResize = this._resizeRenderer(),
|
|
45624
45752
|
hasUpdate = this._dataflow.hasCommitted();
|
|
45625
|
-
|
|
45626
|
-
|
|
45627
|
-
|
|
45753
|
+
if (!(grammarWillDetach || hasUpdate || this._layoutState || hasResize)) return this;
|
|
45754
|
+
if (this.clearProgressive(), null === (_a = this.renderer) || void 0 === _a || _a.preventRender(!0), yield this._dataflow.evaluate(), !this._isReleased) {
|
|
45755
|
+
if (this._needBuildLayoutTree && (this.buildLayoutTree(), this._needBuildLayoutTree = !1), this._layoutState) {
|
|
45756
|
+
if (this._layoutState = LayoutState.layouting, this.doLayout(), this._dataflow.hasCommitted() && (this._layoutState = LayoutState.reevaluate, yield this._dataflow.evaluate(), this._isReleased)) return;
|
|
45757
|
+
this._layoutState = LayoutState.after, (null === (_b = this._layoutMarks) || void 0 === _b ? void 0 : _b.length) && this.handleLayoutEnd();
|
|
45758
|
+
}
|
|
45759
|
+
return null === (_c = this.renderer) || void 0 === _c || _c.preventRender(!1), this._layoutState = null, this.findProgressiveMarks(), this._resizeRenderer(), this.doRender(!1), null === (_d = this._willMorphMarks) || void 0 === _d || _d.forEach(morphMarks => {
|
|
45760
|
+
this._morph.morph(morphMarks.prev, morphMarks.next, normalizedRunningConfig);
|
|
45761
|
+
}), this._willMorphMarks = null, this.releaseCachedGrammars(normalizedRunningConfig), this.doPreProgressive(), this;
|
|
45762
|
+
}
|
|
45628
45763
|
});
|
|
45629
45764
|
}
|
|
45630
45765
|
evaluateSync(runningConfig) {
|
|
45631
45766
|
var _a, _b;
|
|
45632
|
-
const normalizedRunningConfig = normalizeRunningConfig(runningConfig)
|
|
45633
|
-
|
|
45634
|
-
|
|
45635
|
-
grammarWillDetach && this.detachCachedGrammar();
|
|
45767
|
+
const normalizedRunningConfig = normalizeRunningConfig(runningConfig),
|
|
45768
|
+
grammarWillDetach = this._cachedGrammars.size() > 0;
|
|
45769
|
+
grammarWillDetach && (this.reuseCachedGrammars(normalizedRunningConfig), this.detachCachedGrammar());
|
|
45636
45770
|
const hasResize = this._resizeRenderer(),
|
|
45637
45771
|
hasUpdate = this._dataflow.hasCommitted();
|
|
45638
45772
|
return grammarWillDetach || hasUpdate || this._layoutState || hasResize ? (this.clearProgressive(), this._dataflow.evaluateSync(), this._needBuildLayoutTree && (this.buildLayoutTree(), this._needBuildLayoutTree = !1), this._layoutState && (this._layoutState = LayoutState.layouting, this.doLayout(), this._dataflow.hasCommitted() && (this._layoutState = LayoutState.reevaluate, this._dataflow.evaluateSync()), this._layoutState = LayoutState.after, (null === (_a = this._layoutMarks) || void 0 === _a ? void 0 : _a.length) && this.handleLayoutEnd()), this._layoutState = null, this.findProgressiveMarks(), this._resizeRenderer(), this.doRender(!0), null === (_b = this._willMorphMarks) || void 0 === _b || _b.forEach(morphMarks => {
|
|
@@ -45908,7 +46042,7 @@
|
|
|
45908
46042
|
}
|
|
45909
46043
|
release() {
|
|
45910
46044
|
var _a, _b, _c;
|
|
45911
|
-
this._unBindResizeEvent(), this.clearProgressive(), Factory$1.unregisterRuntimeTransforms(), this.animate.stop(), this.grammars.release(), this._cachedGrammars.release(), this._dataflow = null, null === (_b = null === (_a = this.renderer) || void 0 === _a ? void 0 : _a.release) || void 0 === _b || _b.call(_a), this.renderer = null, this._boundInteractions = null, this.removeAllListeners(), null === (_c = this._eventListeners) || void 0 === _c || _c.forEach(listener => {
|
|
46045
|
+
this._isReleased = !0, this._unBindResizeEvent(), this.clearProgressive(), Factory$1.unregisterRuntimeTransforms(), this.animate.stop(), this.grammars.release(), this._cachedGrammars.release(), this._dataflow.release(), this._dataflow = null, null === (_b = null === (_a = this.renderer) || void 0 === _a ? void 0 : _a.release) || void 0 === _b || _b.call(_a), this.renderer = null, this._boundInteractions = null, this.removeAllListeners(), null === (_c = this._eventListeners) || void 0 === _c || _c.forEach(listener => {
|
|
45912
46046
|
listener.source.removeEventListener(listener.type, listener.handler);
|
|
45913
46047
|
}), this._eventListeners = null;
|
|
45914
46048
|
}
|
|
@@ -52211,6 +52345,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
52211
52345
|
renderAsync(morphConfig) {
|
|
52212
52346
|
var _a;
|
|
52213
52347
|
return __awaiter$h(this, void 0, void 0, function* () {
|
|
52348
|
+
if (this.isReleased) {
|
|
52349
|
+
return;
|
|
52350
|
+
}
|
|
52214
52351
|
this.initView();
|
|
52215
52352
|
if (!this._view) {
|
|
52216
52353
|
return Promise.reject('srView init fail');
|
|
@@ -56034,28 +56171,18 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
56034
56171
|
compileSignal() {
|
|
56035
56172
|
this.state.compile();
|
|
56036
56173
|
}
|
|
56037
|
-
_computeAttribute(key, state) {
|
|
56038
|
-
return (datum, opt) => {
|
|
56039
|
-
return undefined;
|
|
56040
|
-
};
|
|
56041
|
-
}
|
|
56042
56174
|
compileCommonAttributeCallback(key, state) {
|
|
56043
56175
|
const noAttrTransform = !needAttrTransform(this.type, key);
|
|
56044
56176
|
const opt = { mark: null, parent: null, element: null };
|
|
56045
|
-
|
|
56046
|
-
|
|
56047
|
-
|
|
56048
|
-
|
|
56049
|
-
|
|
56050
|
-
|
|
56051
|
-
|
|
56052
|
-
|
|
56053
|
-
|
|
56054
|
-
opt.mark = element.mark;
|
|
56055
|
-
opt.parent = element.mark.group;
|
|
56056
|
-
opt.element = element;
|
|
56057
|
-
return attrTransform(this.type, key, attrFunctor(datum, opt));
|
|
56058
|
-
};
|
|
56177
|
+
return (datum, element) => {
|
|
56178
|
+
opt.mark = element.mark;
|
|
56179
|
+
opt.parent = element.mark.group;
|
|
56180
|
+
opt.element = element;
|
|
56181
|
+
if (noAttrTransform) {
|
|
56182
|
+
return this.getAttribute(key, datum, state, opt);
|
|
56183
|
+
}
|
|
56184
|
+
return attrTransform(this.type, key, this.getAttribute(key, datum, state, opt));
|
|
56185
|
+
};
|
|
56059
56186
|
}
|
|
56060
56187
|
compileTransform() {
|
|
56061
56188
|
var _a;
|
|
@@ -56219,7 +56346,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
56219
56346
|
}
|
|
56220
56347
|
}
|
|
56221
56348
|
getAttribute(key, datum, state = 'normal', opt) {
|
|
56222
|
-
return this._computeAttribute(key,
|
|
56349
|
+
return this._computeAttribute(key, datum, state, opt);
|
|
56223
56350
|
}
|
|
56224
56351
|
setAttribute(attr, style, state = 'normal', level = 0, stateStyle = this.stateStyle) {
|
|
56225
56352
|
var _a;
|
|
@@ -56273,60 +56400,42 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
56273
56400
|
}
|
|
56274
56401
|
return style;
|
|
56275
56402
|
}
|
|
56276
|
-
_computeAttribute(key, state) {
|
|
56403
|
+
_computeAttribute(key, datum, state, opt) {
|
|
56277
56404
|
var _a;
|
|
56278
56405
|
let stateStyle = (_a = this.stateStyle[state]) === null || _a === void 0 ? void 0 : _a[key];
|
|
56279
56406
|
if (!stateStyle) {
|
|
56280
56407
|
stateStyle = this.stateStyle.normal[key];
|
|
56281
56408
|
}
|
|
56282
|
-
|
|
56283
|
-
|
|
56284
|
-
|
|
56285
|
-
if (hasPostProcess && hasExCompute) {
|
|
56286
|
-
const exCompute = this._computeExChannel[key];
|
|
56287
|
-
return (datum, opt) => {
|
|
56288
|
-
let baseValue = baseValueFunctor(datum, opt);
|
|
56289
|
-
baseValue = stateStyle.postProcess(baseValue, datum, this._attributeContext, opt, this.getDataView());
|
|
56290
|
-
return exCompute(key, datum, state, opt, baseValue);
|
|
56291
|
-
};
|
|
56409
|
+
let baseValue = this._computeStateAttribute(stateStyle, key, datum, state, opt);
|
|
56410
|
+
if (isFunction$1(stateStyle === null || stateStyle === void 0 ? void 0 : stateStyle.postProcess)) {
|
|
56411
|
+
baseValue = stateStyle.postProcess(baseValue, datum, this._attributeContext, opt, this.getDataView());
|
|
56292
56412
|
}
|
|
56293
|
-
|
|
56294
|
-
return (datum, opt)
|
|
56295
|
-
return stateStyle.postProcess(baseValueFunctor(datum, opt), datum, this._attributeContext, opt, this.getDataView());
|
|
56296
|
-
};
|
|
56413
|
+
if (key in this._computeExChannel) {
|
|
56414
|
+
return this._computeExChannel[key](key, datum, state, opt, baseValue);
|
|
56297
56415
|
}
|
|
56298
|
-
|
|
56299
|
-
const exCompute = this._computeExChannel[key];
|
|
56300
|
-
return (datum, opt) => {
|
|
56301
|
-
return exCompute(key, datum, state, opt, baseValueFunctor(datum, opt));
|
|
56302
|
-
};
|
|
56303
|
-
}
|
|
56304
|
-
return baseValueFunctor;
|
|
56416
|
+
return baseValue;
|
|
56305
56417
|
}
|
|
56306
|
-
_computeStateAttribute(stateStyle, key, state) {
|
|
56418
|
+
_computeStateAttribute(stateStyle, key, datum, state, opt) {
|
|
56307
56419
|
var _a;
|
|
56308
56420
|
if (!stateStyle) {
|
|
56309
|
-
return
|
|
56421
|
+
return undefined;
|
|
56310
56422
|
}
|
|
56311
56423
|
if (stateStyle.referer) {
|
|
56312
|
-
return stateStyle.referer.
|
|
56424
|
+
return stateStyle.referer.getAttribute(key, datum, state, opt);
|
|
56425
|
+
}
|
|
56426
|
+
if (typeof stateStyle.style === 'function') {
|
|
56427
|
+
return stateStyle.style(datum, this._attributeContext, opt, this.getDataView());
|
|
56313
56428
|
}
|
|
56314
56429
|
if (GradientType.includes(stateStyle.style.gradient)) {
|
|
56315
|
-
return this._computeGradientAttr(stateStyle.style);
|
|
56430
|
+
return this._computeGradientAttr(stateStyle.style, datum, opt);
|
|
56316
56431
|
}
|
|
56317
56432
|
if (['outerBorder', 'innerBorder'].includes(key)) {
|
|
56318
|
-
return this._computeBorderAttr(stateStyle.style);
|
|
56433
|
+
return this._computeBorderAttr(stateStyle.style, datum, opt);
|
|
56319
56434
|
}
|
|
56320
56435
|
if (isValidScaleType((_a = stateStyle.style.scale) === null || _a === void 0 ? void 0 : _a.type)) {
|
|
56321
|
-
return
|
|
56436
|
+
return stateStyle.style.scale.scale(datum[stateStyle.style.field]);
|
|
56322
56437
|
}
|
|
56323
|
-
return
|
|
56324
|
-
var _a;
|
|
56325
|
-
if (typeof stateStyle.style === 'function') {
|
|
56326
|
-
return (_a = stateStyle.style) === null || _a === void 0 ? void 0 : _a.call(stateStyle, datum, this._attributeContext, opt, this.getDataView());
|
|
56327
|
-
}
|
|
56328
|
-
return stateStyle.style;
|
|
56329
|
-
};
|
|
56438
|
+
return stateStyle.style;
|
|
56330
56439
|
}
|
|
56331
56440
|
_initStyle() {
|
|
56332
56441
|
const defaultStyle = this._getDefaultStyle();
|
|
@@ -56363,7 +56472,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
56363
56472
|
});
|
|
56364
56473
|
}
|
|
56365
56474
|
}
|
|
56366
|
-
_computeGradientAttr(gradientStyle) {
|
|
56475
|
+
_computeGradientAttr(gradientStyle, data, opt) {
|
|
56367
56476
|
var _a, _b;
|
|
56368
56477
|
const { gradient, scale, field } = gradientStyle, rest = __rest$8(gradientStyle, ["gradient", "scale", "field"]);
|
|
56369
56478
|
const markData = this.getDataView();
|
|
@@ -56379,42 +56488,49 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
56379
56488
|
}
|
|
56380
56489
|
}
|
|
56381
56490
|
const themeColor = computeActualDataScheme(getDataScheme(this.model.getColorScheme(), this.model.modelType === 'series' ? (_b = (_a = this.model).getSpec) === null || _b === void 0 ? void 0 : _b.call(_a) : undefined), this.model.getDefaultColorDomain());
|
|
56491
|
+
const computeStyle = {};
|
|
56382
56492
|
const mergedStyle = Object.assign(Object.assign({}, DEFAULT_GRADIENT_CONFIG[gradient]), rest);
|
|
56383
|
-
|
|
56384
|
-
const
|
|
56385
|
-
|
|
56386
|
-
|
|
56387
|
-
|
|
56388
|
-
|
|
56389
|
-
|
|
56390
|
-
|
|
56391
|
-
|
|
56392
|
-
|
|
56393
|
-
|
|
56394
|
-
|
|
56395
|
-
|
|
56396
|
-
|
|
56397
|
-
|
|
56398
|
-
|
|
56399
|
-
|
|
56400
|
-
|
|
56401
|
-
|
|
56402
|
-
|
|
56403
|
-
|
|
56404
|
-
|
|
56405
|
-
|
|
56406
|
-
|
|
56407
|
-
|
|
56408
|
-
|
|
56409
|
-
|
|
56410
|
-
computeStyle.gradient = gradient;
|
|
56411
|
-
return computeStyle;
|
|
56412
|
-
};
|
|
56493
|
+
Object.keys(mergedStyle).forEach(key => {
|
|
56494
|
+
const value = mergedStyle[key];
|
|
56495
|
+
if (key === 'stops') {
|
|
56496
|
+
computeStyle.stops = value.map((stop) => {
|
|
56497
|
+
const { opacity, color, offset } = stop;
|
|
56498
|
+
let computeColor = color !== null && color !== void 0 ? color : colorScale === null || colorScale === void 0 ? void 0 : colorScale.scale(data[colorField]);
|
|
56499
|
+
if (isFunction$1(color)) {
|
|
56500
|
+
computeColor = color(data, this._attributeContext, opt, markData);
|
|
56501
|
+
}
|
|
56502
|
+
if (isValid$1(opacity)) {
|
|
56503
|
+
computeColor = Color.SetOpacity(computeColor, opacity);
|
|
56504
|
+
}
|
|
56505
|
+
return {
|
|
56506
|
+
offset: isFunction$1(offset) ? offset(data, this._attributeContext, opt, markData) : offset,
|
|
56507
|
+
color: computeColor || themeColor[0]
|
|
56508
|
+
};
|
|
56509
|
+
});
|
|
56510
|
+
}
|
|
56511
|
+
else if (isFunction$1(value)) {
|
|
56512
|
+
computeStyle[key] = value(data, this._attributeContext, opt, markData);
|
|
56513
|
+
}
|
|
56514
|
+
else {
|
|
56515
|
+
computeStyle[key] = value;
|
|
56516
|
+
}
|
|
56517
|
+
});
|
|
56518
|
+
computeStyle.gradient = gradient;
|
|
56519
|
+
return computeStyle;
|
|
56413
56520
|
}
|
|
56414
|
-
_computeBorderAttr(borderStyle) {
|
|
56521
|
+
_computeBorderAttr(borderStyle, data, opt) {
|
|
56415
56522
|
var _a, _b, _c;
|
|
56416
56523
|
const { scale, field } = borderStyle, mergedStyle = __rest$8(borderStyle, ["scale", "field"]);
|
|
56417
56524
|
const computeStyle = {};
|
|
56525
|
+
Object.keys(mergedStyle).forEach(key => {
|
|
56526
|
+
const value = mergedStyle[key];
|
|
56527
|
+
if (isFunction$1(value)) {
|
|
56528
|
+
computeStyle[key] = value(data, this._attributeContext, opt, this.getDataView());
|
|
56529
|
+
}
|
|
56530
|
+
else {
|
|
56531
|
+
computeStyle[key] = value;
|
|
56532
|
+
}
|
|
56533
|
+
});
|
|
56418
56534
|
if (!('stroke' in computeStyle)) {
|
|
56419
56535
|
const themeColor = computeActualDataScheme(getDataScheme(this.model.getColorScheme(), this.model.modelType === 'series' ? (_b = (_a = this.model).getSpec) === null || _b === void 0 ? void 0 : _b.call(_a) : undefined), this.model.getDefaultColorDomain());
|
|
56420
56536
|
let colorScale = scale;
|
|
@@ -56427,52 +56543,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
56427
56543
|
if (!colorField) {
|
|
56428
56544
|
colorField = globalField;
|
|
56429
56545
|
}
|
|
56430
|
-
|
|
56431
|
-
const computeStyle = {};
|
|
56432
|
-
Object.keys(mergedStyle).forEach(key => {
|
|
56433
|
-
const value = mergedStyle[key];
|
|
56434
|
-
if (isFunction$1(value)) {
|
|
56435
|
-
computeStyle[key] = value(data, this._attributeContext, opt, this.getDataView());
|
|
56436
|
-
}
|
|
56437
|
-
else {
|
|
56438
|
-
computeStyle[key] = value;
|
|
56439
|
-
}
|
|
56440
|
-
});
|
|
56441
|
-
computeStyle.stroke = (colorScale === null || colorScale === void 0 ? void 0 : colorScale.scale(data[colorField])) || themeColor[0];
|
|
56442
|
-
return computeStyle;
|
|
56443
|
-
};
|
|
56546
|
+
computeStyle.stroke = (colorScale === null || colorScale === void 0 ? void 0 : colorScale.scale(data[colorField])) || themeColor[0];
|
|
56444
56547
|
}
|
|
56445
56548
|
}
|
|
56446
56549
|
else if (GradientType.includes((_c = mergedStyle.stroke) === null || _c === void 0 ? void 0 : _c.gradient)) {
|
|
56447
|
-
|
|
56448
|
-
return (data, opt) => {
|
|
56449
|
-
const computeStyle = {};
|
|
56450
|
-
Object.keys(mergedStyle).forEach(key => {
|
|
56451
|
-
const value = mergedStyle[key];
|
|
56452
|
-
if (isFunction$1(value)) {
|
|
56453
|
-
computeStyle[key] = value(data, this._attributeContext, opt, this.getDataView());
|
|
56454
|
-
}
|
|
56455
|
-
else {
|
|
56456
|
-
computeStyle[key] = value;
|
|
56457
|
-
}
|
|
56458
|
-
});
|
|
56459
|
-
computeStyle.stroke = gradientFunctor(data, opt);
|
|
56460
|
-
return computeStyle;
|
|
56461
|
-
};
|
|
56550
|
+
computeStyle.stroke = this._computeGradientAttr(mergedStyle.stroke, data, opt);
|
|
56462
56551
|
}
|
|
56463
|
-
return
|
|
56464
|
-
const computeStyle = {};
|
|
56465
|
-
Object.keys(mergedStyle).forEach(key => {
|
|
56466
|
-
const value = mergedStyle[key];
|
|
56467
|
-
if (isFunction$1(value)) {
|
|
56468
|
-
computeStyle[key] = value(data, this._attributeContext, opt, this.getDataView());
|
|
56469
|
-
}
|
|
56470
|
-
else {
|
|
56471
|
-
computeStyle[key] = value;
|
|
56472
|
-
}
|
|
56473
|
-
});
|
|
56474
|
-
return computeStyle;
|
|
56475
|
-
};
|
|
56552
|
+
return computeStyle;
|
|
56476
56553
|
}
|
|
56477
56554
|
}
|
|
56478
56555
|
|
|
@@ -56641,6 +56718,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
56641
56718
|
exit: { type: 'fadeOut' },
|
|
56642
56719
|
update: [
|
|
56643
56720
|
{
|
|
56721
|
+
type: 'update',
|
|
56644
56722
|
options: { excludeChannels: 'points' }
|
|
56645
56723
|
},
|
|
56646
56724
|
{
|
|
@@ -56990,6 +57068,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
56990
57068
|
}
|
|
56991
57069
|
updateCustomConfigAndRerender(modifyConfig, morphConfig) {
|
|
56992
57070
|
return __awaiter$h(this, void 0, void 0, function* () {
|
|
57071
|
+
if (this._isReleased) {
|
|
57072
|
+
return this;
|
|
57073
|
+
}
|
|
56993
57074
|
const result = modifyConfig();
|
|
56994
57075
|
if (!isValid$1(result)) {
|
|
56995
57076
|
return this;
|
|
@@ -57063,6 +57144,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
57063
57144
|
renderAsync(morphConfig) {
|
|
57064
57145
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
57065
57146
|
return __awaiter$h(this, void 0, void 0, function* () {
|
|
57147
|
+
if (this._isReleased) {
|
|
57148
|
+
return this;
|
|
57149
|
+
}
|
|
57066
57150
|
if (!this._chart) {
|
|
57067
57151
|
(_b = (_a = this._option.performanceHook) === null || _a === void 0 ? void 0 : _a.beforeInitializeChart) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
57068
57152
|
this._initChart(this._spec);
|
|
@@ -57075,6 +57159,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
57075
57159
|
(_h = (_g = this._option.performanceHook) === null || _g === void 0 ? void 0 : _g.afterCompileToVGrammar) === null || _h === void 0 ? void 0 : _h.call(_g);
|
|
57076
57160
|
}
|
|
57077
57161
|
yield ((_j = this._compiler) === null || _j === void 0 ? void 0 : _j.renderAsync(morphConfig));
|
|
57162
|
+
if (this._isReleased) {
|
|
57163
|
+
return this;
|
|
57164
|
+
}
|
|
57078
57165
|
if (this._option.animation) {
|
|
57079
57166
|
(_k = this._chart) === null || _k === void 0 ? void 0 : _k.getAllRegions().forEach(region => {
|
|
57080
57167
|
var _a;
|
|
@@ -57105,6 +57192,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
57105
57192
|
this._userEvents = null;
|
|
57106
57193
|
this._event = null;
|
|
57107
57194
|
this._eventDispatcher = null;
|
|
57195
|
+
this._isReleased = true;
|
|
57108
57196
|
InstanceManager.unregisterInstance(this);
|
|
57109
57197
|
}
|
|
57110
57198
|
updateData(id, data, options) {
|
|
@@ -57371,6 +57459,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
57371
57459
|
this._chart.onResize(width, height);
|
|
57372
57460
|
(_d = (_c = this._option.performanceHook) === null || _c === void 0 ? void 0 : _c.afterResizeWithUpdate) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
57373
57461
|
yield ((_f = (_e = this._compiler).resize) === null || _f === void 0 ? void 0 : _f.call(_e, width, height));
|
|
57462
|
+
if (this._isReleased) {
|
|
57463
|
+
return this;
|
|
57464
|
+
}
|
|
57374
57465
|
this._event.emit(ChartEvent.afterResize, { chart: this._chart });
|
|
57375
57466
|
return this;
|
|
57376
57467
|
});
|
|
@@ -57801,7 +57892,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
57801
57892
|
};
|
|
57802
57893
|
registerVChartCore();
|
|
57803
57894
|
|
|
57804
|
-
const version = "1.6.
|
|
57895
|
+
const version = "1.6.3";
|
|
57805
57896
|
|
|
57806
57897
|
class ChartData {
|
|
57807
57898
|
get dataList() {
|
|
@@ -59937,7 +60028,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
59937
60028
|
|
|
59938
60029
|
const AnimationStates = ['appear', 'enter', 'update', 'exit', 'disappear', 'normal'];
|
|
59939
60030
|
function animationConfig(defaultConfig = {}, userConfig, params) {
|
|
59940
|
-
var _a;
|
|
59941
60031
|
const config = {};
|
|
59942
60032
|
for (let i = 0; i < AnimationStates.length; i++) {
|
|
59943
60033
|
const state = AnimationStates[i];
|
|
@@ -59954,9 +60044,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
59954
60044
|
}
|
|
59955
60045
|
else {
|
|
59956
60046
|
defaultStateConfig = [Object.assign(Object.assign({}, DEFAULT_ANIMATION_CONFIG[state]), defaultConfig[state])];
|
|
59957
|
-
|
|
59958
|
-
|
|
59959
|
-
|
|
60047
|
+
}
|
|
60048
|
+
if (state === 'exit') {
|
|
60049
|
+
defaultStateConfig.forEach(exitConfig => {
|
|
60050
|
+
exitConfig.controlOptions = { stopWhenStateChange: true };
|
|
60051
|
+
});
|
|
59960
60052
|
}
|
|
59961
60053
|
if (!(userConfig === null || userConfig === void 0 ? void 0 : userConfig[state])) {
|
|
59962
60054
|
config[state] = defaultStateConfig;
|
|
@@ -59967,14 +60059,17 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
59967
60059
|
stateConfig = userConfig[state];
|
|
59968
60060
|
}
|
|
59969
60061
|
else {
|
|
59970
|
-
|
|
59971
|
-
|
|
59972
|
-
|
|
59973
|
-
|
|
59974
|
-
|
|
59975
|
-
|
|
59976
|
-
|
|
59977
|
-
|
|
60062
|
+
stateConfig = defaultStateConfig.map((stateConfig, i) => {
|
|
60063
|
+
var _a;
|
|
60064
|
+
let singleConfig = mergeSpec({}, defaultStateConfig[i], userConfig[state]);
|
|
60065
|
+
if (isChannelAnimation(singleConfig)) {
|
|
60066
|
+
delete singleConfig.type;
|
|
60067
|
+
}
|
|
60068
|
+
if (singleConfig.oneByOne) {
|
|
60069
|
+
singleConfig = produceOneByOne(singleConfig, (_a = params === null || params === void 0 ? void 0 : params.dataIndex) !== null && _a !== void 0 ? _a : defaultDataIndex);
|
|
60070
|
+
}
|
|
60071
|
+
return singleConfig;
|
|
60072
|
+
});
|
|
59978
60073
|
}
|
|
59979
60074
|
config[state] = stateConfig;
|
|
59980
60075
|
}
|
|
@@ -60042,7 +60137,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
60042
60137
|
}
|
|
60043
60138
|
config = cloneDeep(config);
|
|
60044
60139
|
traverseSpec(config, (node) => {
|
|
60045
|
-
|
|
60140
|
+
var _a;
|
|
60141
|
+
if (isFunction$1(node) && ((_a = node.prototype) === null || _a === void 0 ? void 0 : _a.constructor) !== node) {
|
|
60046
60142
|
const name = (...args) => {
|
|
60047
60143
|
return node(...args, ctx);
|
|
60048
60144
|
};
|
|
@@ -60957,12 +61053,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
60957
61053
|
this._direction = Direction.vertical;
|
|
60958
61054
|
this._sortDataByAxis = false;
|
|
60959
61055
|
this._getInvalidDefined = (datum) => {
|
|
60960
|
-
|
|
61056
|
+
var _a, _b;
|
|
61057
|
+
if ((_a = this._xAxisHelper) === null || _a === void 0 ? void 0 : _a.isContinuous) {
|
|
60961
61058
|
if (!couldBeValidNumber(datum[this._specXField[0]])) {
|
|
60962
61059
|
return false;
|
|
60963
61060
|
}
|
|
60964
61061
|
}
|
|
60965
|
-
if (this._yAxisHelper.isContinuous) {
|
|
61062
|
+
if ((_b = this._yAxisHelper) === null || _b === void 0 ? void 0 : _b.isContinuous) {
|
|
60966
61063
|
if (!couldBeValidNumber(datum[this._specYField[0]])) {
|
|
60967
61064
|
return false;
|
|
60968
61065
|
}
|
|
@@ -65216,13 +65313,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65216
65313
|
this._unCompileChannel = { centerOffset: true, radiusOffset: true };
|
|
65217
65314
|
this.computeOuterRadius = (key, datum, states = 'normal', opt, superValue) => {
|
|
65218
65315
|
var _a;
|
|
65219
|
-
const offset = (_a = this.
|
|
65316
|
+
const offset = (_a = this._computeAttribute('radiusOffset', datum, states, opt)) !== null && _a !== void 0 ? _a : 0;
|
|
65220
65317
|
return superValue + offset;
|
|
65221
65318
|
};
|
|
65222
65319
|
this.computeCenter = (key, datum, states = 'normal', opt, center) => {
|
|
65223
65320
|
const offset = polarToCartesian({
|
|
65224
65321
|
angle: datum[ARC_MIDDLE_ANGLE],
|
|
65225
|
-
radius: this.
|
|
65322
|
+
radius: this._computeAttribute('centerOffset', datum, states, opt)
|
|
65226
65323
|
});
|
|
65227
65324
|
return center + offset[key];
|
|
65228
65325
|
};
|
|
@@ -77806,8 +77903,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
77806
77903
|
y: (datum) => datum.y0,
|
|
77807
77904
|
y1: (datum) => datum.y1,
|
|
77808
77905
|
fill: (datum) => {
|
|
77809
|
-
var _a, _b, _c;
|
|
77810
|
-
return (_c = (_b = (_a = this._spec.node) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.fill) !== null && _c !== void 0 ? _c : this.
|
|
77906
|
+
var _a, _b, _c, _d;
|
|
77907
|
+
return (_c = (_b = (_a = this._spec.node) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.fill) !== null && _c !== void 0 ? _c : (_d = this._colorScale) === null || _d === void 0 ? void 0 : _d.scale(this._getNodeNameFromData(datum));
|
|
77811
77908
|
}
|
|
77812
77909
|
}, STATE_VALUE_ENUM.STATE_NORMAL, AttributeLevel.Mark);
|
|
77813
77910
|
this._trigger.registerMark(nodeMark);
|
|
@@ -77825,11 +77922,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
77825
77922
|
y1: (datum) => datum.y1,
|
|
77826
77923
|
thickness: (datum) => datum.thickness,
|
|
77827
77924
|
fill: (datum) => {
|
|
77828
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
77925
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
77829
77926
|
const sourceName = ((_a = this._spec) === null || _a === void 0 ? void 0 : _a.nodeKey) || ((_d = (_c = (_b = this._rawData.latestData[0]) === null || _b === void 0 ? void 0 : _b.nodes) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.children)
|
|
77830
77927
|
? datum.source
|
|
77831
77928
|
: this.getNodeList()[datum.source];
|
|
77832
|
-
return (_g = (_f = (_e = this._spec.link) === null || _e === void 0 ? void 0 : _e.style) === null || _f === void 0 ? void 0 : _f.fill) !== null && _g !== void 0 ? _g : this.
|
|
77929
|
+
return (_g = (_f = (_e = this._spec.link) === null || _e === void 0 ? void 0 : _e.style) === null || _f === void 0 ? void 0 : _f.fill) !== null && _g !== void 0 ? _g : (_h = this._colorScale) === null || _h === void 0 ? void 0 : _h.scale(sourceName);
|
|
77833
77930
|
},
|
|
77834
77931
|
direction: (_a = this._spec.direction) !== null && _a !== void 0 ? _a : 'horizontal'
|
|
77835
77932
|
}, STATE_VALUE_ENUM.STATE_NORMAL, AttributeLevel.Series);
|
|
@@ -77883,8 +77980,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
77883
77980
|
return datum.y1;
|
|
77884
77981
|
},
|
|
77885
77982
|
fill: (datum) => {
|
|
77886
|
-
var _a, _b, _c;
|
|
77887
|
-
return (_c = (_b = (_a = this._spec.node) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.fill) !== null && _c !== void 0 ? _c : this.
|
|
77983
|
+
var _a, _b, _c, _d;
|
|
77984
|
+
return (_c = (_b = (_a = this._spec.node) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.fill) !== null && _c !== void 0 ? _c : (_d = this._colorScale) === null || _d === void 0 ? void 0 : _d.scale(this._getNodeNameFromData(datum));
|
|
77888
77985
|
},
|
|
77889
77986
|
text: (datum) => this._createText(datum),
|
|
77890
77987
|
limit: this._labelLimit,
|
|
@@ -77937,8 +78034,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
77937
78034
|
x: (datum) => datum.x0,
|
|
77938
78035
|
y: (datum) => (datum.y0 + datum.y1) / 2,
|
|
77939
78036
|
fill: (datum) => {
|
|
77940
|
-
var _a, _b, _c;
|
|
77941
|
-
return (_c = (_b = (_a = this._spec.node) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.fill) !== null && _c !== void 0 ? _c : this.
|
|
78037
|
+
var _a, _b, _c, _d;
|
|
78038
|
+
return (_c = (_b = (_a = this._spec.node) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.fill) !== null && _c !== void 0 ? _c : (_d = this._colorScale) === null || _d === void 0 ? void 0 : _d.scale(this._getNodeNameFromData(datum));
|
|
77942
78039
|
},
|
|
77943
78040
|
text: (datum) => this._createText(datum),
|
|
77944
78041
|
limit: this._labelLimit,
|
|
@@ -77951,8 +78048,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
77951
78048
|
x: (datum) => datum.x1,
|
|
77952
78049
|
y: (datum) => (datum.y0 + datum.y1) / 2,
|
|
77953
78050
|
fill: (datum) => {
|
|
77954
|
-
var _a, _b, _c;
|
|
77955
|
-
return (_c = (_b = (_a = this._spec.node) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.fill) !== null && _c !== void 0 ? _c : this.
|
|
78051
|
+
var _a, _b, _c, _d;
|
|
78052
|
+
return (_c = (_b = (_a = this._spec.node) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.fill) !== null && _c !== void 0 ? _c : (_d = this._colorScale) === null || _d === void 0 ? void 0 : _d.scale(this._getNodeNameFromData(datum));
|
|
77956
78053
|
},
|
|
77957
78054
|
text: (datum) => this._createText(datum),
|
|
77958
78055
|
limit: this._labelLimit,
|
|
@@ -77970,8 +78067,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
77970
78067
|
},
|
|
77971
78068
|
y: (datum) => (datum.y0 + datum.y1) / 2,
|
|
77972
78069
|
fill: (datum) => {
|
|
77973
|
-
var _a, _b, _c;
|
|
77974
|
-
return (_c = (_b = (_a = this._spec.node) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.fill) !== null && _c !== void 0 ? _c : this.
|
|
78070
|
+
var _a, _b, _c, _d;
|
|
78071
|
+
return (_c = (_b = (_a = this._spec.node) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.fill) !== null && _c !== void 0 ? _c : (_d = this._colorScale) === null || _d === void 0 ? void 0 : _d.scale(this._getNodeNameFromData(datum));
|
|
77975
78072
|
},
|
|
77976
78073
|
text: (datum) => this._createText(datum),
|
|
77977
78074
|
limit: this._labelLimit,
|
|
@@ -78046,6 +78143,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
78046
78143
|
nodesSeriesDataUpdate() {
|
|
78047
78144
|
this.event.emit(ChartEvent.legendFilter, { model: this });
|
|
78048
78145
|
this._nodesSeriesData.updateData();
|
|
78146
|
+
this._setNodeOrdinalColorScale();
|
|
78049
78147
|
}
|
|
78050
78148
|
linksSeriesDataUpdate() {
|
|
78051
78149
|
this.event.emit(ChartEvent.legendFilter, { model: this });
|
|
@@ -78057,33 +78155,32 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
78057
78155
|
this._linkMark && this._tooltipHelper.activeTriggerSet.mark.add(this._linkMark);
|
|
78058
78156
|
this._labelMark && this._tooltipHelper.activeTriggerSet.mark.add(this._labelMark);
|
|
78059
78157
|
}
|
|
78060
|
-
|
|
78061
|
-
var _a, _b, _c, _d, _e
|
|
78062
|
-
|
|
78063
|
-
|
|
78064
|
-
|
|
78065
|
-
|
|
78066
|
-
|
|
78067
|
-
|
|
78068
|
-
|
|
78069
|
-
|
|
78070
|
-
|
|
78071
|
-
|
|
78072
|
-
|
|
78073
|
-
|
|
78074
|
-
|
|
78075
|
-
|
|
78076
|
-
|
|
78077
|
-
|
|
78078
|
-
if (((_k = this._option.globalScale.getScale('color')) === null || _k === void 0 ? void 0 : _k.domain().length) === 0 ||
|
|
78079
|
-
isNil$1(this._option.globalScale.getScale('color').domain()[0])) {
|
|
78158
|
+
_setNodeOrdinalColorScale() {
|
|
78159
|
+
var _a, _b, _c, _d, _e;
|
|
78160
|
+
const colorScale = (_b = (_a = this._option) === null || _a === void 0 ? void 0 : _a.globalScale) === null || _b === void 0 ? void 0 : _b.getScale('color');
|
|
78161
|
+
if (colorScale === null || colorScale === void 0 ? void 0 : colorScale._specified) {
|
|
78162
|
+
this._colorScale = colorScale;
|
|
78163
|
+
return;
|
|
78164
|
+
}
|
|
78165
|
+
let colorDomain;
|
|
78166
|
+
let colorRange;
|
|
78167
|
+
if (colorScale) {
|
|
78168
|
+
colorDomain = colorScale.domain();
|
|
78169
|
+
colorRange = colorScale.range();
|
|
78170
|
+
}
|
|
78171
|
+
if (!colorRange) {
|
|
78172
|
+
colorRange = this._getDataScheme();
|
|
78173
|
+
}
|
|
78174
|
+
if (!colorDomain || isNil$1(colorDomain[0])) {
|
|
78175
|
+
colorDomain = this.getNodeList();
|
|
78080
78176
|
if (colorDomain.length > 10) {
|
|
78081
|
-
colorRange = (
|
|
78177
|
+
colorRange = (_c = this._getDataScheme()[1]) === null || _c === void 0 ? void 0 : _c.scheme;
|
|
78082
78178
|
}
|
|
78083
78179
|
}
|
|
78084
78180
|
const ordinalScale = new ColorOrdinalScale();
|
|
78085
|
-
(
|
|
78086
|
-
|
|
78181
|
+
(_e = (_d = ordinalScale.domain(colorDomain)).range) === null || _e === void 0 ? void 0 : _e.call(_d, colorRange);
|
|
78182
|
+
this._colorScale = ordinalScale;
|
|
78183
|
+
return;
|
|
78087
78184
|
}
|
|
78088
78185
|
getNodeList() {
|
|
78089
78186
|
var _a, _b, _c;
|
|
@@ -83635,7 +83732,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
83635
83732
|
}
|
|
83636
83733
|
}
|
|
83637
83734
|
function getSvgHtml(option, valueToHtml) {
|
|
83638
|
-
var _a, _b, _c, _d, _e, _f;
|
|
83735
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
83639
83736
|
if (!(option === null || option === void 0 ? void 0 : option.hasShape) || !option.symbolType) {
|
|
83640
83737
|
return '';
|
|
83641
83738
|
}
|
|
@@ -83666,9 +83763,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
83666
83763
|
</svg>`;
|
|
83667
83764
|
}
|
|
83668
83765
|
if (isObject$2(fill)) {
|
|
83669
|
-
fillString = 'gradientColor';
|
|
83766
|
+
fillString = (_b = 'gradientColor' + option.index) !== null && _b !== void 0 ? _b : '';
|
|
83670
83767
|
let gradient = '';
|
|
83671
|
-
const stops = ((
|
|
83768
|
+
const stops = ((_c = fill.stops) !== null && _c !== void 0 ? _c : [])
|
|
83672
83769
|
.map(s => `<stop offset="${valueToHtml(s.offset.toString())}" stop-color="${valueToHtml(s.color)}"/>`)
|
|
83673
83770
|
.join('');
|
|
83674
83771
|
if (fill.gradient === 'radial') {
|
|
@@ -83677,7 +83774,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
83677
83774
|
</radialGradient>`;
|
|
83678
83775
|
}
|
|
83679
83776
|
else if (fill.gradient === 'linear') {
|
|
83680
|
-
gradient = `<linearGradient id="${fillString}" x1="${((
|
|
83777
|
+
gradient = `<linearGradient id="${fillString}" x1="${((_d = fill.x0) !== null && _d !== void 0 ? _d : 0) * 100}%" y1="${((_e = fill.y0) !== null && _e !== void 0 ? _e : 0) * 100}%" x2="${((_f = fill.x1) !== null && _f !== void 0 ? _f : 0) * 100}%" y2="${((_g = fill.y1) !== null && _g !== void 0 ? _g : 0) * 100}%">
|
|
83681
83778
|
${stops}
|
|
83682
83779
|
</linearGradient>`;
|
|
83683
83780
|
}
|
|
@@ -83715,6 +83812,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
83715
83812
|
}
|
|
83716
83813
|
}
|
|
83717
83814
|
|
|
83815
|
+
const defaultLabelStyle = {
|
|
83816
|
+
overflowWrap: 'normal',
|
|
83817
|
+
wordWrap: 'normal'
|
|
83818
|
+
};
|
|
83718
83819
|
class ContentColumnModel extends BaseTooltipModel {
|
|
83719
83820
|
constructor(parent, option, className, childIndex) {
|
|
83720
83821
|
super(parent, option, childIndex);
|
|
@@ -83768,7 +83869,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
83768
83869
|
let childStyle = {};
|
|
83769
83870
|
if (this.className === 'key-box') {
|
|
83770
83871
|
const { key, isKeyAdaptive } = line;
|
|
83771
|
-
childStyle = mergeSpec({}, isKeyAdaptive ? defaultAdaptiveKeyStyle : defaultKeyStyle, Object.assign(Object.assign({ height: getPixelPropertyStr(contentAttributes[i].height)
|
|
83872
|
+
childStyle = mergeSpec({}, isKeyAdaptive ? defaultAdaptiveKeyStyle : defaultKeyStyle, Object.assign(Object.assign(Object.assign({ height: getPixelPropertyStr(contentAttributes[i].height) }, defaultLabelStyle), tooltipStyle.keyColumn.common), (_a = tooltipStyle.keyColumn.items) === null || _a === void 0 ? void 0 : _a[i]));
|
|
83772
83873
|
const hasContent = (isString$1(key) && ((_b = key === null || key === void 0 ? void 0 : key.trim) === null || _b === void 0 ? void 0 : _b.call(key)) !== '') || isNumber$2(key);
|
|
83773
83874
|
if (!hasContent && !childStyle.visibility) {
|
|
83774
83875
|
childStyle.visibility = 'hidden';
|
|
@@ -83779,7 +83880,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
83779
83880
|
this.children[i].setStyle(childStyle);
|
|
83780
83881
|
}
|
|
83781
83882
|
else if (this.className === 'value-box') {
|
|
83782
|
-
childStyle = mergeSpec({}, defaultValueStyle, Object.assign(Object.assign({ height: getPixelPropertyStr(contentAttributes[i].height)
|
|
83883
|
+
childStyle = mergeSpec({}, defaultValueStyle, Object.assign(Object.assign(Object.assign({ height: getPixelPropertyStr(contentAttributes[i].height) }, defaultLabelStyle), tooltipStyle.valueColumn.common), (_c = tooltipStyle.valueColumn.items) === null || _c === void 0 ? void 0 : _c[i]));
|
|
83783
83884
|
this.children[i].setStyle(childStyle);
|
|
83784
83885
|
}
|
|
83785
83886
|
else if (this.className === 'shape-box') {
|
|
@@ -83849,7 +83950,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
83849
83950
|
stroke: line.shapeStroke,
|
|
83850
83951
|
lineWidth: line.shapeLineWidth,
|
|
83851
83952
|
hollow: line.shapeHollow,
|
|
83852
|
-
marginTop: `calc((${(_e = (_d = keyColumn.lineHeight) !== null && _d !== void 0 ? _d : keyColumn.fontSize) !== null && _e !== void 0 ? _e : '18px'} - ${(_f = shapeColumn.width) !== null && _f !== void 0 ? _f : '8px'}) / 2)
|
|
83953
|
+
marginTop: `calc((${(_e = (_d = keyColumn.lineHeight) !== null && _d !== void 0 ? _d : keyColumn.fontSize) !== null && _e !== void 0 ? _e : '18px'} - ${(_f = shapeColumn.width) !== null && _f !== void 0 ? _f : '8px'}) / 2)`,
|
|
83954
|
+
index
|
|
83853
83955
|
};
|
|
83854
83956
|
}
|
|
83855
83957
|
}
|