@visactor/react-vchart 2.0.16-alpha.0 → 2.0.17

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 CHANGED
@@ -46160,6 +46160,9 @@
46160
46160
  }
46161
46161
  return isArray$1(spec) ? spec.map(s => functionTransform(s, VChart)) : spec;
46162
46162
  }
46163
+ function transformFunctionAttribute(att, ...args) {
46164
+ return isFunction$1(att) ? att(...args) : att;
46165
+ }
46163
46166
 
46164
46167
  const initTextMeasure = (textSpec, option, useNaiveCanvas) => initTextMeasure$1(textSpec, option, useNaiveCanvas, {
46165
46168
  fontFamily: token.fontFamily,
@@ -55160,7 +55163,7 @@
55160
55163
  _getGridAttributes() {
55161
55164
  const spec = this._spec;
55162
55165
  return {
55163
- alternateColor: spec.grid.alternateColor,
55166
+ alternateColor: transformFunctionAttribute(spec.grid.alternateColor),
55164
55167
  alignWithLabel: spec.grid.alignWithLabel,
55165
55168
  style: isFunction$1(spec.grid.style) ? (datum, index) => {
55166
55169
  var _a, _b;
@@ -55172,7 +55175,7 @@
55172
55175
  } : {
55173
55176
  type: "line",
55174
55177
  visible: spec.subGrid.visible,
55175
- alternateColor: spec.subGrid.alternateColor,
55178
+ alternateColor: transformFunctionAttribute(spec.subGrid.alternateColor),
55176
55179
  style: transformToGraphic(spec.subGrid.style)
55177
55180
  }
55178
55181
  };
@@ -66331,6 +66334,31 @@
66331
66334
  const DEFAULT_FONT_PADDING = 1;
66332
66335
  const SHAPE_TYPE = ["triangleForward", "triangle", "diamond", "square", "star", "cardioid", "circle", "pentagon", "rect"];
66333
66336
 
66337
+ class WordMeasureCache {
66338
+ constructor(maxSize = 1e3) {
66339
+ this._map = new Map(), this._maxSize = maxSize;
66340
+ }
66341
+ get(key) {
66342
+ const v = this._map.get(key);
66343
+ if (v) return this._map.delete(key), this._map.set(key, v), v;
66344
+ }
66345
+ set(key, value) {
66346
+ if (this._map.has(key)) this._map.set(key, value);else {
66347
+ if (this._map.size >= this._maxSize) {
66348
+ const oldest = this._map.keys().next().value;
66349
+ void 0 !== oldest && this._map.delete(oldest);
66350
+ }
66351
+ this._map.set(key, value);
66352
+ }
66353
+ }
66354
+ clear() {
66355
+ this._map.clear();
66356
+ }
66357
+ size() {
66358
+ return this._map.size;
66359
+ }
66360
+ }
66361
+
66334
66362
  const WORD_CLOUD_TEXT = `${PREFIX}_WORD_CLOUD_TEXT`;
66335
66363
 
66336
66364
  const wordCloudSeriesMark = Object.assign(Object.assign({}, baseSeriesMark), {
@@ -66387,12 +66415,13 @@
66387
66415
  fillingSeriesField: this.getSeriesField(),
66388
66416
  fillingRotateAngles: DEFAULT_ROTATE_ANGLES,
66389
66417
  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");
66418
+ }, 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
66419
  }
66392
66420
  initData() {
66393
66421
  var _a, _b;
66394
66422
  super.initData(), null === (_b = null === (_a = this.getViewData()) || void 0 === _a ? void 0 : _a.target) || void 0 === _b || _b.addListener("change", () => {
66395
- this._dataChange = !0, this.compile();
66423
+ var _a;
66424
+ null === (_a = this._wordMeasureCache) || void 0 === _a || _a.clear(), this._dataChange = !0, this.compile();
66396
66425
  });
66397
66426
  }
66398
66427
  initMark() {
@@ -66559,6 +66588,7 @@
66559
66588
  wordCloudShapeConfig = null !== (_c = this._wordCloudShapeConfig) && void 0 !== _c ? _c : {};
66560
66589
  return Object.assign(Object.assign(Object.assign({}, wordCloudShapeConfig), this._getCommonTransformOptions()), {
66561
66590
  createImage: createImage,
66591
+ measureCache: this._wordMeasureCache,
66562
66592
  rotateList: this._rotateAngles,
66563
66593
  fillingRotateList: wordCloudShapeConfig.fillingRotateAngles,
66564
66594
  fillingFontFamily: isValid$1(wordCloudShapeConfig.fillingFontFamilyField) ? {
@@ -66614,7 +66644,12 @@
66614
66644
  return [this._wordMark];
66615
66645
  }
66616
66646
  reInit() {
66617
- super.reInit(), this._keyWordColorCallback && (this._keyWordColorCallback = null), this._fillingColorCallback && (this._fillingColorCallback = null);
66647
+ var _a;
66648
+ super.reInit(), this._keyWordColorCallback && (this._keyWordColorCallback = null), this._fillingColorCallback && (this._fillingColorCallback = null), null === (_a = this._wordMeasureCache) || void 0 === _a || _a.clear();
66649
+ }
66650
+ release() {
66651
+ var _a;
66652
+ super.release(), null === (_a = this._wordMeasureCache) || void 0 === _a || _a.clear(), this._wordMeasureCache = void 0;
66618
66653
  }
66619
66654
  }
66620
66655
  BaseWordCloudSeries.mark = wordCloudSeriesMark, BaseWordCloudSeries.builtInTheme = {
@@ -69899,6 +69934,30 @@
69899
69934
  !function (WORDCLOUD_SHAPE_HOOK_EVENT) {
69900
69935
  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
69936
  }(WORDCLOUD_SHAPE_HOOK_EVENT || (WORDCLOUD_SHAPE_HOOK_EVENT = {}));
69937
+ class MapWordMeasureCache {
69938
+ constructor(maxSize = 1e3) {
69939
+ this._map = new Map(), this._maxSize = maxSize;
69940
+ }
69941
+ get(key) {
69942
+ const value = this._map.get(key);
69943
+ if (void 0 !== value) return this._map.delete(key), this._map.set(key, value), value;
69944
+ }
69945
+ set(key, value) {
69946
+ if (this._map.has(key)) this._map.set(key, value);else {
69947
+ if (this._map.size >= this._maxSize) {
69948
+ const firstKey = this._map.keys().next().value;
69949
+ void 0 !== firstKey && this._map.delete(firstKey);
69950
+ }
69951
+ this._map.set(key, value);
69952
+ }
69953
+ }
69954
+ clear() {
69955
+ this._map.clear();
69956
+ }
69957
+ size() {
69958
+ return this._map.size;
69959
+ }
69960
+ }
69902
69961
  const colorListEqual = (arr0, arr1) => {
69903
69962
  if (1 === arr1.length && "#537EF5" === arr1[0]) return !0;
69904
69963
  if (!Array.isArray(arr0) || !Array.isArray(arr1) || arr0.length !== arr1.length) return !1;
@@ -69986,7 +70045,7 @@
69986
70045
  ratio: ratio
69987
70046
  } = region;
69988
70047
  for (let i = 0; i < regionWords.length; i++) {
69989
- measureSprite(canvas, ctx, words, i);
70048
+ measureSprite(canvas, ctx, words, i, layoutConfig.measureCache);
69990
70049
  const word = regionWords[i];
69991
70050
  word.x = center[0], word.y = center[1], word.hasText && word.sprite && place(board, word, maxR, ratio, size, boardSize, stepFactor) && (word.hasPlaced = !0);
69992
70051
  }
@@ -69996,7 +70055,7 @@
69996
70055
  if (0 === failedWords.length) break;
69997
70056
  for (let i = 0; i < failedWords.length; i++) {
69998
70057
  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);
70058
+ 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
70059
  }
70001
70060
  }
70002
70061
  layoutConfig.board = board;
@@ -70042,7 +70101,7 @@
70042
70101
  } = region;
70043
70102
  let restartTag = !1;
70044
70103
  for (let i = 0; i < regionWords.length; i++) {
70045
- measureSprite(canvas, ctx, words, i);
70104
+ measureSprite(canvas, ctx, words, i, layoutConfig.measureCache);
70046
70105
  const word = regionWords[i];
70047
70106
  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
70107
  if (!word.skip && word.weight > weightStd && globalShinkFactor > globalShinkLimit) {
@@ -70067,7 +70126,7 @@
70067
70126
  if (0 === failedWords.length) break;
70068
70127
  for (let i = 0; i < failedWords.length; i++) {
70069
70128
  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);
70129
+ 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
70130
  }
70072
70131
  }
70073
70132
  layoutConfig.board = board;
@@ -70112,7 +70171,7 @@
70112
70171
  } = region;
70113
70172
  let restartTag = !1;
70114
70173
  for (let i = 0; i < regionWords.length; i++) {
70115
- measureSprite(canvas, ctx, words, i);
70174
+ measureSprite(canvas, ctx, words, i, layoutConfig.measureCache);
70116
70175
  const word = regionWords[i];
70117
70176
  if (word.x = center[0], word.y = center[1], word.hasText && word.sprite && place(board, word, maxR, ratio, size, boardSize, stepFactor)) {
70118
70177
  if (word.hasPlaced = !0, word.weight >= weightStd && importantWordSuccessedNum++, importantWordSuccessedNum >= importantCount && !layoutFinish) {
@@ -70138,7 +70197,7 @@
70138
70197
  if (0 === failedWords.length) break;
70139
70198
  for (let i = 0; i < failedWords.length; i++) {
70140
70199
  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);
70200
+ 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
70201
  }
70143
70202
  }
70144
70203
  layoutConfig.board = board;
@@ -70217,8 +70276,13 @@
70217
70276
  return [ratio * (t *= .1) * Math.cos(t), t * Math.sin(t)];
70218
70277
  };
70219
70278
  }
70220
- function measureSprite(canvas, ctx, words, wi) {
70221
- if (words[wi].sprite || 0 === words[wi].fontSize) return;
70279
+ function measureSprite(canvas, ctx, words, wi, cache) {
70280
+ const targetWord = words[wi];
70281
+ if (targetWord.sprite || 0 === targetWord.fontSize) return;
70282
+ if (cache) {
70283
+ const cached = cache.get(getWordMeasureKey(targetWord));
70284
+ if (cached) return targetWord.sprite = cached.sprite, targetWord.bounds = cached.bounds, targetWord.wordSize = cached.wordSize, void (targetWord.hasText = !0);
70285
+ }
70222
70286
  const cw = 2048,
70223
70287
  radians = Math.PI / 180,
70224
70288
  n = words.length;
@@ -70281,14 +70345,25 @@
70281
70345
  }
70282
70346
  seen && (j < dTop && (dTop = j), j > dBottom && (dBottom = j));
70283
70347
  }
70284
- word.bounds = {
70348
+ if (word.bounds = {
70285
70349
  dTop: (wordSize[1] >> 1) - dTop,
70286
70350
  dBottom: dBottom - (wordSize[1] >> 1),
70287
70351
  dLeft: (wordSize[0] >> 1) - dLeft,
70288
70352
  dRight: dRight - (wordSize[0] >> 1)
70289
- }, word.sprite = sprite, delete word.LT;
70353
+ }, word.sprite = sprite, cache) {
70354
+ const key = getWordMeasureKey(word);
70355
+ cache.set(key, {
70356
+ sprite: sprite,
70357
+ bounds: word.bounds,
70358
+ wordSize: wordSize
70359
+ });
70360
+ }
70361
+ delete word.LT;
70290
70362
  }
70291
70363
  }
70364
+ function getWordMeasureKey(word) {
70365
+ return String(word.text) + "|" + String(word.fontFamily) + "|" + String(word.fontStyle) + "|" + String(word.fontWeight) + "|" + String(word.fontSize) + "|" + String(word.rotate) + "|" + String(word.padding);
70366
+ }
70292
70367
  function initBoardWithShape(segmentationOutput) {
70293
70368
  const {
70294
70369
  segmentation: {
@@ -70385,7 +70460,7 @@
70385
70460
  } = shapeBounds,
70386
70461
  [startX, startY] = [x1 + ~~(randomGenerator() * fillingXStep * 2), y1 + ~~(randomGenerator() * fillingYStep * 2)];
70387
70462
  for (let y = startY; y <= y2; y += fillingYStep) for (let x = startX; x <= x2; x += fillingXStep) {
70388
- measureSprite(canvas, ctx, fillingWords, wi);
70463
+ measureSprite(canvas, ctx, fillingWords, wi, layoutConfig.measureCache);
70389
70464
  const word = fillingWords[wi];
70390
70465
  word.x = x, word.y = y;
70391
70466
  const {
@@ -70521,7 +70596,7 @@
70521
70596
  return this.progressiveResult;
70522
70597
  }
70523
70598
  doLayout() {
70524
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
70599
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
70525
70600
  const segmentationInput = this.segmentationInput,
70526
70601
  segmentationOutput = segmentation(segmentationInput);
70527
70602
  if (!segmentationOutput.segmentation.regions.length) return;
@@ -70548,35 +70623,36 @@
70548
70623
  const layoutConfig = {
70549
70624
  size: options.size,
70550
70625
  ratio: options.ratio || .8,
70626
+ measureCache: null !== (_a = options.measureCache) && void 0 !== _a ? _a : new MapWordMeasureCache(),
70551
70627
  shapeUrl: options.shape,
70552
70628
  random: void 0 === options.random || options.random,
70553
- textLayoutTimes: null !== (_a = options.textLayoutTimes) && void 0 !== _a ? _a : 3,
70629
+ textLayoutTimes: null !== (_b = options.textLayoutTimes) && void 0 !== _b ? _b : 3,
70554
70630
  removeWhiteBorder: options.removeWhiteBorder,
70555
- layoutMode: null !== (_b = options.layoutMode) && void 0 !== _b ? _b : "default",
70556
- fontSizeShrinkFactor: null !== (_c = options.fontSizeShrinkFactor) && void 0 !== _c ? _c : .8,
70557
- stepFactor: null !== (_d = options.stepFactor) && void 0 !== _d ? _d : 1,
70558
- importantWordCount: null !== (_e = options.importantWordCount) && void 0 !== _e ? _e : 10,
70631
+ layoutMode: null !== (_c = options.layoutMode) && void 0 !== _c ? _c : "default",
70632
+ fontSizeShrinkFactor: null !== (_d = options.fontSizeShrinkFactor) && void 0 !== _d ? _d : .8,
70633
+ stepFactor: null !== (_e = options.stepFactor) && void 0 !== _e ? _e : 1,
70634
+ importantWordCount: null !== (_f = options.importantWordCount) && void 0 !== _f ? _f : 10,
70559
70635
  globalShinkLimit: options.globalShinkLimit || .2,
70560
- fontSizeEnlargeFactor: null !== (_f = options.fontSizeEnlargeFactor) && void 0 !== _f ? _f : 1.5,
70561
- fillingRatio: null !== (_g = options.fillingRatio) && void 0 !== _g ? _g : .7,
70562
- fillingTimes: null !== (_h = options.fillingTimes) && void 0 !== _h ? _h : 4,
70563
- fillingXStep: options.fillingXRatioStep ? Math.max(Math.floor(options.size[0] * options.fillingXRatioStep), 1) : null !== (_j = options.fillingXStep) && void 0 !== _j ? _j : 4,
70564
- fillingYStep: options.fillingYRatioStep ? Math.max(Math.floor(options.size[1] * options.fillingYRatioStep), 1) : null !== (_k = options.fillingYStep) && void 0 !== _k ? _k : 4,
70636
+ fontSizeEnlargeFactor: null !== (_g = options.fontSizeEnlargeFactor) && void 0 !== _g ? _g : 1.5,
70637
+ fillingRatio: null !== (_h = options.fillingRatio) && void 0 !== _h ? _h : .7,
70638
+ fillingTimes: null !== (_j = options.fillingTimes) && void 0 !== _j ? _j : 4,
70639
+ fillingXStep: options.fillingXRatioStep ? Math.max(Math.floor(options.size[0] * options.fillingXRatioStep), 1) : null !== (_k = options.fillingXStep) && void 0 !== _k ? _k : 4,
70640
+ fillingYStep: options.fillingYRatioStep ? Math.max(Math.floor(options.size[1] * options.fillingYRatioStep), 1) : null !== (_l = options.fillingYStep) && void 0 !== _l ? _l : 4,
70565
70641
  fillingInitialFontSize: options.fillingInitialFontSize,
70566
70642
  fillingDeltaFontSize: options.fillingDeltaFontSize,
70567
- fillingInitialOpacity: null !== (_l = options.fillingInitialOpacity) && void 0 !== _l ? _l : .8,
70568
- fillingDeltaOpacity: null !== (_m = options.fillingDeltaOpacity) && void 0 !== _m ? _m : .05,
70643
+ fillingInitialOpacity: null !== (_m = options.fillingInitialOpacity) && void 0 !== _m ? _m : .8,
70644
+ fillingDeltaOpacity: null !== (_o = options.fillingDeltaOpacity) && void 0 !== _o ? _o : .05,
70569
70645
  getFillingFontFamily: simpleField(options.fillingFontFamily || "sans-serif"),
70570
70646
  getFillingFontStyle: simpleField(options.fillingFontStyle || "normal"),
70571
70647
  getFillingFontWeight: simpleField(options.fillingFontWeight || "normal"),
70572
- getFillingPadding: simpleField(null !== (_o = options.fillingPadding) && void 0 !== _o ? _o : .4),
70573
- fillingRotateList: null !== (_p = options.fillingRotateList) && void 0 !== _p ? _p : [0, 90],
70574
- fillingDeltaFontSizeFactor: null !== (_q = options.fillingDeltaFontSizeFactor) && void 0 !== _q ? _q : .2,
70648
+ getFillingPadding: simpleField(null !== (_p = options.fillingPadding) && void 0 !== _p ? _p : .4),
70649
+ fillingRotateList: null !== (_q = options.fillingRotateList) && void 0 !== _q ? _q : [0, 90],
70650
+ fillingDeltaFontSizeFactor: null !== (_r = options.fillingDeltaFontSizeFactor) && void 0 !== _r ? _r : .2,
70575
70651
  fillingColorList: options.fillingColorList || ["#537EF5"],
70576
70652
  sameColorList: !1,
70577
- minInitFontSize: null !== (_r = options.minInitFontSize) && void 0 !== _r ? _r : 10,
70578
- minFontSize: null !== (_s = options.minFontSize) && void 0 !== _s ? _s : 4,
70579
- minFillFontSize: null !== (_t = options.minFillFontSize) && void 0 !== _t ? _t : 2
70653
+ minInitFontSize: null !== (_s = options.minInitFontSize) && void 0 !== _s ? _s : 10,
70654
+ minFontSize: null !== (_t = options.minFontSize) && void 0 !== _t ? _t : 4,
70655
+ minFillFontSize: null !== (_u = options.minFillFontSize) && void 0 !== _u ? _u : 2
70580
70656
  },
70581
70657
  sameColorList = colorListEqual(wordsConfig.colorList, layoutConfig.fillingColorList);
70582
70658
  layoutConfig.sameColorList = sameColorList, initColorScale(data, wordsConfig, layoutConfig, options), initFillingWordsFontSize(data, wordsConfig, layoutConfig, segmentationOutput);
@@ -70623,8 +70699,8 @@
70623
70699
  successedWords: successedWords,
70624
70700
  failedWords: failedWords
70625
70701
  } = cloud(words, layoutConfig, segmentationOutput),
70626
- textKey = null !== (_v = null === (_u = options.text) || void 0 === _u ? void 0 : _u.field) && void 0 !== _v ? _v : "textKey",
70627
- dataIndexKey = null !== (_w = options.dataIndexKey) && void 0 !== _w ? _w : "defaultDataIndexKey",
70702
+ textKey = null !== (_w = null === (_v = options.text) || void 0 === _v ? void 0 : _v.field) && void 0 !== _w ? _w : "textKey",
70703
+ dataIndexKey = null !== (_x = options.dataIndexKey) && void 0 !== _x ? _x : "defaultDataIndexKey",
70628
70704
  as = options.as ? Object.assign(Object.assign({}, OUTPUT), options.as) : OUTPUT;
70629
70705
  let w, t;
70630
70706
  const modKeywords = [];
@@ -83200,13 +83276,13 @@
83200
83276
  return "polar" === markerSpec.coordinateType || doPolarProcess ? "polar" : "geo" === markerSpec.coordinateType || doGeoProcess ? "geo" : "cartesian";
83201
83277
  }
83202
83278
  _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;
83279
+ 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
83280
  const {
83205
83281
  itemContent = {},
83206
83282
  itemLine = {},
83207
83283
  targetSymbol = {}
83208
83284
  } = this._spec,
83209
- _9 = itemContent,
83285
+ _10 = itemContent,
83210
83286
  {
83211
83287
  type = "text",
83212
83288
  text: label,
@@ -83221,8 +83297,8 @@
83221
83297
  customMarkStyle: customMarkStyle,
83222
83298
  style = {},
83223
83299
  state = {}
83224
- } = _9,
83225
- restItemContent = __rest$1(_9, ["type", "text", "symbol", "image", "richText", "customMark", "textStyle", "symbolStyle", "imageStyle", "richTextStyle", "customMarkStyle", "style", "state"]);
83300
+ } = _10,
83301
+ restItemContent = __rest$1(_10, ["type", "text", "symbol", "image", "richText", "customMark", "textStyle", "symbolStyle", "imageStyle", "richTextStyle", "customMarkStyle", "style", "state"]);
83226
83302
  let itemContentState = null,
83227
83303
  itemContentStyle = null,
83228
83304
  defaultStyle = {};
@@ -83230,29 +83306,29 @@
83230
83306
  dx: 0,
83231
83307
  dy: 0
83232
83308
  }, itemContentStyle = transformLabelAttributes(Object.assign(Object.assign({}, label), {
83233
- style: merge$1(defaultStyle, null !== (_c = null !== (_b = null == label ? void 0 : label.textStyle) && void 0 !== _b ? _b : textStyle) && void 0 !== _c ? _c : style)
83234
- }), this._markerData, this._markAttributeContext)) : "richText" === type ? (itemContentState = null !== (_d = null == richText ? void 0 : richText.state) && void 0 !== _d ? _d : state, defaultStyle = {
83309
+ 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)
83310
+ }), this._markerData, this._markAttributeContext)) : "richText" === type ? (itemContentState = null !== (_e = null == richText ? void 0 : richText.state) && void 0 !== _e ? _e : state, defaultStyle = {
83235
83311
  width: 100,
83236
83312
  height: 100
83237
- }, itemContentStyle = transformStyle(merge$1(defaultStyle, null !== (_f = null !== (_e = null == richText ? void 0 : richText.style) && void 0 !== _e ? _e : richTextStyle) && void 0 !== _f ? _f : style), this._markerData, this._markAttributeContext)) : "symbol" === type ? (itemContentState = null !== (_g = null == symbol ? void 0 : symbol.state) && void 0 !== _g ? _g : state, defaultStyle = {
83313
+ }, 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
83314
  symbolType: "star",
83239
83315
  fill: "rgb(48, 115, 242)",
83240
83316
  fillOpacity: .8,
83241
83317
  size: 20
83242
- }, itemContentStyle = transformToGraphic(transformStyle(merge$1(defaultStyle, null !== (_j = null !== (_h = null == symbol ? void 0 : symbol.style) && void 0 !== _h ? _h : symbolStyle) && void 0 !== _j ? _j : style), this._markerData, this._markAttributeContext))) : "image" === type ? (itemContentState = null !== (_k = null == image ? void 0 : image.state) && void 0 !== _k ? _k : state, defaultStyle = {
83318
+ }, 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
83319
  width: 80,
83244
83320
  height: 80
83245
- }, itemContentStyle = transformStyle(merge$1(defaultStyle, null !== (_m = null !== (_l = null == image ? void 0 : image.style) && void 0 !== _l ? _l : imageStyle) && void 0 !== _m ? _m : style), this._markerData, this._markAttributeContext)) : "custom" === type && (itemContentState = null !== (_o = null == customMark ? void 0 : customMark.state) && void 0 !== _o ? _o : state, itemContentStyle = transformStyle(null !== (_q = null !== (_p = null == customMark ? void 0 : customMark.style) && void 0 !== _p ? _p : customMarkStyle) && void 0 !== _q ? _q : style, this._markerData, this._markAttributeContext));
83321
+ }, 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
83322
  const markPointAttrs = {
83247
83323
  zIndex: this.layoutZIndex,
83248
- interactive: null === (_r = this._spec.interactive) || void 0 === _r || _r,
83249
- hover: null === (_s = this._spec.interactive) || void 0 === _s || _s,
83250
- select: null === (_t = this._spec.interactive) || void 0 === _t || _t,
83324
+ interactive: null === (_s = this._spec.interactive) || void 0 === _s || _s,
83325
+ hover: null === (_t = this._spec.interactive) || void 0 === _t || _t,
83326
+ select: null === (_u = this._spec.interactive) || void 0 === _u || _u,
83251
83327
  position: {
83252
83328
  x: 0,
83253
83329
  y: 0
83254
83330
  },
83255
- clipInRange: null !== (_u = this._spec.clip) && void 0 !== _u && _u,
83331
+ clipInRange: null !== (_v = this._spec.clip) && void 0 !== _v && _v,
83256
83332
  itemContent: Object.assign(Object.assign({
83257
83333
  type: type,
83258
83334
  offsetX: transformOffset(itemContent.offsetX, this._relativeSeries.getRegion()),
@@ -83261,20 +83337,20 @@
83261
83337
  style: transformStyle(itemContentStyle, this._markerData, this._markAttributeContext)
83262
83338
  }),
83263
83339
  targetSymbol: {
83264
- offset: null !== (_v = targetSymbol.offset) && void 0 !== _v ? _v : 0,
83265
- visible: null !== (_w = targetSymbol.visible) && void 0 !== _w && _w,
83266
- size: null !== (_x = targetSymbol.size) && void 0 !== _x ? _x : 20,
83340
+ offset: null !== (_w = targetSymbol.offset) && void 0 !== _w ? _w : 0,
83341
+ visible: null !== (_x = targetSymbol.visible) && void 0 !== _x && _x,
83342
+ size: null !== (_y = targetSymbol.size) && void 0 !== _y ? _y : 20,
83267
83343
  style: transformStyle(targetSymbol.style, this._markerData, this._markAttributeContext)
83268
83344
  },
83269
83345
  state: {
83270
- line: transformState(null !== (_z = null === (_y = this._spec.itemLine.line) || void 0 === _y ? void 0 : _y.state) && void 0 !== _z ? _z : {}, this._markerData, this._markAttributeContext),
83271
- lineStartSymbol: transformState(null !== (_1 = null === (_0 = this._spec.itemLine.startSymbol) || void 0 === _0 ? void 0 : _0.state) && void 0 !== _1 ? _1 : {}, this._markerData, this._markAttributeContext),
83272
- lineEndSymbol: transformState(null !== (_3 = null === (_2 = this._spec.itemLine.endSymbol) || void 0 === _2 ? void 0 : _2.state) && void 0 !== _3 ? _3 : {}, this._markerData, this._markAttributeContext),
83346
+ 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),
83347
+ 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),
83348
+ 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
83349
  itemContent: transformState(itemContentState, this._markerData, this._markAttributeContext),
83274
- textBackground: transformState(null === (_5 = null === (_4 = this._spec.itemContent.text) || void 0 === _4 ? void 0 : _4.labelBackground) || void 0 === _5 ? void 0 : _5.state, this._markerData, this._markAttributeContext),
83275
- targetItem: transformState(null !== (_7 = null === (_6 = this._spec.targetSymbol) || void 0 === _6 ? void 0 : _6.state) && void 0 !== _7 ? _7 : {}, this._markerData, this._markAttributeContext)
83350
+ 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),
83351
+ 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
83352
  },
83277
- animation: null !== (_8 = this._spec.animation) && void 0 !== _8 && _8,
83353
+ animation: null !== (_9 = this._spec.animation) && void 0 !== _9 && _9,
83278
83354
  animationEnter: this._spec.animationEnter,
83279
83355
  animationExit: this._spec.animationExit,
83280
83356
  animationUpdate: this._spec.animationUpdate
@@ -88703,7 +88779,7 @@
88703
88779
 
88704
88780
  const VChartSimple = createChart('VChartSimple');
88705
88781
 
88706
- const version = "2.0.15";
88782
+ const version = "2.0.17";
88707
88783
 
88708
88784
  exports.Area = Area;
88709
88785
  exports.AreaChart = AreaChart;