From 4eecb6196a1cd7586f17b2180410b2f1fa91cfb6 Mon Sep 17 00:00:00 2001 From: Curran Kelleher Date: Thu, 30 Mar 2017 13:37:22 +0530 Subject: [PATCH] Straight line when tickSizeOuter === 0. Closes #32 --- src/axis.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/axis.js b/src/axis.js index 62ed0de..9297896 100644 --- a/src/axis.js +++ b/src/axis.js @@ -91,8 +91,8 @@ function axis(orient, scale) { path .attr("d", orient === left || orient == right - ? "M" + k * tickSizeOuter + "," + range0 + "H0.5V" + range1 + "H" + k * tickSizeOuter - : "M" + range0 + "," + k * tickSizeOuter + "V0.5H" + range1 + "V" + k * tickSizeOuter); + ? "M" + k * tickSizeOuter + "," + range0 + "H0.5V" + range1 + (tickSizeOuter ? "H" + k * tickSizeOuter : "") + : "M" + range0 + "," + k * tickSizeOuter + "V0.5H" + range1 + (tickSizeOuter ? "V" + k * tickSizeOuter : ""); tick .attr("opacity", 1)