tvcharts 0.5.76 → 0.5.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
@@ -11759,7 +11759,7 @@ function getAllSelectedIndices(ecModel) {
11759
11759
  return ret;
11760
11760
  }
11761
11761
  function getSeriesPointData(ecModel, payload = {}) {
11762
- const seriesPointData = [];
11762
+ const seriesPointData = {};
11763
11763
  ecModel.eachSeries(function(seriesModel) {
11764
11764
  const data = seriesModel.getData();
11765
11765
  const index = payload.dataIndex ?? data.count() - 1;
@@ -11769,13 +11769,14 @@ function getSeriesPointData(ecModel, payload = {}) {
11769
11769
  const currentValue = data.get(dim, index);
11770
11770
  const prevValue = data.get(dim, index - 1);
11771
11771
  const changePercent = ((currentValue - prevValue) / prevValue * 100).toFixed(2) + "%";
11772
- seriesPointData.push({
11772
+ const seriesId = seriesModel.id;
11773
+ seriesPointData[seriesId] = {
11773
11774
  name: seriesModel.name,
11774
11775
  data: values,
11775
11776
  color: style.fill,
11776
- seriesId: seriesModel.id,
11777
+ seriesId,
11777
11778
  changePercent
11778
- });
11779
+ };
11779
11780
  });
11780
11781
  return seriesPointData;
11781
11782
  }
@@ -23191,8 +23192,7 @@ var ECharts = class extends Eventful_default {
23191
23192
  warn("There is no specified series model");
23192
23193
  }
23193
23194
  }
23194
- const data = seriesModel.getData();
23195
- const dataIndex = parsedFinder.hasOwnProperty("dataIndex") ? data.indexOfRawIndex(parsedFinder.dataIndex) : 0;
23195
+ const dataIndex = parsedFinder.hasOwnProperty("dataIndex") ? parsedFinder.dataIndex : 0;
23196
23196
  const axis = seriesModel.getBaseAxis();
23197
23197
  return axis.scale.getLabel({value: dataIndex});
23198
23198
  }
@@ -67068,9 +67068,9 @@ var MarkLabelView2 = class extends Component_default2 {
67068
67068
  option.style = Object.assign({}, option.style, {text: formatLabel2});
67069
67069
  }
67070
67070
  if (el) {
67071
- updateText({el, gridRect, position: position2, option, ecModel, y});
67071
+ updateText({el, gridRect, position: position2, option, ecModel, y, offset});
67072
67072
  } else {
67073
- el = createText({gridRect, position: position2, option, ecModel, y});
67073
+ el = createText({gridRect, position: position2, option, ecModel, y, offset});
67074
67074
  graphLabelGroup.add(el);
67075
67075
  graphicLabelElMap.set(option.id, el);
67076
67076
  inner21(el).yAxisIndex = yAxisModel.index;
@@ -67093,12 +67093,13 @@ var MarkLabelView2 = class extends Component_default2 {
67093
67093
  const gridRect = yAxisModel.grid.getRect();
67094
67094
  const position2 = yAxisModel.position;
67095
67095
  const y = yAxisModel.toGlobalCoord(yAxisModel.dataToCoord(inner21(el).originalValue)) - 9;
67096
+ const offset = yAxisModel.model.get("offset") || 0;
67096
67097
  let style = inner21(el).style;
67097
67098
  if (yAxisModel.scale.type === "percentage") {
67098
67099
  const formatLabel2 = yAxisModel.scale.getLabel({value: +style.text});
67099
67100
  style = Object.assign({}, style, {text: formatLabel2});
67100
67101
  }
67101
- updateText({el, gridRect, position: position2, option: {style}, ecModel, y});
67102
+ updateText({el, gridRect, position: position2, option: {style}, ecModel, y, offset});
67102
67103
  });
67103
67104
  }
67104
67105
  removeGraphicLabels(labelOption) {