tvcharts 0.7.32 → 0.7.33

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
@@ -17993,7 +17993,7 @@ DefaultDataProvider.internalField = function() {
17993
17993
  }
17994
17994
  }
17995
17995
  return {
17996
- update: 1
17996
+ update: newData.length > 1 ? 1 : 0
17997
17997
  };
17998
17998
  }
17999
17999
  }();
@@ -24811,12 +24811,16 @@ var ECharts = class extends Eventful_default {
24811
24811
  const seriesDataIndex = seriesData.count(true) - 1;
24812
24812
  const isUpdate = params.operation === "update";
24813
24813
  if (isUpdate) {
24814
- seriesModel.updateValue({data: map(params.data, (item, index2) => {
24815
- const idx = seriesDataIndex + index2;
24814
+ const dataList = map(params.data, (item, index2) => {
24815
+ const idx = ordinalMeta.parseAndCollect(item[0]);
24816
+ if (!seriesModel.option.data[idx]) {
24817
+ log(`\u9519\u8BEF\u7684\u4E0B\u6807\u6362\u7B97${idx},${item[0]}`);
24818
+ return;
24819
+ }
24816
24820
  const value = item.slice();
24817
24821
  if (seriesModel.option.data[idx].value) {
24818
24822
  seriesModel.option.data[idx].value = value.length === 1 ? value[0] : value;
24819
- item[0] = ordinalMeta.parseAndCollect(item[0]);
24823
+ item[0] = idx;
24820
24824
  return {
24821
24825
  ...seriesModel.option.data[idx],
24822
24826
  value: item
@@ -24824,20 +24828,23 @@ var ECharts = class extends Eventful_default {
24824
24828
  } else {
24825
24829
  seriesModel.option.data[idx] = value.length === 1 ? value[0] : value;
24826
24830
  }
24827
- item[0] = ordinalMeta.parseAndCollect(item[0]);
24831
+ item[0] = idx;
24828
24832
  return item;
24829
- })});
24833
+ }).filter(Boolean);
24834
+ if (dataList.length) {
24835
+ seriesModel.updateValue({data: dataList});
24836
+ }
24830
24837
  } else if (params.operation === "script") {
24831
24838
  seriesModel.updateData({data: params.data, isMustAppend: params.isMustAppend, lastIndex});
24832
24839
  } else {
24833
24840
  const isCandletick = isCandle(seriesModel.subType) && !seriesModel.notAddOrdinal;
24834
24841
  const formatData = map(params.data, (item) => {
24835
- const idx = seriesDataIndex + 1;
24842
+ const idx = ordinalMeta.parseAndCollect(item[0]);
24836
24843
  if (isCandletick) {
24837
24844
  const value = item.slice();
24838
24845
  seriesModel.option.data[idx] = value.length === 1 ? value[0] : value;
24839
24846
  }
24840
- item[0] = ordinalMeta.parseAndCollect(item[0]);
24847
+ item[0] = idx;
24841
24848
  return item;
24842
24849
  });
24843
24850
  seriesModel.appendData({data: formatData});
@@ -25336,12 +25343,19 @@ ECharts.internalField = function() {
25336
25343
  }
25337
25344
  const isUpdateAxisPointer = payload.type === "updateAxisPointer";
25338
25345
  if (isUpdateAxisPointer) {
25339
- this._throttledSelectItem({
25340
- messageCenter,
25341
- ecModel,
25342
- type: eventObj.dataIndexInside ? "selectitem" : "last",
25343
- eventObj
25344
- });
25346
+ const xAxisModal = this._model.getComponent("xAxis", 0);
25347
+ if (xAxisModal) {
25348
+ const scale4 = xAxisModal.axis.scale;
25349
+ const ordinalMeta = scale4.getOrdinalMeta();
25350
+ const lastIndex = ordinalMeta.getCategoriesSize();
25351
+ this._throttledSelectItem({
25352
+ messageCenter,
25353
+ ecModel,
25354
+ type: eventObj.dataIndex < lastIndex ? "selectitem" : "last",
25355
+ eventObj
25356
+ });
25357
+ console.log('%c [ eventObj.dataIndex < lastIndex ? "selectitem" : "last" ]-2585', "font-size:13px; background:pink; color:#bf2c9f;", eventObj.dataIndex < lastIndex ? "selectitem" : "last");
25358
+ }
25345
25359
  }
25346
25360
  }
25347
25361
  };
@@ -55830,7 +55844,6 @@ var LinesPlotView2 = class extends Chart_default {
55830
55844
  const z2 = seriesModel.get("z2");
55831
55845
  const baseY = seriesModel.coordinateSystem.dataToPoint([0, histbase])[1];
55832
55846
  const visualColor = getAreaGradient(data, seriesModel, api2);
55833
- console.log("%c [ visualColor ]-353", "font-size:13px; background:pink; color:#bf2c9f;", visualColor);
55834
55847
  each(linePointsByKey, function(item, key) {
55835
55848
  const [stroke] = key.split(":");
55836
55849
  const {color: color2, isDefaultColor} = getFormatColor(stroke);
@@ -57220,10 +57233,10 @@ var MinePolyLinesLayout = {
57220
57233
  for (let i = params.start; i < params.end; i++) {
57221
57234
  const itemModel = data.getItemModel(i);
57222
57235
  const {width, color: color2 = "none", lineStyle, fill = "none", closed = false, curved = false} = itemModel.get("itemStyle");
57223
- if (color2 === "none" && fill === "none") {
57236
+ if (!color2 && fill === "none") {
57224
57237
  continue;
57225
57238
  }
57226
- const key = `${color2}:${width}:${lineStyle}:${fill}:${closed}:${curved}`;
57239
+ const key = `${color2 || "none"}:${width}:${lineStyle}:${fill}:${closed}:${curved}`;
57227
57240
  const points4 = itemModel.get("points");
57228
57241
  const itemPoints = [];
57229
57242
  each(points4, function(item) {
@@ -57265,13 +57278,13 @@ var LineFillsPath = class extends Path_default {
57265
57278
  const {points: points4} = shape;
57266
57279
  for (let i = 0; i < points4.length; ) {
57267
57280
  const x1 = points4[i++];
57268
- const y1 = points4[i++];
57281
+ const y1 = Math.floor(points4[i++]);
57269
57282
  const x2 = points4[i++];
57270
- const y2 = points4[i++];
57283
+ const y2 = Math.floor(points4[i++]);
57271
57284
  const x3 = points4[i++];
57272
- const y3 = points4[i++];
57285
+ const y3 = Math.floor(points4[i++]);
57273
57286
  const x4 = points4[i++];
57274
- const y4 = points4[i++];
57287
+ const y4 = Math.floor(points4[i++]);
57275
57288
  path.moveTo(x1, y1);
57276
57289
  path.lineTo(x2, y2);
57277
57290
  path.lineTo(x3, y3);
@@ -57316,11 +57329,12 @@ var LineFillsView2 = class extends Chart_default {
57316
57329
  }
57317
57330
  const linesGroup = this._linesGroup;
57318
57331
  const z2 = seriesModel.get("z2");
57319
- const linesPointById = data.getLayout("linesPointById");
57320
- each(linesPointById, function(item, color2) {
57332
+ const linesPoints = data.getLayout("linesPoints");
57333
+ each(linesPoints, function(item) {
57334
+ const {color: color2, points: points4} = item;
57321
57335
  const el = new LineFillsPath_default({
57322
57336
  shape: {
57323
- points: item
57337
+ points: points4
57324
57338
  },
57325
57339
  style: {
57326
57340
  fill: color2,
@@ -57435,7 +57449,7 @@ var LineFillsLayout = {
57435
57449
  const height = api2.getHeight();
57436
57450
  return {
57437
57451
  progress(params, mineLinesData) {
57438
- const linesPointById = {};
57452
+ const linesPoints = [];
57439
57453
  for (let i = params.start; i < params.end; i++) {
57440
57454
  const itemModel = data.getItemModel(i);
57441
57455
  const {color: color2} = itemModel.get("itemStyle");
@@ -57464,12 +57478,15 @@ var LineFillsLayout = {
57464
57478
  startPoint: startPoint2,
57465
57479
  endPoint: endPoint2
57466
57480
  });
57467
- const points4 = linesPointById[color2] || [];
57481
+ const points4 = [];
57468
57482
  points4.push(...extendStart1, ...extendEnd1, ...extendEnd2, ...extendStart2);
57469
- linesPointById[color2] = points4;
57483
+ linesPoints.push({
57484
+ color: color2,
57485
+ points: points4
57486
+ });
57470
57487
  }
57471
57488
  data.setLayout({
57472
- linesPointById
57489
+ linesPoints
57473
57490
  });
57474
57491
  }
57475
57492
  };
@@ -60043,7 +60060,7 @@ var BgColorView2 = class extends Chart_default {
60043
60060
  },
60044
60061
  style: {
60045
60062
  fill: isLine ? null : color2,
60046
- stroke: isLine ? color2 : "transparent",
60063
+ stroke: isLine ? color2 : "none",
60047
60064
  lineWidth: isLine ? width : void 0
60048
60065
  }
60049
60066
  });
@@ -60122,7 +60139,7 @@ var bgColorLayout = {
60122
60139
  const xPx = coordSys.dataToPoint([x + xOffset, 0])[0];
60123
60140
  const rects = rectsByColor[color2] || [];
60124
60141
  rects.push({
60125
- x: Math.floor(xPx - leftOffset),
60142
+ x: xPx - leftOffset,
60126
60143
  y: startY
60127
60144
  });
60128
60145
  rectsByColor[color2] = rects;