tvcharts 0.7.72 → 0.7.73

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
@@ -25109,14 +25109,14 @@ var ECharts = class extends Eventful_default {
25109
25109
  doDispatchAction.call(this, payload, false);
25110
25110
  }
25111
25111
  }
25112
- scrollToLastIndex(animationDuration = 300) {
25112
+ scrollToLastIndex(animationDuration = 300, defaultLastBarRightSideDiffBarCount = 0) {
25113
25113
  if (this._disposed) {
25114
25114
  disposedWarning(this.id);
25115
25115
  return;
25116
25116
  }
25117
25117
  const xAxisModal = this._model.getComponent("xAxis", 0);
25118
25118
  const scale4 = xAxisModal.axis.scale;
25119
- const initDistance = scale4.lastBarRightSideDiffBarCount > 0 ? scale4.lastBarRightSideDiffBarCount * scale4.barSpace : 50;
25119
+ const initDistance = scale4.lastBarRightSideDiffBarCount > 0 ? scale4.lastBarRightSideDiffBarCount * scale4.barSpace : defaultLastBarRightSideDiffBarCount ? defaultLastBarRightSideDiffBarCount * scale4.barSpace : 50;
25120
25120
  const distance2 = scale4.lastBarRightSideDiffBarCount * scale4.barSpace - initDistance;
25121
25121
  this.scrollByDistance(distance2, animationDuration);
25122
25122
  }
@@ -25142,7 +25142,7 @@ var ECharts = class extends Eventful_default {
25142
25142
  const xAxisModal = this._model.getComponent("xAxis", 0);
25143
25143
  const scale4 = xAxisModal.axis.scale;
25144
25144
  const ordinalMeta = scale4.getOrdinalMeta();
25145
- const dataIndex = ordinalMeta.getOrdinal(timestamp);
25145
+ const dataIndex = ordinalMeta.getOrdinal(timestamp) ?? ordinalMeta.getClosestTime(timestamp);
25146
25146
  if (isNumber(dataIndex)) {
25147
25147
  this.scrollToDataIndex(dataIndex, animationDuration);
25148
25148
  }
@@ -56942,14 +56942,22 @@ function install25(registers) {
56942
56942
  }
56943
56943
 
56944
56944
  // src/chart/mineLines/util.ts
56945
- function findIntersectionPoint(A, B, rectangle) {
56945
+ function findIntersectionPoint(A, B, rectangle, bias = "start") {
56946
56946
  const [xA, yA] = A;
56947
56947
  const [xB, yB] = B;
56948
56948
  const {left, top, right, bottom} = rectangle;
56949
- if (xA.toFixed(3) === xB.toFixed(3)) {
56950
- return [xA, yA > yB ? top : bottom];
56951
- } else if (yA.toFixed(3) === yB.toFixed(3)) {
56949
+ if (yA.toFixed(3) === yB.toFixed(3)) {
56950
+ if (xA === xB) {
56951
+ const isEndBias = bias === "end";
56952
+ return [isEndBias ? right : left, yA];
56953
+ }
56952
56954
  return [xA > xB ? right : left, yA];
56955
+ } else if (xA.toFixed(3) === xB.toFixed(3)) {
56956
+ if (yA === yB) {
56957
+ const isEndBias = bias === "end";
56958
+ return [xA, isEndBias ? top : bottom];
56959
+ }
56960
+ return [xA, yA > yB ? top : bottom];
56953
56961
  }
56954
56962
  const direction = [xB - xA, yB - yA];
56955
56963
  const t = Math.min((left - xA) / direction[0], (right - xA) / direction[0], (top - yA) / direction[1], (bottom - yA) / direction[1]);
@@ -56996,7 +57004,7 @@ function getDrawLine(params) {
56996
57004
  }
56997
57005
  case "both": {
56998
57006
  const pointC = findIntersectionPoint(startPoint, endPoint, rect);
56999
- const pointB = findIntersectionPoint(endPoint, startPoint, rect);
57007
+ const pointB = findIntersectionPoint(endPoint, startPoint, rect, "end");
57000
57008
  return [pointC, pointB];
57001
57009
  }
57002
57010
  default:
@@ -76097,7 +76105,7 @@ var LimitTipView2 = class extends Component_default2 {
76097
76105
  el.style.top = "50%";
76098
76106
  el.style.transform = "translateY(-50%)";
76099
76107
  this.warpEl = el;
76100
- api2.getDom().appendChild(el);
76108
+ api2.getDom().parentNode.appendChild(el);
76101
76109
  }
76102
76110
  render(limitTipModel, ecModel, api2) {
76103
76111
  if (!limitTipModel.get("show")) {