tvcharts 0.5.74 → 0.5.76

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/dist/echarts.js CHANGED
@@ -745,14 +745,14 @@ function concatArray(a, b) {
745
745
  }
746
746
  return newArray;
747
747
  }
748
- function createObject(proto2, properties) {
748
+ function createObject(proto3, properties) {
749
749
  let obj;
750
750
  if (Object.create) {
751
- obj = Object.create(proto2);
751
+ obj = Object.create(proto3);
752
752
  } else {
753
753
  const StyleCtor = function() {
754
754
  };
755
- StyleCtor.prototype = proto2;
755
+ StyleCtor.prototype = proto3;
756
756
  obj = new StyleCtor();
757
757
  }
758
758
  if (properties) {
@@ -2128,9 +2128,9 @@ function isHover(displayable, x, y) {
2128
2128
  if (clipPath && !clipPath.contain(x, y)) {
2129
2129
  return false;
2130
2130
  }
2131
- if (el.silent) {
2132
- isSilent = true;
2133
- }
2131
+ }
2132
+ if (el.silent) {
2133
+ isSilent = true;
2134
2134
  }
2135
2135
  const hostEl = el.__hostTarget;
2136
2136
  el = hostEl ? hostEl : el.parent;
@@ -2161,7 +2161,6 @@ var Handler_default = Handler;
2161
2161
  // node_modules/zrender/src/core/timsort.ts
2162
2162
  var DEFAULT_MIN_MERGE = 32;
2163
2163
  var DEFAULT_MIN_GALLOPING = 7;
2164
- var DEFAULT_TMP_STORAGE_LENGTH = 256;
2165
2164
  function minRunLength(n) {
2166
2165
  var r = 0;
2167
2166
  while (n >= DEFAULT_MIN_MERGE) {
@@ -2322,18 +2321,10 @@ function gallopRight(value, array, start2, length2, hint, compare2) {
2322
2321
  }
2323
2322
  function TimSort(array, compare2) {
2324
2323
  let minGallop = DEFAULT_MIN_GALLOPING;
2325
- let length2 = 0;
2326
- let tmpStorageLength = DEFAULT_TMP_STORAGE_LENGTH;
2327
- let stackLength = 0;
2328
2324
  let runStart;
2329
2325
  let runLength;
2330
2326
  let stackSize = 0;
2331
- length2 = array.length;
2332
- if (length2 < 2 * DEFAULT_TMP_STORAGE_LENGTH) {
2333
- tmpStorageLength = length2 >>> 1;
2334
- }
2335
2327
  var tmp = [];
2336
- stackLength = length2 < 120 ? 5 : length2 < 1542 ? 10 : length2 < 119151 ? 19 : 40;
2337
2328
  runStart = [];
2338
2329
  runLength = [];
2339
2330
  function pushRun(_runStart, _runLength) {
@@ -2367,8 +2358,8 @@ function TimSort(array, compare2) {
2367
2358
  var start1 = runStart[i];
2368
2359
  var length1 = runLength[i];
2369
2360
  var start2 = runStart[i + 1];
2370
- var length22 = runLength[i + 1];
2371
- runLength[i] = length1 + length22;
2361
+ var length2 = runLength[i + 1];
2362
+ runLength[i] = length1 + length2;
2372
2363
  if (i === stackSize - 3) {
2373
2364
  runStart[i + 1] = runStart[i + 2];
2374
2365
  runLength[i + 1] = runLength[i + 2];
@@ -2380,17 +2371,17 @@ function TimSort(array, compare2) {
2380
2371
  if (length1 === 0) {
2381
2372
  return;
2382
2373
  }
2383
- length22 = gallopLeft(array[start1 + length1 - 1], array, start2, length22, length22 - 1, compare2);
2384
- if (length22 === 0) {
2374
+ length2 = gallopLeft(array[start1 + length1 - 1], array, start2, length2, length2 - 1, compare2);
2375
+ if (length2 === 0) {
2385
2376
  return;
2386
2377
  }
2387
- if (length1 <= length22) {
2388
- mergeLow(start1, length1, start2, length22);
2378
+ if (length1 <= length2) {
2379
+ mergeLow(start1, length1, start2, length2);
2389
2380
  } else {
2390
- mergeHigh(start1, length1, start2, length22);
2381
+ mergeHigh(start1, length1, start2, length2);
2391
2382
  }
2392
2383
  }
2393
- function mergeLow(start1, length1, start2, length22) {
2384
+ function mergeLow(start1, length1, start2, length2) {
2394
2385
  var i = 0;
2395
2386
  for (i = 0; i < length1; i++) {
2396
2387
  tmp[i] = array[start1 + i];
@@ -2399,17 +2390,17 @@ function TimSort(array, compare2) {
2399
2390
  var cursor2 = start2;
2400
2391
  var dest = start1;
2401
2392
  array[dest++] = array[cursor2++];
2402
- if (--length22 === 0) {
2393
+ if (--length2 === 0) {
2403
2394
  for (i = 0; i < length1; i++) {
2404
2395
  array[dest + i] = tmp[cursor1 + i];
2405
2396
  }
2406
2397
  return;
2407
2398
  }
2408
2399
  if (length1 === 1) {
2409
- for (i = 0; i < length22; i++) {
2400
+ for (i = 0; i < length2; i++) {
2410
2401
  array[dest + i] = array[cursor2 + i];
2411
2402
  }
2412
- array[dest + length22] = tmp[cursor1];
2403
+ array[dest + length2] = tmp[cursor1];
2413
2404
  return;
2414
2405
  }
2415
2406
  var _minGallop = minGallop;
@@ -2425,7 +2416,7 @@ function TimSort(array, compare2) {
2425
2416
  array[dest++] = array[cursor2++];
2426
2417
  count2++;
2427
2418
  count1 = 0;
2428
- if (--length22 === 0) {
2419
+ if (--length2 === 0) {
2429
2420
  exit = true;
2430
2421
  break;
2431
2422
  }
@@ -2457,19 +2448,19 @@ function TimSort(array, compare2) {
2457
2448
  }
2458
2449
  }
2459
2450
  array[dest++] = array[cursor2++];
2460
- if (--length22 === 0) {
2451
+ if (--length2 === 0) {
2461
2452
  exit = true;
2462
2453
  break;
2463
2454
  }
2464
- count2 = gallopLeft(tmp[cursor1], array, cursor2, length22, 0, compare2);
2455
+ count2 = gallopLeft(tmp[cursor1], array, cursor2, length2, 0, compare2);
2465
2456
  if (count2 !== 0) {
2466
2457
  for (i = 0; i < count2; i++) {
2467
2458
  array[dest + i] = array[cursor2 + i];
2468
2459
  }
2469
2460
  dest += count2;
2470
2461
  cursor2 += count2;
2471
- length22 -= count2;
2472
- if (length22 === 0) {
2462
+ length2 -= count2;
2463
+ if (length2 === 0) {
2473
2464
  exit = true;
2474
2465
  break;
2475
2466
  }
@@ -2492,10 +2483,10 @@ function TimSort(array, compare2) {
2492
2483
  minGallop = _minGallop;
2493
2484
  minGallop < 1 && (minGallop = 1);
2494
2485
  if (length1 === 1) {
2495
- for (i = 0; i < length22; i++) {
2486
+ for (i = 0; i < length2; i++) {
2496
2487
  array[dest + i] = array[cursor2 + i];
2497
2488
  }
2498
- array[dest + length22] = tmp[cursor1];
2489
+ array[dest + length2] = tmp[cursor1];
2499
2490
  } else if (length1 === 0) {
2500
2491
  throw new Error();
2501
2492
  } else {
@@ -2504,25 +2495,25 @@ function TimSort(array, compare2) {
2504
2495
  }
2505
2496
  }
2506
2497
  }
2507
- function mergeHigh(start1, length1, start2, length22) {
2498
+ function mergeHigh(start1, length1, start2, length2) {
2508
2499
  var i = 0;
2509
- for (i = 0; i < length22; i++) {
2500
+ for (i = 0; i < length2; i++) {
2510
2501
  tmp[i] = array[start2 + i];
2511
2502
  }
2512
2503
  var cursor1 = start1 + length1 - 1;
2513
- var cursor2 = length22 - 1;
2514
- var dest = start2 + length22 - 1;
2504
+ var cursor2 = length2 - 1;
2505
+ var dest = start2 + length2 - 1;
2515
2506
  var customCursor = 0;
2516
2507
  var customDest = 0;
2517
2508
  array[dest--] = array[cursor1--];
2518
2509
  if (--length1 === 0) {
2519
- customCursor = dest - (length22 - 1);
2520
- for (i = 0; i < length22; i++) {
2510
+ customCursor = dest - (length2 - 1);
2511
+ for (i = 0; i < length2; i++) {
2521
2512
  array[customCursor + i] = tmp[i];
2522
2513
  }
2523
2514
  return;
2524
2515
  }
2525
- if (length22 === 1) {
2516
+ if (length2 === 1) {
2526
2517
  dest -= length1;
2527
2518
  cursor1 -= length1;
2528
2519
  customDest = dest + 1;
@@ -2551,7 +2542,7 @@ function TimSort(array, compare2) {
2551
2542
  array[dest--] = tmp[cursor2--];
2552
2543
  count2++;
2553
2544
  count1 = 0;
2554
- if (--length22 === 1) {
2545
+ if (--length2 === 1) {
2555
2546
  exit = true;
2556
2547
  break;
2557
2548
  }
@@ -2577,21 +2568,21 @@ function TimSort(array, compare2) {
2577
2568
  }
2578
2569
  }
2579
2570
  array[dest--] = tmp[cursor2--];
2580
- if (--length22 === 1) {
2571
+ if (--length2 === 1) {
2581
2572
  exit = true;
2582
2573
  break;
2583
2574
  }
2584
- count2 = length22 - gallopLeft(array[cursor1], tmp, 0, length22, length22 - 1, compare2);
2575
+ count2 = length2 - gallopLeft(array[cursor1], tmp, 0, length2, length2 - 1, compare2);
2585
2576
  if (count2 !== 0) {
2586
2577
  dest -= count2;
2587
2578
  cursor2 -= count2;
2588
- length22 -= count2;
2579
+ length2 -= count2;
2589
2580
  customDest = dest + 1;
2590
2581
  customCursor = cursor2 + 1;
2591
2582
  for (i = 0; i < count2; i++) {
2592
2583
  array[customDest + i] = tmp[customCursor + i];
2593
2584
  }
2594
- if (length22 <= 1) {
2585
+ if (length2 <= 1) {
2595
2586
  exit = true;
2596
2587
  break;
2597
2588
  }
@@ -2615,7 +2606,7 @@ function TimSort(array, compare2) {
2615
2606
  if (minGallop < 1) {
2616
2607
  minGallop = 1;
2617
2608
  }
2618
- if (length22 === 1) {
2609
+ if (length2 === 1) {
2619
2610
  dest -= length1;
2620
2611
  cursor1 -= length1;
2621
2612
  customDest = dest + 1;
@@ -2624,11 +2615,11 @@ function TimSort(array, compare2) {
2624
2615
  array[customDest + i] = array[customCursor + i];
2625
2616
  }
2626
2617
  array[dest] = tmp[cursor2];
2627
- } else if (length22 === 0) {
2618
+ } else if (length2 === 0) {
2628
2619
  throw new Error();
2629
2620
  } else {
2630
- customCursor = dest - (length22 - 1);
2631
- for (i = 0; i < length22; i++) {
2621
+ customCursor = dest - (length2 - 1);
2622
+ for (i = 0; i < length2; i++) {
2632
2623
  array[customCursor + i] = tmp[i];
2633
2624
  }
2634
2625
  }
@@ -5409,6 +5400,7 @@ var Transformable2 = class {
5409
5400
  const parent = this.parent;
5410
5401
  let m2 = this.transform;
5411
5402
  if (parent && parent.transform) {
5403
+ parent.invTransform = parent.invTransform || create2();
5412
5404
  mul2(tmpTransform, parent.invTransform, m2);
5413
5405
  m2 = tmpTransform;
5414
5406
  }
@@ -5498,9 +5490,9 @@ var Transformable2 = class {
5498
5490
  };
5499
5491
  var Transformable = Transformable2;
5500
5492
  Transformable.initDefaultProps = function() {
5501
- const proto2 = Transformable2.prototype;
5502
- proto2.scaleX = proto2.scaleY = proto2.globalScaleRatio = 1;
5503
- proto2.x = proto2.y = proto2.originX = proto2.originY = proto2.skewX = proto2.skewY = proto2.rotation = proto2.anchorX = proto2.anchorY = 0;
5493
+ const proto3 = Transformable2.prototype;
5494
+ proto3.scaleX = proto3.scaleY = proto3.globalScaleRatio = 1;
5495
+ proto3.x = proto3.y = proto3.originX = proto3.originY = proto3.skewX = proto3.skewY = proto3.rotation = proto3.anchorX = proto3.anchorY = 0;
5504
5496
  }();
5505
5497
  var TRANSFORMABLE_PROPS = [
5506
5498
  "x",
@@ -6905,7 +6897,7 @@ var ZRender = class {
6905
6897
  const ssrMode = opts.ssr || painter.ssrOnly;
6906
6898
  this.storage = storage2;
6907
6899
  this.painter = painter;
6908
- const handerProxy = !env_default.node && !env_default.worker && !ssrMode ? new HandlerProxy_default(painter.getViewportRoot(), painter.root) : null;
6900
+ const handlerProxy = !env_default.node && !env_default.worker && !ssrMode ? new HandlerProxy_default(painter.getViewportRoot(), painter.root) : null;
6909
6901
  const useCoarsePointer = opts.useCoarsePointer;
6910
6902
  const usePointerSize = useCoarsePointer == null || useCoarsePointer === "auto" ? env_default.touchEventsSupported : !!useCoarsePointer;
6911
6903
  const defaultPointerSize = 44;
@@ -6913,7 +6905,7 @@ var ZRender = class {
6913
6905
  if (usePointerSize) {
6914
6906
  pointerSize = retrieve2(opts.pointerSize, defaultPointerSize);
6915
6907
  }
6916
- this.handler = new Handler_default(storage2, painter, handerProxy, painter.root, pointerSize);
6908
+ this.handler = new Handler_default(storage2, painter, handlerProxy, painter.root, pointerSize);
6917
6909
  this.animation = new Animation_default({
6918
6910
  stage: {
6919
6911
  update: ssrMode ? null : () => this._flush(true)
@@ -6924,7 +6916,7 @@ var ZRender = class {
6924
6916
  }
6925
6917
  }
6926
6918
  add(el) {
6927
- if (!el) {
6919
+ if (this._disposed || !el) {
6928
6920
  return;
6929
6921
  }
6930
6922
  this.storage.addRoot(el);
@@ -6932,7 +6924,7 @@ var ZRender = class {
6932
6924
  this.refresh();
6933
6925
  }
6934
6926
  remove(el) {
6935
- if (!el) {
6927
+ if (this._disposed || !el) {
6936
6928
  return;
6937
6929
  }
6938
6930
  this.storage.delRoot(el);
@@ -6940,12 +6932,18 @@ var ZRender = class {
6940
6932
  this.refresh();
6941
6933
  }
6942
6934
  configLayer(zLevel, config) {
6935
+ if (this._disposed) {
6936
+ return;
6937
+ }
6943
6938
  if (this.painter.configLayer) {
6944
6939
  this.painter.configLayer(zLevel, config);
6945
6940
  }
6946
6941
  this.refresh();
6947
6942
  }
6948
6943
  setBackgroundColor(backgroundColor2) {
6944
+ if (this._disposed) {
6945
+ return;
6946
+ }
6949
6947
  if (this.painter.setBackgroundColor) {
6950
6948
  this.painter.setBackgroundColor(backgroundColor2);
6951
6949
  }
@@ -6963,6 +6961,9 @@ var ZRender = class {
6963
6961
  return this._darkMode;
6964
6962
  }
6965
6963
  refreshImmediately(fromInside) {
6964
+ if (this._disposed) {
6965
+ return;
6966
+ }
6966
6967
  if (!fromInside) {
6967
6968
  this.animation.update(true);
6968
6969
  }
@@ -6971,10 +6972,16 @@ var ZRender = class {
6971
6972
  this._needsRefresh = false;
6972
6973
  }
6973
6974
  refresh() {
6975
+ if (this._disposed) {
6976
+ return;
6977
+ }
6974
6978
  this._needsRefresh = true;
6975
6979
  this.animation.start();
6976
6980
  }
6977
6981
  flush() {
6982
+ if (this._disposed) {
6983
+ return;
6984
+ }
6978
6985
  this._flush(false);
6979
6986
  }
6980
6987
  _flush(fromInside) {
@@ -7005,6 +7012,9 @@ var ZRender = class {
7005
7012
  this._sleepAfterStill = stillFramesCount;
7006
7013
  }
7007
7014
  wakeUp() {
7015
+ if (this._disposed) {
7016
+ return;
7017
+ }
7008
7018
  this.animation.start();
7009
7019
  this._stillFrameAccum = 0;
7010
7020
  }
@@ -7012,42 +7022,74 @@ var ZRender = class {
7012
7022
  this._needsRefreshHover = true;
7013
7023
  }
7014
7024
  refreshHoverImmediately() {
7025
+ if (this._disposed) {
7026
+ return;
7027
+ }
7015
7028
  this._needsRefreshHover = false;
7016
7029
  if (this.painter.refreshHover && this.painter.getType() === "canvas") {
7017
7030
  this.painter.refreshHover();
7018
7031
  }
7019
7032
  }
7020
7033
  resize(opts) {
7034
+ if (this._disposed) {
7035
+ return;
7036
+ }
7021
7037
  opts = opts || {};
7022
7038
  this.painter.resize(opts.width, opts.height);
7023
7039
  this.handler.resize();
7024
7040
  }
7025
7041
  clearAnimation() {
7042
+ if (this._disposed) {
7043
+ return;
7044
+ }
7026
7045
  this.animation.clear();
7027
7046
  }
7028
7047
  getWidth() {
7048
+ if (this._disposed) {
7049
+ return;
7050
+ }
7029
7051
  return this.painter.getWidth();
7030
7052
  }
7031
7053
  getHeight() {
7054
+ if (this._disposed) {
7055
+ return;
7056
+ }
7032
7057
  return this.painter.getHeight();
7033
7058
  }
7034
7059
  setCursorStyle(cursorStyle) {
7060
+ if (this._disposed) {
7061
+ return;
7062
+ }
7035
7063
  this.handler.setCursorStyle(cursorStyle);
7036
7064
  }
7037
7065
  findHover(x, y) {
7066
+ if (this._disposed) {
7067
+ return;
7068
+ }
7038
7069
  return this.handler.findHover(x, y);
7039
7070
  }
7040
7071
  on(eventName, eventHandler, context) {
7041
- this.handler.on(eventName, eventHandler, context);
7072
+ if (!this._disposed) {
7073
+ this.handler.on(eventName, eventHandler, context);
7074
+ }
7042
7075
  return this;
7043
7076
  }
7044
7077
  off(eventName, eventHandler) {
7078
+ if (this._disposed) {
7079
+ return;
7080
+ }
7045
7081
  this.handler.off(eventName, eventHandler);
7046
7082
  }
7047
7083
  trigger(eventName, event) {
7084
+ if (this._disposed) {
7085
+ return;
7086
+ }
7048
7087
  this.handler.trigger(eventName, event);
7049
7088
  }
7050
7089
  clear() {
7090
+ if (this._disposed) {
7091
+ return;
7092
+ }
7051
7093
  const roots2 = this.storage.getRoots();
7052
7094
  for (let i = 0; i < roots2.length; i++) {
7053
7095
  if (roots2[i] instanceof Group_default) {
@@ -7058,12 +7100,16 @@ var ZRender = class {
7058
7100
  this.painter.clear();
7059
7101
  }
7060
7102
  dispose() {
7103
+ if (this._disposed) {
7104
+ return;
7105
+ }
7061
7106
  this.animation.stop();
7062
7107
  this.clear();
7063
7108
  this.storage.dispose();
7064
7109
  this.painter.dispose();
7065
7110
  this.handler.dispose();
7066
7111
  this.animation = this.storage = this.painter = this.handler = null;
7112
+ this._disposed = true;
7067
7113
  delInstance(this.id);
7068
7114
  }
7069
7115
  };
@@ -7089,9 +7135,7 @@ function getInstance(id) {
7089
7135
  function registerPainter(name, Ctor) {
7090
7136
  painterCtors[name] = Ctor;
7091
7137
  }
7092
- var ssrDataGetter = function(el) {
7093
- return null;
7094
- };
7138
+ var ssrDataGetter;
7095
7139
  function getElementSSRData(el) {
7096
7140
  if (typeof ssrDataGetter === "function") {
7097
7141
  return ssrDataGetter(el);
@@ -7100,7 +7144,7 @@ function getElementSSRData(el) {
7100
7144
  function registerSSRDataGetter(getter) {
7101
7145
  ssrDataGetter = getter;
7102
7146
  }
7103
- var version = "5.4.4-dev.20231116";
7147
+ var version = "5.5.0";
7104
7148
 
7105
7149
  // src/util/number.ts
7106
7150
  var RADIAN_EPSILON = 1e-4;
@@ -7943,11 +7987,11 @@ function isExtendedClass(clz) {
7943
7987
  }
7944
7988
  function enableClassExtend(rootClz, mandatoryMethods) {
7945
7989
  rootClz.$constructor = rootClz;
7946
- rootClz.extend = function(proto2) {
7990
+ rootClz.extend = function(proto3) {
7947
7991
  if (true) {
7948
7992
  each(mandatoryMethods, function(method) {
7949
- if (!proto2[method]) {
7950
- console.warn("Method `" + method + "` should be implemented" + (proto2.type ? " in " + proto2.type : "") + ".");
7993
+ if (!proto3[method]) {
7994
+ console.warn("Method `" + method + "` should be implemented" + (proto3.type ? " in " + proto3.type : "") + ".");
7951
7995
  }
7952
7996
  });
7953
7997
  }
@@ -7961,11 +8005,11 @@ function enableClassExtend(rootClz, mandatoryMethods) {
7961
8005
  };
7962
8006
  } else {
7963
8007
  ExtendedClass = function() {
7964
- (proto2.$constructor || superClass).apply(this, arguments);
8008
+ (proto3.$constructor || superClass).apply(this, arguments);
7965
8009
  };
7966
8010
  inherits(ExtendedClass, this);
7967
8011
  }
7968
- extend(ExtendedClass.prototype, proto2);
8012
+ extend(ExtendedClass.prototype, proto3);
7969
8013
  ExtendedClass[IS_EXTENDED_CLASS] = true;
7970
8014
  ExtendedClass.extend = this.extend;
7971
8015
  ExtendedClass.superCall = superCall;
@@ -9449,7 +9493,6 @@ var PathProxy2 = class {
9449
9493
  let delta = data[i++];
9450
9494
  const endAngle = delta + startAngle;
9451
9495
  i += 1;
9452
- const anticlockwise = !data[i++];
9453
9496
  if (isFirst) {
9454
9497
  x0 = mathCos2(startAngle) * rx + cx;
9455
9498
  y0 = mathSin2(startAngle) * ry + cy;
@@ -9701,12 +9744,12 @@ var PathProxy2 = class {
9701
9744
  var PathProxy = PathProxy2;
9702
9745
  PathProxy.CMD = CMD;
9703
9746
  PathProxy.initDefaultProps = function() {
9704
- const proto2 = PathProxy2.prototype;
9705
- proto2._saveData = true;
9706
- proto2._ux = 0;
9707
- proto2._uy = 0;
9708
- proto2._pendingPtDist = 0;
9709
- proto2._version = 0;
9747
+ const proto3 = PathProxy2.prototype;
9748
+ proto3._saveData = true;
9749
+ proto3._ux = 0;
9750
+ proto3._uy = 0;
9751
+ proto3._pendingPtDist = 0;
9752
+ proto3._version = 0;
9710
9753
  }();
9711
9754
  var PathProxy_default = PathProxy;
9712
9755
 
@@ -11715,6 +11758,27 @@ function getAllSelectedIndices(ecModel) {
11715
11758
  });
11716
11759
  return ret;
11717
11760
  }
11761
+ function getSeriesPointData(ecModel, payload = {}) {
11762
+ const seriesPointData = [];
11763
+ ecModel.eachSeries(function(seriesModel) {
11764
+ const data = seriesModel.getData();
11765
+ const index = payload.dataIndex ?? data.count() - 1;
11766
+ const values = data.getValues(index);
11767
+ const style = data.getItemVisual(index, "style");
11768
+ const dim = seriesModel.subType === "candlestick" ? "close" : "y";
11769
+ const currentValue = data.get(dim, index);
11770
+ const prevValue = data.get(dim, index - 1);
11771
+ const changePercent = ((currentValue - prevValue) / prevValue * 100).toFixed(2) + "%";
11772
+ seriesPointData.push({
11773
+ name: seriesModel.name,
11774
+ data: values,
11775
+ color: style.fill,
11776
+ seriesId: seriesModel.id,
11777
+ changePercent
11778
+ });
11779
+ });
11780
+ return seriesPointData;
11781
+ }
11718
11782
  function enableHoverEmphasis(el, focus, blurScope) {
11719
11783
  setAsHighDownDispatcher(el, true);
11720
11784
  traverseUpdateState(el, setDefaultStateProxy);
@@ -15489,13 +15553,13 @@ var ComponentModel2 = class extends Model_default {
15489
15553
  };
15490
15554
  var ComponentModel = ComponentModel2;
15491
15555
  ComponentModel.protoInitialize = function() {
15492
- const proto2 = ComponentModel2.prototype;
15493
- proto2.type = "component";
15494
- proto2.id = "";
15495
- proto2.name = "";
15496
- proto2.mainType = "";
15497
- proto2.subType = "";
15498
- proto2.componentIndex = 0;
15556
+ const proto3 = ComponentModel2.prototype;
15557
+ proto3.type = "component";
15558
+ proto3.id = "";
15559
+ proto3.name = "";
15560
+ proto3.mainType = "";
15561
+ proto3.subType = "";
15562
+ proto3.componentIndex = 0;
15499
15563
  }();
15500
15564
  mountExtend(ComponentModel, Model_default);
15501
15565
  enableClassManagement(ComponentModel);
@@ -15891,9 +15955,9 @@ function getNearestPalette(palettes, requestColorNum) {
15891
15955
  }
15892
15956
  return palettes[paletteNum - 1];
15893
15957
  }
15894
- function getFromPalette(that, inner25, defaultPalette, layeredPalette, name, scope, requestNum) {
15958
+ function getFromPalette(that, inner24, defaultPalette, layeredPalette, name, scope, requestNum) {
15895
15959
  scope = scope || that;
15896
- const scopeFields = inner25(scope);
15960
+ const scopeFields = inner24(scope);
15897
15961
  const paletteIdx = scopeFields.paletteIdx || 0;
15898
15962
  const paletteNameMap = scopeFields.paletteNameMap = scopeFields.paletteNameMap || {};
15899
15963
  if (paletteNameMap.hasOwnProperty(name)) {
@@ -15911,9 +15975,9 @@ function getFromPalette(that, inner25, defaultPalette, layeredPalette, name, sco
15911
15975
  scopeFields.paletteIdx = (paletteIdx + 1) % palette.length;
15912
15976
  return pickedPaletteItem;
15913
15977
  }
15914
- function clearPalette(that, inner25) {
15915
- inner25(that).paletteIdx = 0;
15916
- inner25(that).paletteNameMap = {};
15978
+ function clearPalette(that, inner24) {
15979
+ inner24(that).paletteIdx = 0;
15980
+ inner24(that).paletteNameMap = {};
15917
15981
  }
15918
15982
 
15919
15983
  // src/model/Global.ts
@@ -17483,9 +17547,9 @@ var DefaultDataProvider2 = class {
17483
17547
  };
17484
17548
  var DefaultDataProvider = DefaultDataProvider2;
17485
17549
  DefaultDataProvider.protoInitialize = function() {
17486
- const proto2 = DefaultDataProvider2.prototype;
17487
- proto2.pure = false;
17488
- proto2.persistent = true;
17550
+ const proto3 = DefaultDataProvider2.prototype;
17551
+ proto3.pure = false;
17552
+ proto3.persistent = true;
17489
17553
  }();
17490
17554
  DefaultDataProvider.internalField = function() {
17491
17555
  mountMethods = function(provider, data, source) {
@@ -19930,14 +19994,14 @@ var SeriesModel2 = class extends Component_default {
19930
19994
  var SeriesModel = SeriesModel2;
19931
19995
  SERIES_UNIVERSAL_TRANSITION_PROP;
19932
19996
  SeriesModel.protoInitialize = function() {
19933
- const proto2 = SeriesModel2.prototype;
19934
- proto2.type = "series.__base__";
19935
- proto2.seriesIndex = 0;
19936
- proto2.ignoreStyleOnData = false;
19937
- proto2.hasSymbolVisual = false;
19938
- proto2.defaultSymbol = "circle";
19939
- proto2.visualStyleAccessPath = "itemStyle";
19940
- proto2.visualDrawType = "fill";
19997
+ const proto3 = SeriesModel2.prototype;
19998
+ proto3.type = "series.__base__";
19999
+ proto3.seriesIndex = 0;
20000
+ proto3.ignoreStyleOnData = false;
20001
+ proto3.hasSymbolVisual = false;
20002
+ proto3.defaultSymbol = "circle";
20003
+ proto3.visualStyleAccessPath = "itemStyle";
20004
+ proto3.visualDrawType = "fill";
19941
20005
  }();
19942
20006
  mixin(SeriesModel, DataFormatMixin);
19943
20007
  mixin(SeriesModel, PaletteMixin);
@@ -20032,9 +20096,9 @@ var Component_default2 = ComponentView;
20032
20096
 
20033
20097
  // src/chart/helper/createRenderPlanner.ts
20034
20098
  function createRenderPlanner() {
20035
- const inner25 = makeInner();
20099
+ const inner24 = makeInner();
20036
20100
  return function(seriesModel) {
20037
- const fields = inner25(seriesModel);
20101
+ const fields = inner24(seriesModel);
20038
20102
  const pipelineContext = seriesModel.pipelineContext;
20039
20103
  const originalLarge = !!fields.large;
20040
20104
  const originalProgressive = !!fields.progressiveRender;
@@ -20107,8 +20171,8 @@ var ChartView2 = class {
20107
20171
  };
20108
20172
  var ChartView = ChartView2;
20109
20173
  ChartView.protoInitialize = function() {
20110
- const proto2 = ChartView2.prototype;
20111
- proto2.type = "chart";
20174
+ const proto3 = ChartView2.prototype;
20175
+ proto3.type = "chart";
20112
20176
  }();
20113
20177
  function elSetState(el, state, highlightDigit) {
20114
20178
  if (el && isHighDownDispatcher(el)) {
@@ -23101,6 +23165,37 @@ var ECharts = class extends Eventful_default {
23101
23165
  const dataIndexInside = parsedFinder.hasOwnProperty("dataIndexInside") ? parsedFinder.dataIndexInside : parsedFinder.hasOwnProperty("dataIndex") ? data.indexOfRawIndex(parsedFinder.dataIndex) : null;
23102
23166
  return dataIndexInside != null ? getItemVisualFromData(data, dataIndexInside, visualType) : getVisualFromData(data, visualType);
23103
23167
  }
23168
+ getDataByIndex(finder) {
23169
+ const ecModel = this._model;
23170
+ const parsedFinder = parseFinder(ecModel, finder, {
23171
+ defaultMainType: "series"
23172
+ });
23173
+ const seriesModel = parsedFinder.seriesModel;
23174
+ if (true) {
23175
+ if (!seriesModel) {
23176
+ warn("There is no specified series model");
23177
+ }
23178
+ }
23179
+ const data = seriesModel.getData();
23180
+ const dataIndexInside = parsedFinder.hasOwnProperty("dataIndexInside") ? parsedFinder.dataIndexInside : parsedFinder.hasOwnProperty("dataIndex") ? data.indexOfRawIndex(parsedFinder.dataIndex) : null;
23181
+ return dataIndexInside != null ? data.getValues(dataIndexInside) : data.getValues(data.count() - 1);
23182
+ }
23183
+ getCategories(finder) {
23184
+ const ecModel = this._model;
23185
+ const parsedFinder = parseFinder(ecModel, finder, {
23186
+ defaultMainType: "series"
23187
+ });
23188
+ const seriesModel = parsedFinder.seriesModel;
23189
+ if (true) {
23190
+ if (!seriesModel) {
23191
+ warn("There is no specified series model");
23192
+ }
23193
+ }
23194
+ const data = seriesModel.getData();
23195
+ const dataIndex = parsedFinder.hasOwnProperty("dataIndex") ? data.indexOfRawIndex(parsedFinder.dataIndex) : 0;
23196
+ const axis = seriesModel.getBaseAxis();
23197
+ return axis.scale.getLabel({value: dataIndex});
23198
+ }
23104
23199
  getViewOfComponentModel(componentModel) {
23105
23200
  return this._componentsMap[componentModel.__viewId];
23106
23201
  }
@@ -23162,7 +23257,7 @@ var ECharts = class extends Eventful_default {
23162
23257
  this.trigger(eventType, event);
23163
23258
  }, this);
23164
23259
  });
23165
- each(["selectchanged"], (eventType) => {
23260
+ each(["selectchanged", "selectitem"], (eventType) => {
23166
23261
  this._messageCenter.on(eventType, function(event) {
23167
23262
  this.trigger(eventType, event);
23168
23263
  }, this);
@@ -23686,6 +23781,11 @@ ECharts.internalField = function() {
23686
23781
  };
23687
23782
  messageCenter.trigger(newObj.type, newObj);
23688
23783
  }
23784
+ const isUpdateAxisPointer = payload.type === "updateAxisPointer";
23785
+ if (isUpdateAxisPointer) {
23786
+ const data = getSeriesPointData(ecModel, {dataIndex: eventObj.dataIndexInside});
23787
+ messageCenter.trigger("selectitem", {data, dataIndex: eventObj.dataIndexInside});
23788
+ }
23689
23789
  }
23690
23790
  };
23691
23791
  flushPendingActions = function(silent) {
@@ -23849,6 +23949,9 @@ ECharts.internalField = function() {
23849
23949
  updateStates(seriesModel, chartView);
23850
23950
  });
23851
23951
  updateHoverLayerStatus(ecIns, ecModel);
23952
+ const data = getSeriesPointData(ecModel);
23953
+ const messageCenter = ecIns._messageCenter;
23954
+ messageCenter.trigger("selectitem", {data});
23852
23955
  lifecycle_default.trigger("series:afterupdate", ecModel, api2, updateParams);
23853
23956
  };
23854
23957
  markStatusToUpdate = function(ecIns) {
@@ -26010,6 +26113,9 @@ var Scale = class {
26010
26113
  setBlank(isBlank) {
26011
26114
  this._isBlank = isBlank;
26012
26115
  }
26116
+ getIsBaseTick(val) {
26117
+ return false;
26118
+ }
26013
26119
  };
26014
26120
  enableClassManagement(Scale);
26015
26121
  var Scale_default = Scale;
@@ -27298,8 +27404,6 @@ var Time_default = TimeScale;
27298
27404
  var scaleProto = Scale_default.prototype;
27299
27405
  var intervalScaleProto = Interval_default.prototype;
27300
27406
  var roundingErrorFix = round;
27301
- var mathFloor = Math.floor;
27302
- var mathCeil = Math.ceil;
27303
27407
  var mathPow2 = Math.pow;
27304
27408
  var mathLog = Math.log;
27305
27409
  var LogScale = class extends Scale_default {
@@ -27352,28 +27456,6 @@ var LogScale = class extends Scale_default {
27352
27456
  unionExtentFromData(data, dim) {
27353
27457
  this.unionExtent(data.getApproximateExtent(dim));
27354
27458
  }
27355
- calcNiceTicks(approxTickNum) {
27356
- approxTickNum = approxTickNum || 10;
27357
- const extent3 = this._extent;
27358
- const span = extent3[1] - extent3[0];
27359
- if (span === Infinity || span <= 0) {
27360
- return;
27361
- }
27362
- let interval = quantity(span);
27363
- const err = approxTickNum / span * interval;
27364
- if (err <= 0.5) {
27365
- interval *= 10;
27366
- }
27367
- while (!isNaN(interval) && Math.abs(interval) < 1 && Math.abs(interval) > 0) {
27368
- interval *= 10;
27369
- }
27370
- const niceExtent = [
27371
- round(mathCeil(extent3[0] / interval) * interval),
27372
- round(mathFloor(extent3[1] / interval) * interval)
27373
- ];
27374
- this._interval = interval;
27375
- this._niceExtent = niceExtent;
27376
- }
27377
27459
  calcNiceExtent(opt) {
27378
27460
  intervalScaleProto.calcNiceExtent.call(this, opt);
27379
27461
  this._fixMin = opt.fixMin;
@@ -27399,12 +27481,123 @@ LogScale.type = "log";
27399
27481
  var proto = LogScale.prototype;
27400
27482
  proto.getMinorTicks = intervalScaleProto.getMinorTicks;
27401
27483
  proto.getLabel = intervalScaleProto.getLabel;
27484
+ proto.calcNiceTicks = intervalScaleProto.calcNiceTicks;
27402
27485
  function fixRoundingError(val, originalVal) {
27403
27486
  return roundingErrorFix(val, getPrecision(originalVal));
27404
27487
  }
27405
27488
  Scale_default.registerClass(LogScale);
27406
27489
  var Log_default = LogScale;
27407
27490
 
27491
+ // src/scale/Percentage.ts
27492
+ var scaleProto2 = Scale_default.prototype;
27493
+ var intervalScaleProto2 = Interval_default.prototype;
27494
+ var roundingErrorFix2 = round;
27495
+ var PercentageScale = class extends Scale_default {
27496
+ constructor(setting) {
27497
+ super(setting);
27498
+ this.type = "percentage";
27499
+ this._originalScale = new Interval_default();
27500
+ this._interval = 0;
27501
+ this._baseDim = this.getSetting("baseDim") || "close";
27502
+ }
27503
+ getTicks(expandToNicedExtent) {
27504
+ const originalScale = this._originalScale;
27505
+ const extent3 = this._extent;
27506
+ const originalExtent = originalScale.getExtent();
27507
+ const ticks = intervalScaleProto2.getTicks.call(this, expandToNicedExtent);
27508
+ const labels = map(ticks, function(tick) {
27509
+ const val = tick.value;
27510
+ let powVal = round(this.restorePercentageValue(val));
27511
+ powVal = val === extent3[0] && this._fixMin ? fixRoundingError2(powVal, originalExtent[0]) : powVal;
27512
+ powVal = val === extent3[1] && this._fixMax ? fixRoundingError2(powVal, originalExtent[1]) : powVal;
27513
+ return {
27514
+ value: powVal
27515
+ };
27516
+ }, this);
27517
+ return labels;
27518
+ }
27519
+ getFormattedLabel(tick, idx) {
27520
+ const {value} = tick;
27521
+ const percent = this.parsePercentageValue(value);
27522
+ return percent.toFixed(2) + "%";
27523
+ }
27524
+ setExtent(start2, end2) {
27525
+ start2 = this.parsePercentageValue(start2);
27526
+ end2 = this.parsePercentageValue(end2);
27527
+ intervalScaleProto2.setExtent.call(this, start2, end2);
27528
+ }
27529
+ parsePercentageValue(value) {
27530
+ return (value - this._fromValue) / this._fromValue * 100;
27531
+ }
27532
+ restorePercentageValue(value) {
27533
+ return value / 100 * this._fromValue + this._fromValue;
27534
+ }
27535
+ getExtent() {
27536
+ const extent3 = scaleProto2.getExtent.call(this);
27537
+ extent3[0] = this.restorePercentageValue(extent3[0]);
27538
+ extent3[1] = this.restorePercentageValue(extent3[1]);
27539
+ const originalScale = this._originalScale;
27540
+ const originalExtent = originalScale.getExtent();
27541
+ this._fixMin && (extent3[0] = fixRoundingError2(extent3[0], originalExtent[0]));
27542
+ this._fixMax && (extent3[1] = fixRoundingError2(extent3[1], originalExtent[1]));
27543
+ return extent3;
27544
+ }
27545
+ unionExtent(extent3) {
27546
+ this._originalScale.unionExtent(extent3);
27547
+ extent3[0] = this.parsePercentageValue(extent3[0]);
27548
+ extent3[1] = this.parsePercentageValue(extent3[1]);
27549
+ scaleProto2.unionExtent.call(this, extent3);
27550
+ }
27551
+ unionExtentFromData(data, dim) {
27552
+ if (dim === this._baseDim || !this._fromValue) {
27553
+ this._fromValue = data.get(this._baseDim, 0);
27554
+ }
27555
+ this.unionExtent(data.getApproximateExtent(dim));
27556
+ }
27557
+ calcNiceExtent(opt) {
27558
+ intervalScaleProto2.calcNiceExtent.call(this, opt);
27559
+ this._fixMin = opt.fixMin;
27560
+ this._fixMax = opt.fixMax;
27561
+ }
27562
+ parse(val) {
27563
+ return val;
27564
+ }
27565
+ contain(val) {
27566
+ const originalScale = this._originalScale;
27567
+ const originalExtent = originalScale.getExtent();
27568
+ return contain2(val, originalExtent);
27569
+ }
27570
+ normalize(val) {
27571
+ const originalScale = this._originalScale;
27572
+ const originalExtent = originalScale.getExtent();
27573
+ return normalize2(val, originalExtent);
27574
+ }
27575
+ scale(val) {
27576
+ const originalScale = this._originalScale;
27577
+ const originalExtent = originalScale.getExtent();
27578
+ return scale3(val, originalExtent);
27579
+ }
27580
+ getLabel(data) {
27581
+ if (Number.isNaN(data.value)) {
27582
+ return "";
27583
+ }
27584
+ return this.getFormattedLabel(data);
27585
+ }
27586
+ getIsBaseTick(val) {
27587
+ const value = this.parsePercentageValue(val);
27588
+ return Object.is(value, 0);
27589
+ }
27590
+ };
27591
+ PercentageScale.type = "percentage";
27592
+ var proto2 = PercentageScale.prototype;
27593
+ proto2.getMinorTicks = intervalScaleProto2.getMinorTicks;
27594
+ proto2.calcNiceTicks = intervalScaleProto2.calcNiceTicks;
27595
+ function fixRoundingError2(val, originalVal) {
27596
+ return roundingErrorFix2(val, getPrecision(originalVal));
27597
+ }
27598
+ Scale_default.registerClass(PercentageScale);
27599
+ var Percentage_default = PercentageScale;
27600
+
27408
27601
  // src/coord/scaleRawExtentInfo.ts
27409
27602
  var ScaleRawExtentInfo = class {
27410
27603
  constructor(scale4, model, originalExtent) {
@@ -27591,13 +27784,20 @@ function niceScaleExtent(scale4, inModel) {
27591
27784
  const model = inModel;
27592
27785
  const extentInfo = getScaleExtent(scale4, model);
27593
27786
  const extent3 = extentInfo.extent;
27594
- const splitNumber = model.get("splitNumber");
27787
+ let splitNumber = model.get("splitNumber");
27788
+ const splitDistance = model.get("splitDistance");
27595
27789
  if (scale4 instanceof Log_default) {
27596
27790
  scale4.base = model.get("logBase");
27597
27791
  }
27598
27792
  const scaleType = scale4.type;
27599
27793
  const interval = model.get("interval");
27600
27794
  const isIntervalOrTime = scaleType === "interval" || scaleType === "time";
27795
+ if (splitDistance) {
27796
+ const axis = model.axis;
27797
+ const rect = axis.grid.getRect();
27798
+ const length2 = axis.dim === "y" ? rect.height : rect.width;
27799
+ splitNumber = Math.ceil(length2 / splitDistance);
27800
+ }
27601
27801
  scale4.setExtent(extent3[0], extent3[1]);
27602
27802
  scale4.calcNiceExtent({
27603
27803
  splitNumber,
@@ -27624,6 +27824,10 @@ function createScaleByModel(model, axisType) {
27624
27824
  locale: model.ecModel.getLocaleModel(),
27625
27825
  useUTC: model.ecModel.get("useUTC")
27626
27826
  });
27827
+ case "percentage":
27828
+ return new Percentage_default({
27829
+ baseDim: model.get("baseDim")
27830
+ });
27627
27831
  default:
27628
27832
  return new (Scale_default.getClass(axisType) || Interval_default)();
27629
27833
  }
@@ -27644,6 +27848,12 @@ function makeLabelFormatter(axis) {
27644
27848
  return axis.scale.getFormattedLabel(tick, idx, tpl);
27645
27849
  };
27646
27850
  }(labelFormatter);
27851
+ } else if (axis.scale.type === "percentage") {
27852
+ return function(tpl) {
27853
+ return function(tick, idx) {
27854
+ return axis.scale.getFormattedLabel(tick, idx);
27855
+ };
27856
+ }(labelFormatter);
27647
27857
  } else if (isString(labelFormatter)) {
27648
27858
  return function(tpl) {
27649
27859
  return function(tick) {
@@ -28617,7 +28827,8 @@ var Axis = class {
28617
28827
  const ticksCoords = map(ticks, function(tickVal) {
28618
28828
  return {
28619
28829
  coord: this.dataToCoord(this.scale.type === "ordinal" ? this.scale.getRawOrdinalNumber(tickVal) : tickVal),
28620
- tickValue: tickVal
28830
+ tickValue: tickVal,
28831
+ isBaseTick: this.scale.getIsBaseTick(tickVal)
28621
28832
  };
28622
28833
  }, this);
28623
28834
  const alignWithLabel = tickModel.get("alignWithLabel");
@@ -28719,23 +28930,23 @@ function fixOnBandTicksCoords(axis, ticksCoords, alignWithLabel, clamp2) {
28719
28930
  var Axis_default = Axis;
28720
28931
 
28721
28932
  // src/export/api.ts
28722
- function extendComponentModel(proto2) {
28723
- const Model2 = Component_default.extend(proto2);
28933
+ function extendComponentModel(proto3) {
28934
+ const Model2 = Component_default.extend(proto3);
28724
28935
  Component_default.registerClass(Model2);
28725
28936
  return Model2;
28726
28937
  }
28727
- function extendComponentView(proto2) {
28728
- const View2 = Component_default2.extend(proto2);
28938
+ function extendComponentView(proto3) {
28939
+ const View2 = Component_default2.extend(proto3);
28729
28940
  Component_default2.registerClass(View2);
28730
28941
  return View2;
28731
28942
  }
28732
- function extendSeriesModel(proto2) {
28733
- const Model2 = Series_default.extend(proto2);
28943
+ function extendSeriesModel(proto3) {
28944
+ const Model2 = Series_default.extend(proto3);
28734
28945
  Series_default.registerClass(Model2);
28735
28946
  return Model2;
28736
28947
  }
28737
- function extendChartView(proto2) {
28738
- const View2 = Chart_default.extend(proto2);
28948
+ function extendChartView(proto3) {
28949
+ const View2 = Chart_default.extend(proto3);
28739
28950
  Chart_default.registerClass(View2);
28740
28951
  return View2;
28741
28952
  }
@@ -30350,7 +30561,7 @@ function setMetaData(attrs, el) {
30350
30561
  const metaData = getElementSSRData(el);
30351
30562
  if (metaData) {
30352
30563
  metaData.each((val, key) => {
30353
- attrs[(META_DATA_PREFIX + key).toLowerCase()] = val + "";
30564
+ val != null && (attrs[(META_DATA_PREFIX + key).toLowerCase()] = val + "");
30354
30565
  });
30355
30566
  if (el.isSilent()) {
30356
30567
  attrs[META_DATA_PREFIX + "silent"] = "true";
@@ -31220,8 +31431,7 @@ function createBackgroundVNode(width, height, backgroundColor2, scope) {
31220
31431
  width,
31221
31432
  height,
31222
31433
  x: "0",
31223
- y: "0",
31224
- id: "0"
31434
+ y: "0"
31225
31435
  });
31226
31436
  if (isGradient(backgroundColor2)) {
31227
31437
  setGradient({fill: backgroundColor2}, bgVNode.attrs, "fill", scope);
@@ -31401,7 +31611,7 @@ var Layer = class extends Eventful_default {
31401
31611
  }
31402
31612
  for (let i = this.__prevStartIndex; i < this.__prevEndIndex; ++i) {
31403
31613
  const el = prevList[i];
31404
- const shouldPaint = el.shouldBePainted(viewWidth, viewHeight, true, true);
31614
+ const shouldPaint = el && el.shouldBePainted(viewWidth, viewHeight, true, true);
31405
31615
  if (el && (!shouldPaint || !el.__zr) && el.__isRendered) {
31406
31616
  const prevRect = el.getPrevPaintRect();
31407
31617
  if (prevRect) {
@@ -33975,9 +34185,9 @@ var LineView = class extends Chart_default {
33975
34185
  });
33976
34186
  }
33977
34187
  if (valueAnimation) {
33978
- const inner25 = labelInner(endLabel);
33979
- if (typeof inner25.setLabelText === "function") {
33980
- inner25.setLabelText(value);
34188
+ const inner24 = labelInner(endLabel);
34189
+ if (typeof inner24.setLabelText === "function") {
34190
+ inner24.setLabelText(value);
33981
34191
  }
33982
34192
  }
33983
34193
  }
@@ -36823,15 +37033,17 @@ var timeAxis = merge({
36823
37033
  var logAxis = defaults({
36824
37034
  logBase: 10
36825
37035
  }, valueAxis);
37036
+ var percentageAxis = defaults({}, valueAxis);
36826
37037
  var axisDefault_default = {
36827
37038
  category: categoryAxis,
36828
37039
  value: valueAxis,
36829
37040
  time: timeAxis,
36830
- log: logAxis
37041
+ log: logAxis,
37042
+ percentage: percentageAxis
36831
37043
  };
36832
37044
 
36833
37045
  // src/coord/axisCommonTypes.ts
36834
- var AXIS_TYPES = {value: 1, category: 1, time: 1, log: 1};
37046
+ var AXIS_TYPES = {value: 1, category: 1, time: 1, log: 1, percentage: 1};
36835
37047
 
36836
37048
  // src/coord/axisModelCreator.ts
36837
37049
  function axisModelCreator(registers, axisName, BaseAxisModelClass, extraDefaultOption) {
@@ -37110,11 +37322,11 @@ function findAxisModels(seriesModel) {
37110
37322
  // src/coord/axisAlignTicks.ts
37111
37323
  var mathLog2 = Math.log;
37112
37324
  function alignScaleTicks(scale4, axisModel, alignToScale) {
37113
- const intervalScaleProto2 = Interval_default.prototype;
37114
- const alignToTicks = intervalScaleProto2.getTicks.call(alignToScale);
37115
- const alignToNicedTicks = intervalScaleProto2.getTicks.call(alignToScale, true);
37325
+ const intervalScaleProto3 = Interval_default.prototype;
37326
+ const alignToTicks = intervalScaleProto3.getTicks.call(alignToScale);
37327
+ const alignToNicedTicks = intervalScaleProto3.getTicks.call(alignToScale, true);
37116
37328
  const alignToSplitNumber = alignToTicks.length - 1;
37117
- const alignToInterval = intervalScaleProto2.getInterval.call(alignToScale);
37329
+ const alignToInterval = intervalScaleProto3.getInterval.call(alignToScale);
37118
37330
  const scaleExtent = getScaleExtent(scale4, axisModel);
37119
37331
  let rawExtent = scaleExtent.extent;
37120
37332
  const isMinFixed = scaleExtent.fixMin;
@@ -37129,14 +37341,14 @@ function alignScaleTicks(scale4, axisModel, alignToScale) {
37129
37341
  fixMin: isMinFixed,
37130
37342
  fixMax: isMaxFixed
37131
37343
  });
37132
- const extent3 = intervalScaleProto2.getExtent.call(scale4);
37344
+ const extent3 = intervalScaleProto3.getExtent.call(scale4);
37133
37345
  if (isMinFixed) {
37134
37346
  rawExtent[0] = extent3[0];
37135
37347
  }
37136
37348
  if (isMaxFixed) {
37137
37349
  rawExtent[1] = extent3[1];
37138
37350
  }
37139
- let interval = intervalScaleProto2.getInterval.call(scale4);
37351
+ let interval = intervalScaleProto3.getInterval.call(scale4);
37140
37352
  let min3 = rawExtent[0];
37141
37353
  let max3 = rawExtent[1];
37142
37354
  if (isMinFixed && isMaxFixed) {
@@ -37171,13 +37383,13 @@ function alignScaleTicks(scale4, axisModel, alignToScale) {
37171
37383
  }
37172
37384
  const t0 = (alignToTicks[0].value - alignToNicedTicks[0].value) / alignToInterval;
37173
37385
  const t1 = (alignToTicks[alignToSplitNumber].value - alignToNicedTicks[alignToSplitNumber].value) / alignToInterval;
37174
- intervalScaleProto2.setExtent.call(scale4, min3 + interval * t0, max3 + interval * t1);
37175
- intervalScaleProto2.setInterval.call(scale4, interval);
37386
+ intervalScaleProto3.setExtent.call(scale4, min3 + interval * t0, max3 + interval * t1);
37387
+ intervalScaleProto3.setInterval.call(scale4, interval);
37176
37388
  if (t0 || t1) {
37177
- intervalScaleProto2.setNiceExtent.call(scale4, min3 + interval, max3 - interval);
37389
+ intervalScaleProto3.setNiceExtent.call(scale4, min3 + interval, max3 - interval);
37178
37390
  }
37179
37391
  if (true) {
37180
- const ticks = intervalScaleProto2.getTicks.call(scale4);
37392
+ const ticks = intervalScaleProto3.getTicks.call(scale4);
37181
37393
  if (ticks[1] && (!isValueNice(interval) || getPrecisionSafe(ticks[1].value) > getPrecisionSafe(interval))) {
37182
37394
  warn(`The ticks may be not readable when set min: ${axisModel.get("min")}, max: ${axisModel.get("max")} and alignTicks: true`);
37183
37395
  }
@@ -37694,29 +37906,33 @@ var builders = {
37694
37906
  },
37695
37907
  axisBackground(opt, axisModel, group, transformGroup) {
37696
37908
  const shown = axisModel.get(["axisBackground", "show"]);
37697
- if (!shown) {
37909
+ if (!shown || axisModel.axis.dim !== "y") {
37698
37910
  return;
37699
37911
  }
37700
37912
  const extent3 = axisModel.axis.getExtent();
37701
37913
  const matrix13 = transformGroup.transform;
37702
37914
  const pt12 = [extent3[0], 0];
37915
+ const pt22 = [extent3[1], 0];
37916
+ const inverse = pt12[0] > pt22[0];
37703
37917
  if (matrix13) {
37704
37918
  applyTransform(pt12, pt12, matrix13);
37919
+ applyTransform(pt22, pt22, matrix13);
37705
37920
  }
37706
37921
  const style = extend({}, axisModel.getModel(["axisBackground", "backStyle"]).getAreaStyle());
37707
37922
  const position2 = axisModel.axis.position;
37708
37923
  const api2 = axisModel.ecModel.scheduler.api;
37924
+ const pt = inverse ? pt22 : pt12;
37709
37925
  const background = new Rect_default({
37710
37926
  shape: position2 === "left" ? {
37711
37927
  x: 0,
37712
37928
  y: 0,
37713
- width: pt12[0],
37714
- height: pt12[1]
37929
+ width: pt[0],
37930
+ height: pt[1]
37715
37931
  } : {
37716
- x: pt12[0],
37932
+ x: pt[0],
37717
37933
  y: 0,
37718
- width: api2.getWidth() - pt12[0],
37719
- height: pt12[1]
37934
+ width: api2.getWidth() - pt[0],
37935
+ height: pt[1]
37720
37936
  },
37721
37937
  style,
37722
37938
  cursor: "ns-resize",
@@ -38420,6 +38636,7 @@ var axisElementBuilders = {
38420
38636
  }
38421
38637
  const splitLineModel = axisModel.getModel("splitLine");
38422
38638
  const lineStyleModel = splitLineModel.getModel("lineStyle");
38639
+ const baseTickLineStyleModel = splitLineModel.getModel("baseTickLineStyle");
38423
38640
  let lineColors = lineStyleModel.get("color");
38424
38641
  lineColors = isArray(lineColors) ? lineColors : [lineColors];
38425
38642
  const gridRect = gridModel.coordinateSystem.getRect();
@@ -38430,9 +38647,11 @@ var axisElementBuilders = {
38430
38647
  });
38431
38648
  const p1 = [];
38432
38649
  const p2 = [];
38650
+ const baseTickLineStyle = baseTickLineStyleModel.getLineStyle();
38433
38651
  const lineStyle = lineStyleModel.getLineStyle();
38434
38652
  for (let i = 0; i < ticksCoords.length; i++) {
38435
- const tickCoord = axis.toGlobalCoord(ticksCoords[i].coord);
38653
+ const tick = ticksCoords[i];
38654
+ const tickCoord = axis.toGlobalCoord(tick.coord);
38436
38655
  if (isHorizontal) {
38437
38656
  p1[0] = tickCoord;
38438
38657
  p1[1] = gridRect.y;
@@ -38445,9 +38664,13 @@ var axisElementBuilders = {
38445
38664
  p2[1] = tickCoord;
38446
38665
  }
38447
38666
  const colorIndex = lineCount++ % lineColors.length;
38448
- const tickValue = ticksCoords[i].tickValue;
38667
+ const tickValue = tick.tickValue;
38668
+ const isBaseTick = tick.isBaseTick;
38669
+ const style = defaults({
38670
+ stroke: lineColors[colorIndex]
38671
+ }, lineStyle);
38449
38672
  const line2 = new Line_default({
38450
- anid: tickValue != null ? "line_" + ticksCoords[i].tickValue : null,
38673
+ anid: tickValue != null ? "line_" + tick.tickValue : null,
38451
38674
  autoBatch: true,
38452
38675
  shape: {
38453
38676
  x1: p1[0],
@@ -38455,9 +38678,7 @@ var axisElementBuilders = {
38455
38678
  x2: p2[0],
38456
38679
  y2: p2[1]
38457
38680
  },
38458
- style: defaults({
38459
- stroke: lineColors[colorIndex]
38460
- }, lineStyle),
38681
+ style: isBaseTick ? Object.assign(style, baseTickLineStyle) : style,
38461
38682
  silent: true
38462
38683
  });
38463
38684
  subPixelOptimizeLine2(line2.shape, lineStyle.lineWidth);
@@ -49096,8 +49317,8 @@ function restrict(value, extend2) {
49096
49317
  var each6 = each;
49097
49318
  var mathMin9 = Math.min;
49098
49319
  var mathMax9 = Math.max;
49099
- var mathFloor2 = Math.floor;
49100
- var mathCeil2 = Math.ceil;
49320
+ var mathFloor = Math.floor;
49321
+ var mathCeil = Math.ceil;
49101
49322
  var round6 = round;
49102
49323
  var PI9 = Math.PI;
49103
49324
  var Parallel = class {
@@ -49179,7 +49400,7 @@ var Parallel = class {
49179
49400
  let winSize;
49180
49401
  if (!axisExpandWindow) {
49181
49402
  winSize = restrict2(axisExpandWidth * (axisExpandCount - 1), layoutExtent);
49182
- const axisExpandCenter = parallelModel.get("axisExpandCenter") || mathFloor2(axisCount / 2);
49403
+ const axisExpandCenter = parallelModel.get("axisExpandCenter") || mathFloor(axisCount / 2);
49183
49404
  axisExpandWindow = [axisExpandWidth * axisExpandCenter - winSize / 2];
49184
49405
  axisExpandWindow[1] = axisExpandWindow[0] + winSize;
49185
49406
  } else {
@@ -49189,8 +49410,8 @@ var Parallel = class {
49189
49410
  let axisCollapseWidth = (layoutLength - winSize) / (axisCount - axisExpandCount);
49190
49411
  axisCollapseWidth < 3 && (axisCollapseWidth = 0);
49191
49412
  const winInnerIndices = [
49192
- mathFloor2(round6(axisExpandWindow[0] / axisExpandWidth, 1)) + 1,
49193
- mathCeil2(round6(axisExpandWindow[1] / axisExpandWidth, 1)) - 1
49413
+ mathFloor(round6(axisExpandWindow[0] / axisExpandWidth, 1)) + 1,
49414
+ mathCeil(round6(axisExpandWindow[1] / axisExpandWidth, 1)) - 1
49194
49415
  ];
49195
49416
  const axisExpandWindow0Pos = axisCollapseWidth / axisExpandWidth * axisExpandWindow[0];
49196
49417
  return {
@@ -57654,8 +57875,14 @@ function axisTrigger(payload, ecModel, api2) {
57654
57875
  processOnAxis(axesInfo[tarKey], val, updaters, true, outputPayload);
57655
57876
  });
57656
57877
  updateModelActually(showValueMap, axesInfo, outputPayload);
57657
- dispatchTooltipActually(dataByCoordSys, point, payload, dispatchAction3);
57658
- dispatchHighDownActually(axesInfo, dispatchAction3, api2);
57878
+ const tooltipDisabled = ecModel.get("tooltipDisabled");
57879
+ if (!tooltipDisabled) {
57880
+ dispatchTooltipActually(dataByCoordSys, point, payload, dispatchAction3);
57881
+ }
57882
+ const highlightDisabled = ecModel.get("highlightDisabled");
57883
+ if (!highlightDisabled) {
57884
+ dispatchHighDownActually(axesInfo, dispatchAction3, api2);
57885
+ }
57659
57886
  return outputPayload;
57660
57887
  }
57661
57888
  function processOnAxis(axisInfo, newValue, updaters, noSnap, outputFinder) {
@@ -60592,8 +60819,8 @@ function collectReferCoordSysModelInfo(dataZoomModel) {
60592
60819
  return coordSysInfoWrap;
60593
60820
  }
60594
60821
  function barSpaceLimit(barSpace, maxWidth = 200) {
60595
- if (barSpace < 1) {
60596
- return 1;
60822
+ if (barSpace < 1.25) {
60823
+ return 1.25;
60597
60824
  } else if (barSpace > maxWidth) {
60598
60825
  return maxWidth;
60599
60826
  }
@@ -66579,7 +66806,6 @@ function install43(registers) {
66579
66806
  }
66580
66807
 
66581
66808
  // src/component/marker/MarkLabelModal.ts
66582
- var inner21 = makeInner();
66583
66809
  var defaultDataOption = {
66584
66810
  textStyle: {
66585
66811
  padding: [4, 6, 2, 8],
@@ -66651,6 +66877,18 @@ var MarkLabelModal_default = MarkLabelModal;
66651
66877
 
66652
66878
  // src/component/marker/MarkLabelView.ts
66653
66879
  var markerTypeCalculator2 = {
66880
+ dataMin: (item, seriesModel) => {
66881
+ const seriesData = seriesModel.getData();
66882
+ return {
66883
+ value: seriesData.getDataExtent(item.valueDim)[0]
66884
+ };
66885
+ },
66886
+ dataMax: (item, seriesModel) => {
66887
+ const seriesData = seriesModel.getData();
66888
+ return {
66889
+ value: seriesData.getDataExtent(item.valueDim)[1]
66890
+ };
66891
+ },
66654
66892
  min: (item, seriesModel) => {
66655
66893
  const seriesData = seriesModel.getData();
66656
66894
  return {
@@ -66693,7 +66931,7 @@ var markerTypeCalculator2 = {
66693
66931
  };
66694
66932
  }
66695
66933
  };
66696
- var inner22 = makeInner();
66934
+ var inner21 = makeInner();
66697
66935
  var MarkLabelView2 = class extends Component_default2 {
66698
66936
  constructor() {
66699
66937
  super(...arguments);
@@ -66731,7 +66969,8 @@ var MarkLabelView2 = class extends Component_default2 {
66731
66969
  }
66732
66970
  const gridRect = coordSys.master.getRect();
66733
66971
  const yAxisModel = coordSys.getAxis("y");
66734
- const x = yAxisModel.position === "right" ? gridRect.x + gridRect.width : gridRect.x;
66972
+ const offset = yAxisModel.model.get("offset") || 0;
66973
+ const x = yAxisModel.position === "right" ? gridRect.x + gridRect.width + offset : gridRect.x - offset;
66735
66974
  each(markLabelData, (item) => {
66736
66975
  let el = markerGroupMap.get(item.name);
66737
66976
  if (item.$action === "remove") {
@@ -66747,7 +66986,7 @@ var MarkLabelView2 = class extends Component_default2 {
66747
66986
  }
66748
66987
  return;
66749
66988
  }
66750
- item.value = value;
66989
+ item.text = ["last"].includes(item.type) ? yAxisModel.scale.getLabel({value}, {precision: item.precision}) : value.toFixed(item.precision);
66751
66990
  const y = yAxisModel.toGlobalCoord(yAxisModel.dataToCoord(value));
66752
66991
  if (el) {
66753
66992
  updateLabel({
@@ -66773,8 +67012,8 @@ var MarkLabelView2 = class extends Component_default2 {
66773
67012
  markerGroupMap.set(item.name, el);
66774
67013
  this.group.add(el);
66775
67014
  }
66776
- inner22(el).yAxisIndex = yAxisModel.index;
66777
- inner22(el).isSort = true;
67015
+ inner21(el).yAxisIndex = yAxisModel.index;
67016
+ inner21(el).isSort = true;
66778
67017
  });
66779
67018
  });
66780
67019
  }
@@ -66814,23 +67053,31 @@ var MarkLabelView2 = class extends Component_default2 {
66814
67053
  const gridRect = coordSys.master.getRect();
66815
67054
  const yAxisModel = coordSys.getAxis("y");
66816
67055
  const position2 = yAxisModel.position;
67056
+ const offset = yAxisModel.model.get("offset") || 0;
66817
67057
  each(labels, (label) => {
66818
67058
  if (!label.children) {
66819
67059
  return;
66820
67060
  }
66821
- each(label.children, (option) => {
67061
+ each(label.children, (item) => {
67062
+ const option = item;
66822
67063
  let el = graphicLabelElMap.get(option.id);
66823
67064
  const y = yAxisModel.toGlobalCoord(yAxisModel.dataToCoord(option.y)) - 9;
67065
+ const style = option.style;
67066
+ if (yAxisModel.scale.type === "percentage") {
67067
+ const formatLabel2 = yAxisModel.scale.getLabel({value: +option.style.text});
67068
+ option.style = Object.assign({}, option.style, {text: formatLabel2});
67069
+ }
66824
67070
  if (el) {
66825
67071
  updateText({el, gridRect, position: position2, option, ecModel, y});
66826
67072
  } else {
66827
67073
  el = createText({gridRect, position: position2, option, ecModel, y});
66828
67074
  graphLabelGroup.add(el);
66829
67075
  graphicLabelElMap.set(option.id, el);
66830
- inner22(el).yAxisIndex = yAxisModel.index;
67076
+ inner21(el).yAxisIndex = yAxisModel.index;
66831
67077
  }
66832
- inner22(el).originalValue = option.y;
66833
- inner22(el).isSort = true;
67078
+ inner21(el).originalValue = option.y;
67079
+ inner21(el).isSort = true;
67080
+ inner21(el).style = style;
66834
67081
  });
66835
67082
  });
66836
67083
  });
@@ -66839,14 +67086,19 @@ var MarkLabelView2 = class extends Component_default2 {
66839
67086
  const graphicLabelElMap = this._graphicLabelElMap;
66840
67087
  const yAxisModels = ecModel.queryComponents({mainType: "yAxis"});
66841
67088
  graphicLabelElMap.each((el) => {
66842
- const yAxisModel = yAxisModels[inner22(el).yAxisIndex].axis;
67089
+ const yAxisModel = yAxisModels[inner21(el).yAxisIndex].axis;
66843
67090
  if (!yAxisModel) {
66844
67091
  return;
66845
67092
  }
66846
67093
  const gridRect = yAxisModel.grid.getRect();
66847
67094
  const position2 = yAxisModel.position;
66848
- const y = yAxisModel.toGlobalCoord(yAxisModel.dataToCoord(inner22(el).originalValue)) - 9;
66849
- updateText({el, gridRect, position: position2, option: {style: el.style}, ecModel, y});
67095
+ const y = yAxisModel.toGlobalCoord(yAxisModel.dataToCoord(inner21(el).originalValue)) - 9;
67096
+ let style = inner21(el).style;
67097
+ if (yAxisModel.scale.type === "percentage") {
67098
+ const formatLabel2 = yAxisModel.scale.getLabel({value: +style.text});
67099
+ style = Object.assign({}, style, {text: formatLabel2});
67100
+ }
67101
+ updateText({el, gridRect, position: position2, option: {style}, ecModel, y});
66850
67102
  });
66851
67103
  }
66852
67104
  removeGraphicLabels(labelOption) {
@@ -66864,8 +67116,8 @@ var MarkLabelView2 = class extends Component_default2 {
66864
67116
  avoidOverlap() {
66865
67117
  const labelsByYAxisId = {};
66866
67118
  this.markerGroupMap.each((item) => {
66867
- const yAxisId = inner22(item).yAxisIndex;
66868
- const isSort = inner22(item).isSort;
67119
+ const yAxisId = inner21(item).yAxisIndex;
67120
+ const isSort = inner21(item).isSort;
66869
67121
  if (item.ignore || !isSort) {
66870
67122
  return;
66871
67123
  }
@@ -66874,8 +67126,8 @@ var MarkLabelView2 = class extends Component_default2 {
66874
67126
  labelsByYAxisId[yAxisId] = labels;
66875
67127
  });
66876
67128
  this._graphicLabelElMap.each((item) => {
66877
- const yAxisId = inner22(item).yAxisIndex;
66878
- const isSort = inner22(item).isSort;
67129
+ const yAxisId = inner21(item).yAxisIndex;
67130
+ const isSort = inner21(item).isSort;
66879
67131
  if (item.ignore || !isSort) {
66880
67132
  return;
66881
67133
  }
@@ -66891,18 +67143,18 @@ var MarkLabelView2 = class extends Component_default2 {
66891
67143
  var MarkLabelView = MarkLabelView2;
66892
67144
  MarkLabelView.type = "markLabel";
66893
67145
  function labelAvoidOverlap(labels, marginTop = 0) {
66894
- labels.sort((a, b) => inner22(a).y - inner22(b).y);
67146
+ labels.sort((a, b) => inner21(a).y - inner21(b).y);
67147
+ const sortYbyId = {};
66895
67148
  for (let i = 1; i < labels.length; i++) {
66896
- const prevLabelY = labels[i - 1].y;
67149
+ const prevLabel = labels[i - 1];
67150
+ const prevLabelY = sortYbyId[prevLabel.id] ?? inner21(prevLabel).y;
66897
67151
  const currentLabel = labels[i];
66898
67152
  const prevHeight = 18 + marginTop;
66899
- let currentLabelY = inner22(currentLabel).y;
67153
+ let currentLabelY = inner21(currentLabel).y;
66900
67154
  if (Math.abs(currentLabelY - prevLabelY) < prevHeight) {
66901
67155
  currentLabelY = prevLabelY + prevHeight;
66902
67156
  }
66903
- if (currentLabelY === currentLabel.y) {
66904
- return;
66905
- }
67157
+ sortYbyId[currentLabel.id] = currentLabelY;
66906
67158
  if (currentLabel.type === "text") {
66907
67159
  currentLabel.y = currentLabelY;
66908
67160
  } else {
@@ -66920,10 +67172,10 @@ function getLeftTextX(x, text, textStyle, ecModel) {
66920
67172
  const paddings = normalizeCssArray2(textStyle.padding || 0);
66921
67173
  return x - textRect.width - paddings[1] - paddings[3] - 1;
66922
67174
  }
66923
- function createText({option, gridRect, position: position2, ecModel, y}) {
67175
+ function createText({option, gridRect, position: position2, ecModel, y, offset}) {
66924
67176
  const isLeft = position2 === "left";
66925
67177
  const {style, zlevel} = option;
66926
- const startX = isLeft ? gridRect.x : gridRect.x + gridRect.width;
67178
+ const startX = isLeft ? gridRect.x - offset : gridRect.x + gridRect.width + offset;
66927
67179
  const x = isLeft ? getLeftTextX(startX, style.text, style, ecModel) : startX;
66928
67180
  const textEl = new Text_default({
66929
67181
  x,
@@ -66932,23 +67184,23 @@ function createText({option, gridRect, position: position2, ecModel, y}) {
66932
67184
  z: 101,
66933
67185
  zlevel
66934
67186
  });
66935
- inner22(textEl).y = y;
67187
+ inner21(textEl).y = y;
66936
67188
  return textEl;
66937
67189
  }
66938
- function updateText({option, gridRect, position: position2, ecModel, el, y}) {
67190
+ function updateText({option, gridRect, position: position2, ecModel, el, y, offset}) {
66939
67191
  const isLeft = position2 === "left";
66940
- const startX = isLeft ? gridRect.x : gridRect.x + gridRect.width;
67192
+ const startX = isLeft ? gridRect.x - offset : gridRect.x + gridRect.width + offset;
66941
67193
  const {style} = option;
66942
67194
  const x = isLeft ? getLeftTextX(startX, style.text, style, ecModel) : startX;
66943
67195
  el.x = x;
66944
67196
  el.y = y;
66945
67197
  el.attr("style", style);
66946
- inner22(el).y = y;
67198
+ inner21(el).y = y;
66947
67199
  }
66948
67200
  function createLabel({x, y, labelData, markerModel, gridRect, position: position2}) {
66949
67201
  const {zlevel} = markerModel.option;
66950
- const {textStyle, lineStyle, showLine, showName, precision} = labelData;
66951
- const text = Number(labelData.value).toFixed(precision);
67202
+ const {textStyle, lineStyle, showLine, showName} = labelData;
67203
+ const text = labelData.text;
66952
67204
  const isLeft = position2 === "left";
66953
67205
  const group = new Group_default();
66954
67206
  const labelY = y - 9;
@@ -66960,7 +67212,7 @@ function createLabel({x, y, labelData, markerModel, gridRect, position: position
66960
67212
  zlevel
66961
67213
  });
66962
67214
  const textNameEl = new Text_default({
66963
- x: isLeft ? x : getLeftTextX(x, labelData.name, textStyle, markerModel.ecModel),
67215
+ x: isLeft ? gridRect.x : getLeftTextX(gridRect.x + gridRect.width, labelData.name, textStyle, markerModel.ecModel),
66964
67216
  y: labelY,
66965
67217
  style: Object.assign({text: labelData.name}, textStyle),
66966
67218
  z: 101,
@@ -66970,33 +67222,33 @@ function createLabel({x, y, labelData, markerModel, gridRect, position: position
66970
67222
  const lineEl = new Line_default({
66971
67223
  style: lineStyle,
66972
67224
  shape: {
66973
- x1: gridRect.x,
67225
+ x1: showName && isLeft ? gridRect.x + 10 : gridRect.x,
66974
67226
  y1: y,
66975
- x2: gridRect.x + gridRect.width,
67227
+ x2: showName && !isLeft ? gridRect.x + gridRect.width - 10 : gridRect.x + gridRect.width,
66976
67228
  y2: y
66977
67229
  },
66978
67230
  z: 100,
66979
67231
  ignore: !showLine
66980
67232
  });
66981
- inner22(lineEl).labelType = "line";
66982
- inner22(textNameEl).labelType = "nameLabel";
66983
- inner22(textEl).labelType = "textLabel";
66984
- inner22(group).y = labelY;
67233
+ inner21(lineEl).labelType = "line";
67234
+ inner21(textNameEl).labelType = "nameLabel";
67235
+ inner21(textEl).labelType = "textLabel";
67236
+ inner21(group).y = labelY;
66985
67237
  group.add(lineEl);
66986
67238
  group.add(textEl);
66987
67239
  group.add(textNameEl);
66988
67240
  return group;
66989
67241
  }
66990
67242
  function updateLabel({x, y, labelData, markerModel, gridRect, position: position2, el, labelTextStyle}) {
66991
- const {textStyle, lineStyle, showLine, showName, precision} = labelData;
67243
+ const {textStyle, lineStyle, showLine, showName} = labelData;
66992
67244
  const isLeft = position2 === "left";
66993
67245
  if (el.ignore) {
66994
67246
  el.ignore = false;
66995
67247
  }
66996
67248
  const labelY = y - 9;
66997
- inner22(el).y = labelY;
67249
+ inner21(el).y = labelY;
66998
67250
  each(el.children(), (element) => {
66999
- const labelType = inner22(element).labelType;
67251
+ const labelType = inner21(element).labelType;
67000
67252
  switch (labelType) {
67001
67253
  case "line":
67002
67254
  if (!showLine) {
@@ -67005,9 +67257,9 @@ function updateLabel({x, y, labelData, markerModel, gridRect, position: position
67005
67257
  }
67006
67258
  element.attr({
67007
67259
  shape: {
67008
- x1: gridRect.x,
67260
+ x1: showName && isLeft ? gridRect.x + 10 : gridRect.x,
67009
67261
  y1: y,
67010
- x2: gridRect.x + gridRect.width,
67262
+ x2: showName && !isLeft ? gridRect.x + gridRect.width - 10 : gridRect.x + gridRect.width,
67011
67263
  y2: y
67012
67264
  },
67013
67265
  style: lineStyle
@@ -67015,8 +67267,10 @@ function updateLabel({x, y, labelData, markerModel, gridRect, position: position
67015
67267
  element.ignore = false;
67016
67268
  break;
67017
67269
  case "textLabel":
67018
- const textLabel = Number(labelData.value).toFixed(precision);
67019
- element.x = isLeft ? getLeftTextX(x, textLabel, textStyle, markerModel.ecModel) : x;
67270
+ const textLabel = labelData.text;
67271
+ const labelX = isLeft ? getLeftTextX(x, textLabel, textStyle, markerModel.ecModel) : x;
67272
+ const margin = isLeft ? -1 : 1;
67273
+ element.x = labelX + (labelTextStyle ? margin : 0);
67020
67274
  element.y = labelY;
67021
67275
  element.attr("style", Object.assign({text: textLabel}, textStyle, labelTextStyle));
67022
67276
  break;
@@ -67026,7 +67280,8 @@ function updateLabel({x, y, labelData, markerModel, gridRect, position: position
67026
67280
  return;
67027
67281
  }
67028
67282
  const nameLabel = labelData.name;
67029
- element.x = isLeft ? x : getLeftTextX(x, nameLabel, textStyle, markerModel.ecModel);
67283
+ const nameX = isLeft ? gridRect.x : getLeftTextX(gridRect.x + gridRect.width, nameLabel, textStyle, markerModel.ecModel);
67284
+ element.x = nameX;
67030
67285
  element.y = labelY;
67031
67286
  element.attr("style", Object.assign({text: nameLabel}, textStyle, labelTextStyle));
67032
67287
  element.ignore = false;
@@ -68082,9 +68337,9 @@ InsideZoomModel.defaultOption = inheritDefaultOption(DataZoomModel_default.defau
68082
68337
  var InsideZoomModel_default = InsideZoomModel;
68083
68338
 
68084
68339
  // src/component/dataZoom/roams.ts
68085
- var inner23 = makeInner();
68340
+ var inner22 = makeInner();
68086
68341
  function setViewInfoToCoordSysRecord(api2, dataZoomModel, getRange) {
68087
- inner23(api2).coordSysRecordMap.each(function(coordSysRecord) {
68342
+ inner22(api2).coordSysRecordMap.each(function(coordSysRecord) {
68088
68343
  const dzInfo = coordSysRecord.dataZoomInfoMap.get(dataZoomModel.uid);
68089
68344
  if (dzInfo) {
68090
68345
  dzInfo.getRange = getRange;
@@ -68092,7 +68347,7 @@ function setViewInfoToCoordSysRecord(api2, dataZoomModel, getRange) {
68092
68347
  });
68093
68348
  }
68094
68349
  function disposeCoordSysRecordIfNeeded(api2, dataZoomModel) {
68095
- const coordSysRecordMap = inner23(api2).coordSysRecordMap;
68350
+ const coordSysRecordMap = inner22(api2).coordSysRecordMap;
68096
68351
  const coordSysKeyArr = coordSysRecordMap.keys();
68097
68352
  for (let i = 0; i < coordSysKeyArr.length; i++) {
68098
68353
  const coordSysKey = coordSysKeyArr[i];
@@ -68214,7 +68469,7 @@ function mergeControllerParams(dataZoomInfoMap) {
68214
68469
  }
68215
68470
  function installDataZoomRoamProcessor(registers) {
68216
68471
  registers.registerProcessor(registers.PRIORITY.PROCESSOR.FILTER, function(ecModel, api2) {
68217
- const apiInner = inner23(api2);
68472
+ const apiInner = inner22(api2);
68218
68473
  const coordSysRecordMap = apiInner.coordSysRecordMap || (apiInner.coordSysRecordMap = createHashMap());
68219
68474
  coordSysRecordMap.each(function(coordSysRecord) {
68220
68475
  coordSysRecord.dataZoomInfoMap = null;
@@ -70906,7 +71161,7 @@ var DEFAULT_OPTION = {
70906
71161
  show: false
70907
71162
  }
70908
71163
  };
70909
- var inner24 = makeInner();
71164
+ var inner23 = makeInner();
70910
71165
  var decalPaletteScope = {};
70911
71166
  function ariaVisual(ecModel, api2) {
70912
71167
  const ariaModel = ecModel.getModel("aria");
@@ -70932,7 +71187,7 @@ function ariaVisual(ecModel, api2) {
70932
71187
  decalScope = {};
70933
71188
  paletteScopeGroupByType.set(seriesModel.type, decalScope);
70934
71189
  }
70935
- inner24(seriesModel).scope = decalScope;
71190
+ inner23(seriesModel).scope = decalScope;
70936
71191
  });
70937
71192
  ecModel.eachRawSeries((seriesModel) => {
70938
71193
  if (ecModel.isSeriesFiltered(seriesModel)) {
@@ -70946,7 +71201,7 @@ function ariaVisual(ecModel, api2) {
70946
71201
  if (!seriesModel.isColorBySeries()) {
70947
71202
  const dataAll = seriesModel.getRawData();
70948
71203
  const idxMap = {};
70949
- const decalScope = inner24(seriesModel).scope;
71204
+ const decalScope = inner23(seriesModel).scope;
70950
71205
  data.each(function(idx) {
70951
71206
  const rawIdx = data.getRawIndex(idx);
70952
71207
  idxMap[rawIdx] = idx;