tvcharts 0.7.1 → 0.7.2

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.
@@ -79,7 +79,7 @@ var bgColorLayout = {
79
79
  return {
80
80
  progress: function (params, bgColorData) {
81
81
  var rectsByColor = {};
82
- var width = Math.ceil(coordSys.getBaseAxis().scale.barSpace) || 5;
82
+ var width = coordSys.getBaseAxis().scale.barSpace || 5;
83
83
  var leftOffset = width / 2;
84
84
  var _a = getHeight(seriesModel),
85
85
  height = _a.height,
@@ -98,7 +98,7 @@ var bgColorLayout = {
98
98
  var xPx = coordSys.dataToPoint([x + xOffset, 0])[0];
99
99
  var rects = rectsByColor[color] || [];
100
100
  rects.push({
101
- x: Math.floor(xPx - leftOffset),
101
+ x: xPx - leftOffset,
102
102
  y: startY
103
103
  });
104
104
  rectsByColor[color] = rects;
@@ -70,7 +70,7 @@ var BgColorView = /** @class */function (_super) {
70
70
  this._bgColorGroup.removeAll();
71
71
  }
72
72
  var bgColorGroup = this._bgColorGroup;
73
- var width = Math.ceil(seriesModel.coordinateSystem.getBaseAxis().scale.barSpace) || 5;
73
+ var width = seriesModel.coordinateSystem.getBaseAxis().scale.barSpace || 5;
74
74
  var isLine = width <= 2;
75
75
  each(rectsByColor, function (rects, color) {
76
76
  var el = new BgColorPath({
@@ -82,7 +82,7 @@ var BgColorView = /** @class */function (_super) {
82
82
  },
83
83
  style: {
84
84
  fill: isLine ? null : color,
85
- stroke: isLine ? color : 'transparent',
85
+ stroke: isLine ? color : 'none',
86
86
  lineWidth: isLine ? width : void 0
87
87
  }
88
88
  });
package/lib/coord/Axis.js CHANGED
@@ -101,8 +101,10 @@ var Axis = /** @class */function () {
101
101
  var dataIndex = data;
102
102
  var dataCount = this.scale.getAxisDataLen();
103
103
  var deltaFromRight = dataCount + scale.lastBarRightSideDiffBarCount - dataIndex;
104
- return Math.round(this._extent[1] - deltaFromRight * scale.barSpace);
104
+ return this._extent[1] - deltaFromRight * scale.barSpace;
105
+ // return Math.round(this._extent[1] - deltaFromRight * scale.barSpace);
105
106
  }
107
+
106
108
  if (this.onBand && scale.type === 'ordinal') {
107
109
  extent = extent.slice();
108
110
  fixExtentWithBands(extent, scale.count());
@@ -1313,18 +1313,18 @@ var ECharts = /** @class */function (_super) {
1313
1313
  if (isUpdate) {
1314
1314
  seriesModel.updateValue({
1315
1315
  data: map(params.data, function (item, index) {
1316
- var idx = seriesDataIndex + index;
1316
+ var idx = ordinalMeta.parseAndCollect(item[0]);
1317
1317
  var value = item.slice();
1318
1318
  if (seriesModel.option.data[idx].value) {
1319
1319
  seriesModel.option.data[idx].value = value.length === 1 ? value[0] : value;
1320
- item[0] = ordinalMeta.parseAndCollect(item[0]);
1320
+ item[0] = idx;
1321
1321
  return __assign(__assign({}, seriesModel.option.data[idx]), {
1322
1322
  value: item
1323
1323
  });
1324
1324
  } else {
1325
1325
  seriesModel.option.data[idx] = value.length === 1 ? value[0] : value;
1326
1326
  }
1327
- item[0] = ordinalMeta.parseAndCollect(item[0]);
1327
+ item[0] = idx;
1328
1328
  return item;
1329
1329
  })
1330
1330
  });
@@ -1339,12 +1339,12 @@ var ECharts = /** @class */function (_super) {
1339
1339
  var isCandletick_1 = isCandle(seriesModel.subType) && !seriesModel.notAddOrdinal;
1340
1340
  // const categories: string[] = [];
1341
1341
  var formatData = map(params.data, function (item) {
1342
- var idx = seriesDataIndex + 1;
1342
+ var idx = ordinalMeta.parseAndCollect(item[0]);
1343
1343
  if (isCandletick_1) {
1344
1344
  var value = item.slice();
1345
1345
  seriesModel.option.data[idx] = value.length === 1 ? value[0] : value;
1346
1346
  }
1347
- item[0] = ordinalMeta.parseAndCollect(item[0]);
1347
+ item[0] = idx;
1348
1348
  return item;
1349
1349
  });
1350
1350
  seriesModel.appendData({
@@ -234,7 +234,7 @@ var DefaultDataProvider = /** @class */function () {
234
234
  }
235
235
  }
236
236
  return {
237
- update: 1
237
+ update: newData.length > 1 ? 1 : 0
238
238
  };
239
239
  }
240
240
  }();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tvcharts",
3
- "version": "0.7.01",
3
+ "version": "0.7.02",
4
4
  "description": "基于echarts5.5.0二次开发",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [