@visactor/react-vchart 2.0.23-alpha.1 → 2.0.23-alpha.3

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/build/index.js CHANGED
@@ -54927,10 +54927,8 @@
54927
54927
  const record = data[i];
54928
54928
  if (record) {
54929
54929
  const startValue = record[startField],
54930
- endValue = record[endField || startField],
54931
- min = Math.min(startValue, endValue),
54932
- max = Math.max(startValue, endValue);
54933
- if (min <= value && max >= value) return record;
54930
+ endValue = record[endField || startField];
54931
+ if (startValue <= value && endValue >= value) return record;
54934
54932
  }
54935
54933
  }
54936
54934
  return null;
@@ -59002,11 +59000,8 @@
59002
59000
  field2 = "xField" === field ? series.fieldX2 : series.fieldY2,
59003
59001
  datum = getDatumByValue(series.getViewData().latestData, +value, field1, field2);
59004
59002
  if (datum) {
59005
- const posStart = "xField" === field ? series.dataToPositionX(datum) : series.dataToPositionY(datum);
59006
- if (field2) {
59007
- const posEnd = "xField" === field ? series.dataToPositionX1(datum) : series.dataToPositionY1(datum);
59008
- bandSize = Math.abs(posStart - posEnd), coord = Math.min(posStart, posEnd), value = `${datum[field1]} ~ ${datum[field2]}`;
59009
- } else bandSize = 1, coord = posStart;
59003
+ const startX = "xField" === field ? series.dataToPositionX(datum) : series.dataToPositionY(datum);
59004
+ field2 ? (bandSize = Math.abs(startX - ("xField" === field ? series.dataToPositionX1(datum) : series.dataToPositionY1(datum))), value = `${datum[field1]} ~ ${datum[field2]}`) : bandSize = 1, coord = startX;
59010
59005
  }
59011
59006
  niceLabelFormatter = axis.niceLabelFormatter;
59012
59007
  }
@@ -77162,7 +77157,7 @@
77162
77157
  return [this._legendComponent];
77163
77158
  }
77164
77159
  clear() {
77165
- super.clear(), this._cacheAttrs = null, this._preSelectedData = null;
77160
+ super.clear(), this._legendComponent = null, this._cacheAttrs = null, this._preSelectedData = null;
77166
77161
  }
77167
77162
  }
77168
77163
  BaseLegend.specKey = "legends";