From 77ef25280e71d31ead013097da9240d24f8c5b95 Mon Sep 17 00:00:00 2001 From: Ovilia Date: Mon, 3 Apr 2023 18:18:16 +0800 Subject: [PATCH] fix(axis): show last tick for single data #18453 --- src/coord/Axis.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coord/Axis.ts b/src/coord/Axis.ts index a71051507c..5a33a33973 100644 --- a/src/coord/Axis.ts +++ b/src/coord/Axis.ts @@ -302,7 +302,7 @@ function fixOnBandTicksCoords( let diffSize; if (ticksLen === 1) { ticksCoords[0].coord = axisExtent[0]; - last = ticksCoords[1] = {coord: axisExtent[0]}; + last = ticksCoords[1] = {coord: axisExtent[1]}; } else { const crossLen = ticksCoords[ticksLen - 1].tickValue - ticksCoords[0].tickValue;