@visactor/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/es5/index.js +1 -1
- package/build/index.es.js +5 -8
- package/build/index.js +5 -8
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/chart/index.js +1 -1
- package/cjs/chart/stack.js +1 -1
- package/cjs/chart/util.js +1 -1
- package/cjs/component/crosshair/utils/cartesian.js +3 -5
- package/cjs/component/crosshair/utils/cartesian.js.map +1 -1
- package/cjs/component/crosshair/utils/common.js +2 -2
- package/cjs/component/crosshair/utils/common.js.map +1 -1
- package/cjs/component/legend/base-legend.js +1 -1
- package/cjs/component/legend/base-legend.js.map +1 -1
- package/cjs/component/util.js +1 -2
- package/cjs/constant/base.js +2 -1
- package/cjs/constant/scroll-bar.js +1 -2
- package/cjs/constant/word-cloud.js +2 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/instance-manager.js +1 -1
- package/cjs/core/interface.js +1 -1
- package/cjs/core/util.js +1 -1
- package/cjs/core/vchart.js +1 -1
- package/cjs/data/initialize.js +1 -1
- package/cjs/data/register.js +1 -1
- package/esm/chart/index.js +1 -1
- package/esm/chart/stack.js +1 -1
- package/esm/chart/util.js +1 -1
- package/esm/component/crosshair/utils/cartesian.js +3 -5
- package/esm/component/crosshair/utils/cartesian.js.map +1 -1
- package/esm/component/crosshair/utils/common.js +2 -2
- package/esm/component/crosshair/utils/common.js.map +1 -1
- package/esm/component/legend/base-legend.js +1 -1
- package/esm/component/legend/base-legend.js.map +1 -1
- package/esm/component/util.js +1 -2
- package/esm/constant/base.js +2 -1
- package/esm/constant/scroll-bar.js +1 -2
- package/esm/constant/word-cloud.js +2 -1
- package/esm/core/index.js +1 -1
- package/esm/core/instance-manager.js +1 -1
- package/esm/core/interface.js +1 -1
- package/esm/core/util.js +1 -1
- package/esm/core/vchart.js +1 -1
- package/esm/data/initialize.js +1 -1
- package/esm/data/register.js +1 -1
- package/package.json +4 -4
package/build/index.es.js
CHANGED
|
@@ -66087,9 +66087,7 @@ function getDatumByValue(data, value, startField, endField) {
|
|
|
66087
66087
|
if (record) {
|
|
66088
66088
|
const startValue = record[startField];
|
|
66089
66089
|
const endValue = record[endField || startField];
|
|
66090
|
-
|
|
66091
|
-
const max = Math.max(startValue, endValue);
|
|
66092
|
-
if (min <= value && max >= value) {
|
|
66090
|
+
if (startValue <= value && endValue >= value) {
|
|
66093
66091
|
return record;
|
|
66094
66092
|
}
|
|
66095
66093
|
}
|
|
@@ -71860,17 +71858,15 @@ const layoutByValue$1 = (stateByField, series, layoutStartPoint, enableRemain =
|
|
|
71860
71858
|
const field2 = field === 'xField' ? series.fieldX2 : series.fieldY2;
|
|
71861
71859
|
const datum = getDatumByValue(series.getViewData().latestData, +value, field1, field2);
|
|
71862
71860
|
if (datum) {
|
|
71863
|
-
const
|
|
71861
|
+
const startX = field === 'xField' ? series.dataToPositionX(datum) : series.dataToPositionY(datum);
|
|
71864
71862
|
if (field2) {
|
|
71865
|
-
|
|
71866
|
-
bandSize = Math.abs(posStart - posEnd);
|
|
71867
|
-
coord = Math.min(posStart, posEnd);
|
|
71863
|
+
bandSize = Math.abs(startX - (field === 'xField' ? series.dataToPositionX1(datum) : series.dataToPositionY1(datum)));
|
|
71868
71864
|
value = `${datum[field1]} ~ ${datum[field2]}`;
|
|
71869
71865
|
}
|
|
71870
71866
|
else {
|
|
71871
71867
|
bandSize = 1;
|
|
71872
|
-
coord = posStart;
|
|
71873
71868
|
}
|
|
71869
|
+
coord = startX;
|
|
71874
71870
|
}
|
|
71875
71871
|
niceLabelFormatter = axis.niceLabelFormatter;
|
|
71876
71872
|
}
|
|
@@ -95607,6 +95603,7 @@ class BaseLegend extends BaseComponent {
|
|
|
95607
95603
|
}
|
|
95608
95604
|
clear() {
|
|
95609
95605
|
super.clear();
|
|
95606
|
+
this._legendComponent = null;
|
|
95610
95607
|
this._cacheAttrs = null;
|
|
95611
95608
|
this._preSelectedData = null;
|
|
95612
95609
|
}
|
package/build/index.js
CHANGED
|
@@ -66093,9 +66093,7 @@
|
|
|
66093
66093
|
if (record) {
|
|
66094
66094
|
const startValue = record[startField];
|
|
66095
66095
|
const endValue = record[endField || startField];
|
|
66096
|
-
|
|
66097
|
-
const max = Math.max(startValue, endValue);
|
|
66098
|
-
if (min <= value && max >= value) {
|
|
66096
|
+
if (startValue <= value && endValue >= value) {
|
|
66099
66097
|
return record;
|
|
66100
66098
|
}
|
|
66101
66099
|
}
|
|
@@ -71866,17 +71864,15 @@
|
|
|
71866
71864
|
const field2 = field === 'xField' ? series.fieldX2 : series.fieldY2;
|
|
71867
71865
|
const datum = getDatumByValue(series.getViewData().latestData, +value, field1, field2);
|
|
71868
71866
|
if (datum) {
|
|
71869
|
-
const
|
|
71867
|
+
const startX = field === 'xField' ? series.dataToPositionX(datum) : series.dataToPositionY(datum);
|
|
71870
71868
|
if (field2) {
|
|
71871
|
-
|
|
71872
|
-
bandSize = Math.abs(posStart - posEnd);
|
|
71873
|
-
coord = Math.min(posStart, posEnd);
|
|
71869
|
+
bandSize = Math.abs(startX - (field === 'xField' ? series.dataToPositionX1(datum) : series.dataToPositionY1(datum)));
|
|
71874
71870
|
value = `${datum[field1]} ~ ${datum[field2]}`;
|
|
71875
71871
|
}
|
|
71876
71872
|
else {
|
|
71877
71873
|
bandSize = 1;
|
|
71878
|
-
coord = posStart;
|
|
71879
71874
|
}
|
|
71875
|
+
coord = startX;
|
|
71880
71876
|
}
|
|
71881
71877
|
niceLabelFormatter = axis.niceLabelFormatter;
|
|
71882
71878
|
}
|
|
@@ -95613,6 +95609,7 @@
|
|
|
95613
95609
|
}
|
|
95614
95610
|
clear() {
|
|
95615
95611
|
super.clear();
|
|
95612
|
+
this._legendComponent = null;
|
|
95616
95613
|
this._cacheAttrs = null;
|
|
95617
95614
|
this._preSelectedData = null;
|
|
95618
95615
|
}
|