tvcharts 0.6.76 → 0.6.77

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
@@ -24584,9 +24584,7 @@ var ECharts = class extends Eventful_default {
24584
24584
  disposedWarning(this.id);
24585
24585
  return;
24586
24586
  }
24587
- const lastWidth = this.getWidth();
24588
24587
  this._zr.resize(opts);
24589
- const width = this.getWidth();
24590
24588
  const ecModel = this._model;
24591
24589
  this._loadingFX && this._loadingFX.resize();
24592
24590
  if (!ecModel) {
@@ -24606,10 +24604,6 @@ var ECharts = class extends Eventful_default {
24606
24604
  needPrepare && prepare(this);
24607
24605
  updateMethods.update.call(this, {
24608
24606
  type: "resize",
24609
- changeWidth: {
24610
- lastWidth,
24611
- width
24612
- },
24613
24607
  animation: extend({
24614
24608
  duration: 0
24615
24609
  }, opts && opts.animation)
@@ -24908,6 +24902,16 @@ var ECharts = class extends Eventful_default {
24908
24902
  doDispatchAction.call(this, payload, false);
24909
24903
  }
24910
24904
  }
24905
+ scrollToLastIndex(animationDuration = 300) {
24906
+ if (this._disposed) {
24907
+ disposedWarning(this.id);
24908
+ return;
24909
+ }
24910
+ const xAxisModal = this._model.getComponent("xAxis", 0);
24911
+ const scale4 = xAxisModal.axis.scale;
24912
+ const distance2 = scale4.lastBarRightSideDiffBarCount * scale4.barSpace - 50;
24913
+ this.scrollByDistance(distance2, animationDuration);
24914
+ }
24911
24915
  scrollToDataIndex(dataIndex, animationDuration) {
24912
24916
  if (this._disposed) {
24913
24917
  disposedWarning(this.id);
@@ -57740,9 +57744,6 @@ var CandlePlotView2 = class extends Chart_default {
57740
57744
  this._progressiveEls = null;
57741
57745
  this._renderNormal(seriesModel);
57742
57746
  }
57743
- eachRendered(cb) {
57744
- traverseElements(this._progressiveEls || this.group, cb);
57745
- }
57746
57747
  _renderNormal(seriesModel) {
57747
57748
  const data = seriesModel.getData();
57748
57749
  const group = this.group;
@@ -57864,7 +57865,7 @@ function getBorderColor(sign, model) {
57864
57865
  return model.get(sign === 0 ? dojiBorderColorQuery2 : sign > 0 ? positiveBorderColorQuery2 : negativeBorderColorQuery2);
57865
57866
  }
57866
57867
  function getWickColor(sign, model) {
57867
- return model.get(sign === 0 ? dojiBorderColorQuery2 : sign > 0 ? positiveWickColorQuery : negativeWickColorQuery);
57868
+ return model.get(sign > 0 ? positiveWickColorQuery : negativeWickColorQuery);
57868
57869
  }
57869
57870
  var candlePlotLayout = {
57870
57871
  seriesType: "candlePlot",
@@ -57890,14 +57891,13 @@ var candlePlotLayout = {
57890
57891
  return {
57891
57892
  progress: normalProgress
57892
57893
  };
57893
- function normalProgress(params, data2) {
57894
- let dataIndex;
57895
- const store = data2.getStore();
57894
+ function normalProgress(params, candleData) {
57895
+ const store = candleData.getStore();
57896
57896
  const bodyPointsByColor = {};
57897
57897
  const wickPointsByColor = {};
57898
- const lastIndex = data2.count(true) - 1;
57899
- while ((dataIndex = params.next()) != null) {
57900
- if (showLast && lastIndex - data2.getRawIndex(dataIndex) >= showLast) {
57898
+ const lastIndex = candleData.count(true) - 1;
57899
+ for (let dataIndex = params.start; dataIndex < params.end; dataIndex++) {
57900
+ if (showLast && lastIndex - candleData.getRawIndex(dataIndex) >= showLast) {
57901
57901
  continue;
57902
57902
  }
57903
57903
  const axisDimVal = store.get(cDimI, dataIndex);
@@ -57911,7 +57911,7 @@ var candlePlotLayout = {
57911
57911
  const ocHighPoint = getPoint(ocHigh, axisDimVal);
57912
57912
  const lowestPoint = getPoint(lowestVal, axisDimVal);
57913
57913
  const highestPoint = getPoint(highestVal, axisDimVal);
57914
- const itemModel = data2.getItemModel(dataIndex);
57914
+ const itemModel = candleData.getItemModel(dataIndex);
57915
57915
  const hasDojiColor = !!itemModel.get(["itemStyle", "borderColorDoji"]);
57916
57916
  const sign = getSign2(store, dataIndex, openVal, closeVal, closeDimI, hasDojiColor);
57917
57917
  const key = `${getColor(sign, itemModel) || "none"}:${getBorderColor(sign, itemModel) || "none"}`;
@@ -57926,8 +57926,7 @@ var candlePlotLayout = {
57926
57926
  wickPointsByColor[wickKey] = wickPoint;
57927
57927
  }
57928
57928
  }
57929
- data2.setLayout({
57930
- candleWidth,
57929
+ candleData.setLayout({
57931
57930
  bodyPointsByColor,
57932
57931
  wickPointsByColor,
57933
57932
  isSimpleBox
@@ -67497,9 +67496,9 @@ var each13 = each;
67497
67496
  var asc2 = asc;
67498
67497
  var leftMinVisibleBarCount = 2;
67499
67498
  var rightMinVisibleBarCount = 2;
67500
- var triggerVisibleChanged = (api2, params) => {
67499
+ var triggerVisibleChanged = throttle((api2, params) => {
67501
67500
  api2.trigger("visiblechanged", params);
67502
- };
67501
+ }, 20);
67503
67502
  var AxisProxy = class {
67504
67503
  constructor(dimName, axisIndex, dataZoomModel, ecModel) {
67505
67504
  this._throttleVisibleChanged = triggerVisibleChanged;
@@ -71661,7 +71660,7 @@ var BgRectView2 = class extends Component_default2 {
71661
71660
  const color2 = bgRectModel.get("color");
71662
71661
  const xAxis = ecModel.getComponent("xAxis", 0);
71663
71662
  const xAxis2D = xAxis.axis;
71664
- const x = xAxis2D.toGlobalCoord(xAxis2D.dataToCoord(startIndex));
71663
+ const x = Math.floor(xAxis2D.toGlobalCoord(xAxis2D.dataToCoord(startIndex)) + xAxis2D.scale.barSpace / 2);
71665
71664
  const lineEl = new Line_default({
71666
71665
  shape: {
71667
71666
  x1: x,