diff --git a/packages/core/src/components/axes/axis.ts b/packages/core/src/components/axes/axis.ts index f88909e0c6..e137612a28 100644 --- a/packages/core/src/components/axes/axis.ts +++ b/packages/core/src/components/axes/axis.ts @@ -209,16 +209,23 @@ export class Axis extends Component { "timeScale", "addSpaceOnEdges" ); + + const customDomain = Tools.getProperty( + options, + "axes", + axisPosition, + "domain" + ); let tickValues; - if (addSpaceOnEdges) { + if (addSpaceOnEdges && !customDomain) { tickValues = scale.nice(numberOfTicks); } tickValues = scale.ticks(numberOfTicks); // Remove labels on the edges // If there are more than 2 labels to show - if (addSpaceOnEdges && tickValues.length > 2) { + if (addSpaceOnEdges && tickValues.length > 2 && !customDomain) { tickValues.splice(tickValues.length - 1, 1); tickValues.splice(0, 1); }