tvcharts 0.6.86 → 0.6.88

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
@@ -27838,6 +27838,7 @@ var uidBase = 0;
27838
27838
  var OrdinalMeta = class {
27839
27839
  constructor(opt) {
27840
27840
  this.cache = null;
27841
+ this._appendCount = 0;
27841
27842
  this.categories = opt.categories || [];
27842
27843
  this.extraCategory = opt.extraCategory || [];
27843
27844
  this.loadMoreCategory = opt.loadMoreCategory;
@@ -27935,7 +27936,7 @@ var OrdinalMeta = class {
27935
27936
  fillWeightsForPoints(timePoints);
27936
27937
  for (let index = 0; index < timePoints.length; ++index) {
27937
27938
  if (index === 0) {
27938
- return;
27939
+ continue;
27939
27940
  }
27940
27941
  const point = timePoints[index];
27941
27942
  let marksForWeight = marksByWeight.get(point.weight);
@@ -27946,6 +27947,11 @@ var OrdinalMeta = class {
27946
27947
  marksForWeight.push(point);
27947
27948
  }
27948
27949
  }
27950
+ this._appendCount = this._appendCount + 1;
27951
+ if (this._appendCount > 100) {
27952
+ this._appendCount = 0;
27953
+ this.cache = null;
27954
+ }
27949
27955
  }
27950
27956
  getCategories() {
27951
27957
  return this.categories;
@@ -39034,7 +39040,7 @@ var Cartesian2D = class extends Cartesian_default {
39034
39040
  const yAxis = this.getAxis("y");
39035
39041
  const baseValue = this.getBaseValue();
39036
39042
  out2[0] = xAxis.toGlobalCoord(xAxis.dataToCoord(xVal, clamp2));
39037
- out2[1] = Math.max(yAxis.toGlobalCoord(yAxis.dataToCoord(yVal, clamp2, baseValue)), -1e3);
39043
+ out2[1] = Math.max(yAxis.toGlobalCoord(yAxis.dataToCoord(yVal, clamp2, baseValue)), -1e6);
39038
39044
  return out2;
39039
39045
  }
39040
39046
  clampData(data, out2) {
@@ -56407,6 +56413,8 @@ var StrategyView2 = class extends Chart_default {
56407
56413
  const texts = data.getLayout("texts");
56408
56414
  if (texts && texts.length) {
56409
56415
  const textColor = seriesModel.get("textColor");
56416
+ const textBorder = seriesModel.get("textBorder");
56417
+ const textBorderWidth = seriesModel.get("textBorderWidth");
56410
56418
  each(texts, function(item) {
56411
56419
  const {text, point} = item;
56412
56420
  const el = new Text_default({
@@ -56414,7 +56422,9 @@ var StrategyView2 = class extends Chart_default {
56414
56422
  text,
56415
56423
  align: "center",
56416
56424
  fill: textColor ?? "#fff",
56417
- fontSize: 12
56425
+ fontSize: 12,
56426
+ stroke: textBorder,
56427
+ lineWidth: textBorderWidth
56418
56428
  },
56419
56429
  x: point[0],
56420
56430
  y: point[1]
@@ -56845,7 +56855,7 @@ var MineLinesSeriesModel2 = class extends Series_default {
56845
56855
  that.option.data.push(item);
56846
56856
  }
56847
56857
  });
56848
- this.option.data = this.option.data.filter((item) => !item.isDelete);
56858
+ this.option.data = this.option.data.filter((item) => !item.isDelete).slice(-this.option.limit);
56849
56859
  this.computedDataIndexById(this.option);
56850
56860
  return this.option.data;
56851
56861
  }
@@ -56868,7 +56878,8 @@ MineLinesSeriesModel.defaultOption = {
56868
56878
  large: true,
56869
56879
  largeThreshold: 600,
56870
56880
  clip: true,
56871
- statusLineInvisible: true
56881
+ statusLineInvisible: true,
56882
+ limit: 50
56872
56883
  };
56873
56884
  var MineLinesSeries_default = MineLinesSeriesModel;
56874
56885
 
@@ -57350,7 +57361,7 @@ var BoxesSeriesModel2 = class extends Series_default {
57350
57361
  that.option.data.push(item);
57351
57362
  }
57352
57363
  });
57353
- this.option.data = this.option.data.filter((item) => !item.isDelete);
57364
+ this.option.data = this.option.data.filter((item) => !item.isDelete).slice(-this.option.limit);
57354
57365
  this.computedDataIndexById(this.option);
57355
57366
  return this.option.data;
57356
57367
  }
@@ -57373,7 +57384,8 @@ BoxesSeriesModel.defaultOption = {
57373
57384
  large: true,
57374
57385
  largeThreshold: 600,
57375
57386
  clip: true,
57376
- statusLineInvisible: true
57387
+ statusLineInvisible: true,
57388
+ limit: 50
57377
57389
  };
57378
57390
  var BoxesSeries_default = BoxesSeriesModel;
57379
57391
 
@@ -58614,7 +58626,7 @@ var LabelsSeriesModel2 = class extends Series_default {
58614
58626
  that.option.data.push(item);
58615
58627
  }
58616
58628
  });
58617
- this.option.data = this.option.data.filter((item) => !item.isDelete);
58629
+ this.option.data = this.option.data.filter((item) => !item.isDelete).slice(-this.option.limit);
58618
58630
  this.computedDataIndexById(this.option);
58619
58631
  return this.option.data;
58620
58632
  }
@@ -58633,7 +58645,8 @@ LabelsSeriesModel.defaultOption = {
58633
58645
  emphasis: {
58634
58646
  scale: true
58635
58647
  },
58636
- clip: true
58648
+ clip: true,
58649
+ limit: 50
58637
58650
  };
58638
58651
  var LabelsSeries_default = LabelsSeriesModel;
58639
58652
 
@@ -59013,7 +59026,7 @@ function getYByLocation2(seriesModel) {
59013
59026
  const scale4 = yAxis.scale;
59014
59027
  const [, end2] = yAxis.getExtent();
59015
59028
  const [boundaryGapX, boundaryGapY] = scale4.rawExtentInfo.getBoundaryGapInner();
59016
- return Math.floor(location === "top" ? end2 * boundaryGapX + 30 : end2 * (1 - boundaryGapY) + 30);
59029
+ return Math.floor(location === "top" ? end2 * boundaryGapX : end2 * (1 - boundaryGapY));
59017
59030
  }
59018
59031
  var labelSymbols = [
59019
59032
  "labelDown",
@@ -59141,8 +59154,8 @@ var labelsLayout = {
59141
59154
  }
59142
59155
  }
59143
59156
  const symbolPoint = [point[0], price || point[1]];
59144
- if (location === "bottom") {
59145
- symbolPoint[1] = symbolPoint[1] - symbolRect[1];
59157
+ if (location === "top") {
59158
+ symbolPoint[1] = symbolPoint[1] + symbolRect[1];
59146
59159
  }
59147
59160
  if ((yloc === "belowbar" || yloc === "price") && upSymbols.includes(symbol)) {
59148
59161
  symbolPoint[1] = symbolPoint[1] + symbolRect[1];
@@ -67908,7 +67921,7 @@ function calculateDataExtent(axisProxy, axisDim, seriesModels) {
67908
67921
  const axisModel = axisProxy.getAxisModel();
67909
67922
  const dataFromSeriesName = axisModel.axis.model.get("dataFromSeriesName");
67910
67923
  each13(seriesModels, function(seriesModel) {
67911
- if (dataFromSeriesName && seriesModel.name !== dataFromSeriesName) {
67924
+ if (seriesModel.get("invisible") || dataFromSeriesName && seriesModel.name !== dataFromSeriesName) {
67912
67925
  return;
67913
67926
  }
67914
67927
  const seriesData = seriesModel.getData();