@visactor/react-vchart 2.0.15 → 2.0.16
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 +131 -58
- package/build/index.min.js +3 -3
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.js +1 -1
- package/esm/index.js.map +1 -1
- package/package.json +6 -6
package/build/index.js
CHANGED
|
@@ -66331,6 +66331,31 @@
|
|
|
66331
66331
|
const DEFAULT_FONT_PADDING = 1;
|
|
66332
66332
|
const SHAPE_TYPE = ["triangleForward", "triangle", "diamond", "square", "star", "cardioid", "circle", "pentagon", "rect"];
|
|
66333
66333
|
|
|
66334
|
+
class WordMeasureCache {
|
|
66335
|
+
constructor(maxSize = 1e3) {
|
|
66336
|
+
this._map = new Map(), this._maxSize = maxSize;
|
|
66337
|
+
}
|
|
66338
|
+
get(key) {
|
|
66339
|
+
const v = this._map.get(key);
|
|
66340
|
+
if (v) return this._map.delete(key), this._map.set(key, v), v;
|
|
66341
|
+
}
|
|
66342
|
+
set(key, value) {
|
|
66343
|
+
if (this._map.has(key)) this._map.set(key, value);else {
|
|
66344
|
+
if (this._map.size >= this._maxSize) {
|
|
66345
|
+
const oldest = this._map.keys().next().value;
|
|
66346
|
+
void 0 !== oldest && this._map.delete(oldest);
|
|
66347
|
+
}
|
|
66348
|
+
this._map.set(key, value);
|
|
66349
|
+
}
|
|
66350
|
+
}
|
|
66351
|
+
clear() {
|
|
66352
|
+
this._map.clear();
|
|
66353
|
+
}
|
|
66354
|
+
size() {
|
|
66355
|
+
return this._map.size;
|
|
66356
|
+
}
|
|
66357
|
+
}
|
|
66358
|
+
|
|
66334
66359
|
const WORD_CLOUD_TEXT = `${PREFIX}_WORD_CLOUD_TEXT`;
|
|
66335
66360
|
|
|
66336
66361
|
const wordCloudSeriesMark = Object.assign(Object.assign({}, baseSeriesMark), {
|
|
@@ -66387,12 +66412,13 @@
|
|
|
66387
66412
|
fillingSeriesField: this.getSeriesField(),
|
|
66388
66413
|
fillingRotateAngles: DEFAULT_ROTATE_ANGLES,
|
|
66389
66414
|
layoutMode: "default"
|
|
66390
|
-
}, this._spec.wordCloudShapeConfig), this._isWordCloudShape = !SHAPE_TYPE.includes(this._maskShape) && !["fast", "grid", "cloud"].includes(this._wordCloudConfig.layoutMode), this._defaultFontFamily = this._option.getTheme("fontFamily");
|
|
66415
|
+
}, this._spec.wordCloudShapeConfig), this._isWordCloudShape = !SHAPE_TYPE.includes(this._maskShape) && !["fast", "grid", "cloud"].includes(this._wordCloudConfig.layoutMode), this._defaultFontFamily = this._option.getTheme("fontFamily"), this._wordMeasureCache || (this._wordMeasureCache = new WordMeasureCache(1e3));
|
|
66391
66416
|
}
|
|
66392
66417
|
initData() {
|
|
66393
66418
|
var _a, _b;
|
|
66394
66419
|
super.initData(), null === (_b = null === (_a = this.getViewData()) || void 0 === _a ? void 0 : _a.target) || void 0 === _b || _b.addListener("change", () => {
|
|
66395
|
-
|
|
66420
|
+
var _a;
|
|
66421
|
+
null === (_a = this._wordMeasureCache) || void 0 === _a || _a.clear(), this._dataChange = !0, this.compile();
|
|
66396
66422
|
});
|
|
66397
66423
|
}
|
|
66398
66424
|
initMark() {
|
|
@@ -66559,6 +66585,7 @@
|
|
|
66559
66585
|
wordCloudShapeConfig = null !== (_c = this._wordCloudShapeConfig) && void 0 !== _c ? _c : {};
|
|
66560
66586
|
return Object.assign(Object.assign(Object.assign({}, wordCloudShapeConfig), this._getCommonTransformOptions()), {
|
|
66561
66587
|
createImage: createImage,
|
|
66588
|
+
measureCache: this._wordMeasureCache,
|
|
66562
66589
|
rotateList: this._rotateAngles,
|
|
66563
66590
|
fillingRotateList: wordCloudShapeConfig.fillingRotateAngles,
|
|
66564
66591
|
fillingFontFamily: isValid$1(wordCloudShapeConfig.fillingFontFamilyField) ? {
|
|
@@ -66614,7 +66641,12 @@
|
|
|
66614
66641
|
return [this._wordMark];
|
|
66615
66642
|
}
|
|
66616
66643
|
reInit() {
|
|
66617
|
-
|
|
66644
|
+
var _a;
|
|
66645
|
+
super.reInit(), this._keyWordColorCallback && (this._keyWordColorCallback = null), this._fillingColorCallback && (this._fillingColorCallback = null), null === (_a = this._wordMeasureCache) || void 0 === _a || _a.clear();
|
|
66646
|
+
}
|
|
66647
|
+
release() {
|
|
66648
|
+
var _a;
|
|
66649
|
+
super.release(), null === (_a = this._wordMeasureCache) || void 0 === _a || _a.clear(), this._wordMeasureCache = void 0;
|
|
66618
66650
|
}
|
|
66619
66651
|
}
|
|
66620
66652
|
BaseWordCloudSeries.mark = wordCloudSeriesMark, BaseWordCloudSeries.builtInTheme = {
|
|
@@ -69899,6 +69931,30 @@
|
|
|
69899
69931
|
!function (WORDCLOUD_SHAPE_HOOK_EVENT) {
|
|
69900
69932
|
WORDCLOUD_SHAPE_HOOK_EVENT.BEFORE_WORDCLOUD_SHAPE_LAYOUT = "beforeWordcloudShapeLayout", WORDCLOUD_SHAPE_HOOK_EVENT.AFTER_WORDCLOUD_SHAPE_LAYOUT = "afterWordcloudShapeLayout", WORDCLOUD_SHAPE_HOOK_EVENT.AFTER_WORDCLOUD_SHAPE_DRAW = "afterWordcloudShapeDraw";
|
|
69901
69933
|
}(WORDCLOUD_SHAPE_HOOK_EVENT || (WORDCLOUD_SHAPE_HOOK_EVENT = {}));
|
|
69934
|
+
class MapWordMeasureCache {
|
|
69935
|
+
constructor(maxSize = 1e3) {
|
|
69936
|
+
this._map = new Map(), this._maxSize = maxSize;
|
|
69937
|
+
}
|
|
69938
|
+
get(key) {
|
|
69939
|
+
const value = this._map.get(key);
|
|
69940
|
+
if (void 0 !== value) return this._map.delete(key), this._map.set(key, value), value;
|
|
69941
|
+
}
|
|
69942
|
+
set(key, value) {
|
|
69943
|
+
if (this._map.has(key)) this._map.set(key, value);else {
|
|
69944
|
+
if (this._map.size >= this._maxSize) {
|
|
69945
|
+
const firstKey = this._map.keys().next().value;
|
|
69946
|
+
void 0 !== firstKey && this._map.delete(firstKey);
|
|
69947
|
+
}
|
|
69948
|
+
this._map.set(key, value);
|
|
69949
|
+
}
|
|
69950
|
+
}
|
|
69951
|
+
clear() {
|
|
69952
|
+
this._map.clear();
|
|
69953
|
+
}
|
|
69954
|
+
size() {
|
|
69955
|
+
return this._map.size;
|
|
69956
|
+
}
|
|
69957
|
+
}
|
|
69902
69958
|
const colorListEqual = (arr0, arr1) => {
|
|
69903
69959
|
if (1 === arr1.length && "#537EF5" === arr1[0]) return !0;
|
|
69904
69960
|
if (!Array.isArray(arr0) || !Array.isArray(arr1) || arr0.length !== arr1.length) return !1;
|
|
@@ -69986,7 +70042,7 @@
|
|
|
69986
70042
|
ratio: ratio
|
|
69987
70043
|
} = region;
|
|
69988
70044
|
for (let i = 0; i < regionWords.length; i++) {
|
|
69989
|
-
measureSprite(canvas, ctx, words, i);
|
|
70045
|
+
measureSprite(canvas, ctx, words, i, layoutConfig.measureCache);
|
|
69990
70046
|
const word = regionWords[i];
|
|
69991
70047
|
word.x = center[0], word.y = center[1], word.hasText && word.sprite && place(board, word, maxR, ratio, size, boardSize, stepFactor) && (word.hasPlaced = !0);
|
|
69992
70048
|
}
|
|
@@ -69996,7 +70052,7 @@
|
|
|
69996
70052
|
if (0 === failedWords.length) break;
|
|
69997
70053
|
for (let i = 0; i < failedWords.length; i++) {
|
|
69998
70054
|
const word = failedWords[i];
|
|
69999
|
-
measureSprite(canvas, ctx, failedWords, i), word.x = shapeCenter[0], word.y = shapeCenter[1], word.hasText && place(board, word, shapeMaxR, shapeRatio, size, boardSize, stepFactor) && (word.hasPlaced = !0);
|
|
70055
|
+
measureSprite(canvas, ctx, failedWords, i, layoutConfig.measureCache), word.x = shapeCenter[0], word.y = shapeCenter[1], word.hasText && place(board, word, shapeMaxR, shapeRatio, size, boardSize, stepFactor) && (word.hasPlaced = !0);
|
|
70000
70056
|
}
|
|
70001
70057
|
}
|
|
70002
70058
|
layoutConfig.board = board;
|
|
@@ -70042,7 +70098,7 @@
|
|
|
70042
70098
|
} = region;
|
|
70043
70099
|
let restartTag = !1;
|
|
70044
70100
|
for (let i = 0; i < regionWords.length; i++) {
|
|
70045
|
-
measureSprite(canvas, ctx, words, i);
|
|
70101
|
+
measureSprite(canvas, ctx, words, i, layoutConfig.measureCache);
|
|
70046
70102
|
const word = regionWords[i];
|
|
70047
70103
|
if (word.x = center[0], word.y = center[1], !word.skip && word.hasText && word.sprite && place(board, word, maxR, ratio, size, boardSize, stepFactor)) word.hasPlaced = !0;else {
|
|
70048
70104
|
if (!word.skip && word.weight > weightStd && globalShinkFactor > globalShinkLimit) {
|
|
@@ -70067,7 +70123,7 @@
|
|
|
70067
70123
|
if (0 === failedWords.length) break;
|
|
70068
70124
|
for (let i = 0; i < failedWords.length; i++) {
|
|
70069
70125
|
const word = failedWords[i];
|
|
70070
|
-
measureSprite(canvas, ctx, failedWords, i), word.x = shapeCenter[0], word.y = shapeCenter[1], word.hasText && place(board, word, shapeMaxR, shapeRatio, size, boardSize, stepFactor) && (word.hasPlaced = !0);
|
|
70126
|
+
measureSprite(canvas, ctx, failedWords, i, layoutConfig.measureCache), word.x = shapeCenter[0], word.y = shapeCenter[1], word.hasText && place(board, word, shapeMaxR, shapeRatio, size, boardSize, stepFactor) && (word.hasPlaced = !0);
|
|
70071
70127
|
}
|
|
70072
70128
|
}
|
|
70073
70129
|
layoutConfig.board = board;
|
|
@@ -70112,7 +70168,7 @@
|
|
|
70112
70168
|
} = region;
|
|
70113
70169
|
let restartTag = !1;
|
|
70114
70170
|
for (let i = 0; i < regionWords.length; i++) {
|
|
70115
|
-
measureSprite(canvas, ctx, words, i);
|
|
70171
|
+
measureSprite(canvas, ctx, words, i, layoutConfig.measureCache);
|
|
70116
70172
|
const word = regionWords[i];
|
|
70117
70173
|
if (word.x = center[0], word.y = center[1], word.hasText && word.sprite && place(board, word, maxR, ratio, size, boardSize, stepFactor)) {
|
|
70118
70174
|
if (word.hasPlaced = !0, word.weight >= weightStd && importantWordSuccessedNum++, importantWordSuccessedNum >= importantCount && !layoutFinish) {
|
|
@@ -70138,7 +70194,7 @@
|
|
|
70138
70194
|
if (0 === failedWords.length) break;
|
|
70139
70195
|
for (let i = 0; i < failedWords.length; i++) {
|
|
70140
70196
|
const word = failedWords[i];
|
|
70141
|
-
measureSprite(canvas, ctx, failedWords, i), word.x = shapeCenter[0], word.y = shapeCenter[1], word.hasText && place(board, word, shapeMaxR, shapeRatio, size, boardSize, stepFactor) && (word.hasPlaced = !0);
|
|
70197
|
+
measureSprite(canvas, ctx, failedWords, i, layoutConfig.measureCache), word.x = shapeCenter[0], word.y = shapeCenter[1], word.hasText && place(board, word, shapeMaxR, shapeRatio, size, boardSize, stepFactor) && (word.hasPlaced = !0);
|
|
70142
70198
|
}
|
|
70143
70199
|
}
|
|
70144
70200
|
layoutConfig.board = board;
|
|
@@ -70217,8 +70273,13 @@
|
|
|
70217
70273
|
return [ratio * (t *= .1) * Math.cos(t), t * Math.sin(t)];
|
|
70218
70274
|
};
|
|
70219
70275
|
}
|
|
70220
|
-
function measureSprite(canvas, ctx, words, wi) {
|
|
70221
|
-
|
|
70276
|
+
function measureSprite(canvas, ctx, words, wi, cache) {
|
|
70277
|
+
const targetWord = words[wi];
|
|
70278
|
+
if (targetWord.sprite || 0 === targetWord.fontSize) return;
|
|
70279
|
+
if (cache) {
|
|
70280
|
+
const cached = cache.get(getWordMeasureKey(targetWord));
|
|
70281
|
+
if (cached) return targetWord.sprite = cached.sprite, targetWord.bounds = cached.bounds, targetWord.wordSize = cached.wordSize, void (targetWord.hasText = !0);
|
|
70282
|
+
}
|
|
70222
70283
|
const cw = 2048,
|
|
70223
70284
|
radians = Math.PI / 180,
|
|
70224
70285
|
n = words.length;
|
|
@@ -70281,14 +70342,25 @@
|
|
|
70281
70342
|
}
|
|
70282
70343
|
seen && (j < dTop && (dTop = j), j > dBottom && (dBottom = j));
|
|
70283
70344
|
}
|
|
70284
|
-
word.bounds = {
|
|
70345
|
+
if (word.bounds = {
|
|
70285
70346
|
dTop: (wordSize[1] >> 1) - dTop,
|
|
70286
70347
|
dBottom: dBottom - (wordSize[1] >> 1),
|
|
70287
70348
|
dLeft: (wordSize[0] >> 1) - dLeft,
|
|
70288
70349
|
dRight: dRight - (wordSize[0] >> 1)
|
|
70289
|
-
}, word.sprite = sprite,
|
|
70350
|
+
}, word.sprite = sprite, cache) {
|
|
70351
|
+
const key = getWordMeasureKey(word);
|
|
70352
|
+
cache.set(key, {
|
|
70353
|
+
sprite: sprite,
|
|
70354
|
+
bounds: word.bounds,
|
|
70355
|
+
wordSize: wordSize
|
|
70356
|
+
});
|
|
70357
|
+
}
|
|
70358
|
+
delete word.LT;
|
|
70290
70359
|
}
|
|
70291
70360
|
}
|
|
70361
|
+
function getWordMeasureKey(word) {
|
|
70362
|
+
return String(word.text) + "|" + String(word.fontFamily) + "|" + String(word.fontStyle) + "|" + String(word.fontWeight) + "|" + String(word.fontSize) + "|" + String(word.rotate) + "|" + String(word.padding);
|
|
70363
|
+
}
|
|
70292
70364
|
function initBoardWithShape(segmentationOutput) {
|
|
70293
70365
|
const {
|
|
70294
70366
|
segmentation: {
|
|
@@ -70385,7 +70457,7 @@
|
|
|
70385
70457
|
} = shapeBounds,
|
|
70386
70458
|
[startX, startY] = [x1 + ~~(randomGenerator() * fillingXStep * 2), y1 + ~~(randomGenerator() * fillingYStep * 2)];
|
|
70387
70459
|
for (let y = startY; y <= y2; y += fillingYStep) for (let x = startX; x <= x2; x += fillingXStep) {
|
|
70388
|
-
measureSprite(canvas, ctx, fillingWords, wi);
|
|
70460
|
+
measureSprite(canvas, ctx, fillingWords, wi, layoutConfig.measureCache);
|
|
70389
70461
|
const word = fillingWords[wi];
|
|
70390
70462
|
word.x = x, word.y = y;
|
|
70391
70463
|
const {
|
|
@@ -70521,7 +70593,7 @@
|
|
|
70521
70593
|
return this.progressiveResult;
|
|
70522
70594
|
}
|
|
70523
70595
|
doLayout() {
|
|
70524
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
70596
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
70525
70597
|
const segmentationInput = this.segmentationInput,
|
|
70526
70598
|
segmentationOutput = segmentation(segmentationInput);
|
|
70527
70599
|
if (!segmentationOutput.segmentation.regions.length) return;
|
|
@@ -70548,35 +70620,36 @@
|
|
|
70548
70620
|
const layoutConfig = {
|
|
70549
70621
|
size: options.size,
|
|
70550
70622
|
ratio: options.ratio || .8,
|
|
70623
|
+
measureCache: null !== (_a = options.measureCache) && void 0 !== _a ? _a : new MapWordMeasureCache(),
|
|
70551
70624
|
shapeUrl: options.shape,
|
|
70552
70625
|
random: void 0 === options.random || options.random,
|
|
70553
|
-
textLayoutTimes: null !== (
|
|
70626
|
+
textLayoutTimes: null !== (_b = options.textLayoutTimes) && void 0 !== _b ? _b : 3,
|
|
70554
70627
|
removeWhiteBorder: options.removeWhiteBorder,
|
|
70555
|
-
layoutMode: null !== (
|
|
70556
|
-
fontSizeShrinkFactor: null !== (
|
|
70557
|
-
stepFactor: null !== (
|
|
70558
|
-
importantWordCount: null !== (
|
|
70628
|
+
layoutMode: null !== (_c = options.layoutMode) && void 0 !== _c ? _c : "default",
|
|
70629
|
+
fontSizeShrinkFactor: null !== (_d = options.fontSizeShrinkFactor) && void 0 !== _d ? _d : .8,
|
|
70630
|
+
stepFactor: null !== (_e = options.stepFactor) && void 0 !== _e ? _e : 1,
|
|
70631
|
+
importantWordCount: null !== (_f = options.importantWordCount) && void 0 !== _f ? _f : 10,
|
|
70559
70632
|
globalShinkLimit: options.globalShinkLimit || .2,
|
|
70560
|
-
fontSizeEnlargeFactor: null !== (
|
|
70561
|
-
fillingRatio: null !== (
|
|
70562
|
-
fillingTimes: null !== (
|
|
70563
|
-
fillingXStep: options.fillingXRatioStep ? Math.max(Math.floor(options.size[0] * options.fillingXRatioStep), 1) : null !== (
|
|
70564
|
-
fillingYStep: options.fillingYRatioStep ? Math.max(Math.floor(options.size[1] * options.fillingYRatioStep), 1) : null !== (
|
|
70633
|
+
fontSizeEnlargeFactor: null !== (_g = options.fontSizeEnlargeFactor) && void 0 !== _g ? _g : 1.5,
|
|
70634
|
+
fillingRatio: null !== (_h = options.fillingRatio) && void 0 !== _h ? _h : .7,
|
|
70635
|
+
fillingTimes: null !== (_j = options.fillingTimes) && void 0 !== _j ? _j : 4,
|
|
70636
|
+
fillingXStep: options.fillingXRatioStep ? Math.max(Math.floor(options.size[0] * options.fillingXRatioStep), 1) : null !== (_k = options.fillingXStep) && void 0 !== _k ? _k : 4,
|
|
70637
|
+
fillingYStep: options.fillingYRatioStep ? Math.max(Math.floor(options.size[1] * options.fillingYRatioStep), 1) : null !== (_l = options.fillingYStep) && void 0 !== _l ? _l : 4,
|
|
70565
70638
|
fillingInitialFontSize: options.fillingInitialFontSize,
|
|
70566
70639
|
fillingDeltaFontSize: options.fillingDeltaFontSize,
|
|
70567
|
-
fillingInitialOpacity: null !== (
|
|
70568
|
-
fillingDeltaOpacity: null !== (
|
|
70640
|
+
fillingInitialOpacity: null !== (_m = options.fillingInitialOpacity) && void 0 !== _m ? _m : .8,
|
|
70641
|
+
fillingDeltaOpacity: null !== (_o = options.fillingDeltaOpacity) && void 0 !== _o ? _o : .05,
|
|
70569
70642
|
getFillingFontFamily: simpleField(options.fillingFontFamily || "sans-serif"),
|
|
70570
70643
|
getFillingFontStyle: simpleField(options.fillingFontStyle || "normal"),
|
|
70571
70644
|
getFillingFontWeight: simpleField(options.fillingFontWeight || "normal"),
|
|
70572
|
-
getFillingPadding: simpleField(null !== (
|
|
70573
|
-
fillingRotateList: null !== (
|
|
70574
|
-
fillingDeltaFontSizeFactor: null !== (
|
|
70645
|
+
getFillingPadding: simpleField(null !== (_p = options.fillingPadding) && void 0 !== _p ? _p : .4),
|
|
70646
|
+
fillingRotateList: null !== (_q = options.fillingRotateList) && void 0 !== _q ? _q : [0, 90],
|
|
70647
|
+
fillingDeltaFontSizeFactor: null !== (_r = options.fillingDeltaFontSizeFactor) && void 0 !== _r ? _r : .2,
|
|
70575
70648
|
fillingColorList: options.fillingColorList || ["#537EF5"],
|
|
70576
70649
|
sameColorList: !1,
|
|
70577
|
-
minInitFontSize: null !== (
|
|
70578
|
-
minFontSize: null !== (
|
|
70579
|
-
minFillFontSize: null !== (
|
|
70650
|
+
minInitFontSize: null !== (_s = options.minInitFontSize) && void 0 !== _s ? _s : 10,
|
|
70651
|
+
minFontSize: null !== (_t = options.minFontSize) && void 0 !== _t ? _t : 4,
|
|
70652
|
+
minFillFontSize: null !== (_u = options.minFillFontSize) && void 0 !== _u ? _u : 2
|
|
70580
70653
|
},
|
|
70581
70654
|
sameColorList = colorListEqual(wordsConfig.colorList, layoutConfig.fillingColorList);
|
|
70582
70655
|
layoutConfig.sameColorList = sameColorList, initColorScale(data, wordsConfig, layoutConfig, options), initFillingWordsFontSize(data, wordsConfig, layoutConfig, segmentationOutput);
|
|
@@ -70623,8 +70696,8 @@
|
|
|
70623
70696
|
successedWords: successedWords,
|
|
70624
70697
|
failedWords: failedWords
|
|
70625
70698
|
} = cloud(words, layoutConfig, segmentationOutput),
|
|
70626
|
-
textKey = null !== (
|
|
70627
|
-
dataIndexKey = null !== (
|
|
70699
|
+
textKey = null !== (_w = null === (_v = options.text) || void 0 === _v ? void 0 : _v.field) && void 0 !== _w ? _w : "textKey",
|
|
70700
|
+
dataIndexKey = null !== (_x = options.dataIndexKey) && void 0 !== _x ? _x : "defaultDataIndexKey",
|
|
70628
70701
|
as = options.as ? Object.assign(Object.assign({}, OUTPUT), options.as) : OUTPUT;
|
|
70629
70702
|
let w, t;
|
|
70630
70703
|
const modKeywords = [];
|
|
@@ -83200,13 +83273,13 @@
|
|
|
83200
83273
|
return "polar" === markerSpec.coordinateType || doPolarProcess ? "polar" : "geo" === markerSpec.coordinateType || doGeoProcess ? "geo" : "cartesian";
|
|
83201
83274
|
}
|
|
83202
83275
|
_createMarkerComponent() {
|
|
83203
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8;
|
|
83276
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
|
|
83204
83277
|
const {
|
|
83205
83278
|
itemContent = {},
|
|
83206
83279
|
itemLine = {},
|
|
83207
83280
|
targetSymbol = {}
|
|
83208
83281
|
} = this._spec,
|
|
83209
|
-
|
|
83282
|
+
_10 = itemContent,
|
|
83210
83283
|
{
|
|
83211
83284
|
type = "text",
|
|
83212
83285
|
text: label,
|
|
@@ -83221,8 +83294,8 @@
|
|
|
83221
83294
|
customMarkStyle: customMarkStyle,
|
|
83222
83295
|
style = {},
|
|
83223
83296
|
state = {}
|
|
83224
|
-
} =
|
|
83225
|
-
restItemContent = __rest$1(
|
|
83297
|
+
} = _10,
|
|
83298
|
+
restItemContent = __rest$1(_10, ["type", "text", "symbol", "image", "richText", "customMark", "textStyle", "symbolStyle", "imageStyle", "richTextStyle", "customMarkStyle", "style", "state"]);
|
|
83226
83299
|
let itemContentState = null,
|
|
83227
83300
|
itemContentStyle = null,
|
|
83228
83301
|
defaultStyle = {};
|
|
@@ -83230,29 +83303,29 @@
|
|
|
83230
83303
|
dx: 0,
|
|
83231
83304
|
dy: 0
|
|
83232
83305
|
}, itemContentStyle = transformLabelAttributes(Object.assign(Object.assign({}, label), {
|
|
83233
|
-
style: merge$1(defaultStyle, null !== (_c = null !== (_b = null == label ? void 0 : label.
|
|
83234
|
-
}), this._markerData, this._markAttributeContext)) : "richText" === type ? (itemContentState = null !== (
|
|
83306
|
+
style: merge$1(defaultStyle, null !== (_d = null !== (_c = null !== (_b = null == label ? void 0 : label.style) && void 0 !== _b ? _b : null == label ? void 0 : label.textStyle) && void 0 !== _c ? _c : textStyle) && void 0 !== _d ? _d : style)
|
|
83307
|
+
}), this._markerData, this._markAttributeContext)) : "richText" === type ? (itemContentState = null !== (_e = null == richText ? void 0 : richText.state) && void 0 !== _e ? _e : state, defaultStyle = {
|
|
83235
83308
|
width: 100,
|
|
83236
83309
|
height: 100
|
|
83237
|
-
}, itemContentStyle = transformStyle(merge$1(defaultStyle, null !== (
|
|
83310
|
+
}, itemContentStyle = transformStyle(merge$1(defaultStyle, null !== (_g = null !== (_f = null == richText ? void 0 : richText.style) && void 0 !== _f ? _f : richTextStyle) && void 0 !== _g ? _g : style), this._markerData, this._markAttributeContext)) : "symbol" === type ? (itemContentState = null !== (_h = null == symbol ? void 0 : symbol.state) && void 0 !== _h ? _h : state, defaultStyle = {
|
|
83238
83311
|
symbolType: "star",
|
|
83239
83312
|
fill: "rgb(48, 115, 242)",
|
|
83240
83313
|
fillOpacity: .8,
|
|
83241
83314
|
size: 20
|
|
83242
|
-
}, itemContentStyle = transformToGraphic(transformStyle(merge$1(defaultStyle, null !== (
|
|
83315
|
+
}, itemContentStyle = transformToGraphic(transformStyle(merge$1(defaultStyle, null !== (_k = null !== (_j = null == symbol ? void 0 : symbol.style) && void 0 !== _j ? _j : symbolStyle) && void 0 !== _k ? _k : style), this._markerData, this._markAttributeContext))) : "image" === type ? (itemContentState = null !== (_l = null == image ? void 0 : image.state) && void 0 !== _l ? _l : state, defaultStyle = {
|
|
83243
83316
|
width: 80,
|
|
83244
83317
|
height: 80
|
|
83245
|
-
}, itemContentStyle = transformStyle(merge$1(defaultStyle, null !== (
|
|
83318
|
+
}, itemContentStyle = transformStyle(merge$1(defaultStyle, null !== (_o = null !== (_m = null == image ? void 0 : image.style) && void 0 !== _m ? _m : imageStyle) && void 0 !== _o ? _o : style), this._markerData, this._markAttributeContext)) : "custom" === type && (itemContentState = null !== (_p = null == customMark ? void 0 : customMark.state) && void 0 !== _p ? _p : state, itemContentStyle = transformStyle(null !== (_r = null !== (_q = null == customMark ? void 0 : customMark.style) && void 0 !== _q ? _q : customMarkStyle) && void 0 !== _r ? _r : style, this._markerData, this._markAttributeContext));
|
|
83246
83319
|
const markPointAttrs = {
|
|
83247
83320
|
zIndex: this.layoutZIndex,
|
|
83248
|
-
interactive: null === (
|
|
83249
|
-
hover: null === (
|
|
83250
|
-
select: null === (
|
|
83321
|
+
interactive: null === (_s = this._spec.interactive) || void 0 === _s || _s,
|
|
83322
|
+
hover: null === (_t = this._spec.interactive) || void 0 === _t || _t,
|
|
83323
|
+
select: null === (_u = this._spec.interactive) || void 0 === _u || _u,
|
|
83251
83324
|
position: {
|
|
83252
83325
|
x: 0,
|
|
83253
83326
|
y: 0
|
|
83254
83327
|
},
|
|
83255
|
-
clipInRange: null !== (
|
|
83328
|
+
clipInRange: null !== (_v = this._spec.clip) && void 0 !== _v && _v,
|
|
83256
83329
|
itemContent: Object.assign(Object.assign({
|
|
83257
83330
|
type: type,
|
|
83258
83331
|
offsetX: transformOffset(itemContent.offsetX, this._relativeSeries.getRegion()),
|
|
@@ -83261,20 +83334,20 @@
|
|
|
83261
83334
|
style: transformStyle(itemContentStyle, this._markerData, this._markAttributeContext)
|
|
83262
83335
|
}),
|
|
83263
83336
|
targetSymbol: {
|
|
83264
|
-
offset: null !== (
|
|
83265
|
-
visible: null !== (
|
|
83266
|
-
size: null !== (
|
|
83337
|
+
offset: null !== (_w = targetSymbol.offset) && void 0 !== _w ? _w : 0,
|
|
83338
|
+
visible: null !== (_x = targetSymbol.visible) && void 0 !== _x && _x,
|
|
83339
|
+
size: null !== (_y = targetSymbol.size) && void 0 !== _y ? _y : 20,
|
|
83267
83340
|
style: transformStyle(targetSymbol.style, this._markerData, this._markAttributeContext)
|
|
83268
83341
|
},
|
|
83269
83342
|
state: {
|
|
83270
|
-
line: transformState(null !== (
|
|
83271
|
-
lineStartSymbol: transformState(null !== (
|
|
83272
|
-
lineEndSymbol: transformState(null !== (
|
|
83343
|
+
line: transformState(null !== (_0 = null === (_z = this._spec.itemLine.line) || void 0 === _z ? void 0 : _z.state) && void 0 !== _0 ? _0 : {}, this._markerData, this._markAttributeContext),
|
|
83344
|
+
lineStartSymbol: transformState(null !== (_2 = null === (_1 = this._spec.itemLine.startSymbol) || void 0 === _1 ? void 0 : _1.state) && void 0 !== _2 ? _2 : {}, this._markerData, this._markAttributeContext),
|
|
83345
|
+
lineEndSymbol: transformState(null !== (_4 = null === (_3 = this._spec.itemLine.endSymbol) || void 0 === _3 ? void 0 : _3.state) && void 0 !== _4 ? _4 : {}, this._markerData, this._markAttributeContext),
|
|
83273
83346
|
itemContent: transformState(itemContentState, this._markerData, this._markAttributeContext),
|
|
83274
|
-
textBackground: transformState(null === (
|
|
83275
|
-
targetItem: transformState(null !== (
|
|
83347
|
+
textBackground: transformState(null === (_6 = null === (_5 = this._spec.itemContent.text) || void 0 === _5 ? void 0 : _5.labelBackground) || void 0 === _6 ? void 0 : _6.state, this._markerData, this._markAttributeContext),
|
|
83348
|
+
targetItem: transformState(null !== (_8 = null === (_7 = this._spec.targetSymbol) || void 0 === _7 ? void 0 : _7.state) && void 0 !== _8 ? _8 : {}, this._markerData, this._markAttributeContext)
|
|
83276
83349
|
},
|
|
83277
|
-
animation: null !== (
|
|
83350
|
+
animation: null !== (_9 = this._spec.animation) && void 0 !== _9 && _9,
|
|
83278
83351
|
animationEnter: this._spec.animationEnter,
|
|
83279
83352
|
animationExit: this._spec.animationExit,
|
|
83280
83353
|
animationUpdate: this._spec.animationUpdate
|
|
@@ -88703,7 +88776,7 @@
|
|
|
88703
88776
|
|
|
88704
88777
|
const VChartSimple = createChart('VChartSimple');
|
|
88705
88778
|
|
|
88706
|
-
const version = "2.0.
|
|
88779
|
+
const version = "2.0.16";
|
|
88707
88780
|
|
|
88708
88781
|
exports.Area = Area;
|
|
88709
88782
|
exports.AreaChart = AreaChart;
|