Skip to content

Commit 18ff220

Browse files
author
quao
committed
fix 通过构造传参改用unionExtentFromData避免使用私有方法_innerUnionExtent
1 parent d169591 commit 18ff220

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/coord/cartesian/Grid.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,10 @@ class Grid implements CoordinateSystemMaster {
572572
if (includeMarkerInExtent && value != null && typeof value !== 'string' && axisType !== 'category') {
573573
const val = axis.scale.parse(value);
574574
if (!isNaN(val)) {
575-
axis.scale._innerUnionExtent([val, val]);
575+
// Construct the parameter and use unionExtentFromData to avoid using the private method _innerUnionExtent
576+
axis.scale.unionExtentFromData({
577+
getApproximateExtent: () => [val, val]
578+
} as any, 0);
576579
}
577580
}
578581
}

0 commit comments

Comments
 (0)