diff --git a/src/axis.js b/src/axis.js
index 1665d363e7..971b0db514 100644
--- a/src/axis.js
+++ b/src/axis.js
@@ -1,5 +1,4 @@
import {axisTop, axisBottom, axisRight, axisLeft} from "d3";
-import {interpolateRound} from "d3";
import {create} from "d3";
export class AxisX {
@@ -60,7 +59,7 @@ export class AxisX {
const ty = offsetSign * offset + (axis === "top" ? marginTop : height - marginBottom);
return create("svg:g")
.attr("transform", `translate(0,${ty})`)
- .call((axis === "top" ? axisTop : axisBottom)(round(x))
+ .call((axis === "top" ? axisTop : axisBottom)(x)
.ticks(Array.isArray(ticks) ? null : ticks, typeof tickFormat === "function" ? null : tickFormat)
.tickFormat(typeof tickFormat === "function" || !x.tickFormat ? tickFormat : null)
.tickSizeInner(tickSize)
@@ -145,7 +144,7 @@ export class AxisY {
const tx = offsetSign * offset + (axis === "right" ? width - marginRight : marginLeft);
return create("svg:g")
.attr("transform", `translate(${tx},0)`)
- .call((axis === "right" ? axisRight : axisLeft)(round(y))
+ .call((axis === "right" ? axisRight : axisLeft)(y)
.ticks(Array.isArray(ticks) ? null : ticks, typeof tickFormat === "function" ? null : tickFormat)
.tickFormat(typeof tickFormat === "function" || !y.tickFormat ? tickFormat : null)
.tickSizeInner(tickSize)
@@ -176,12 +175,6 @@ export class AxisY {
}
}
-function round(scale) {
- return scale.interpolate // TODO round band and point scales?
- ? scale.copy().interpolate(interpolateRound)
- : scale;
-}
-
function gridX(y2) {
return g => g.selectAll(".tick line")
.clone(true)
diff --git a/src/marks/rule.js b/src/marks/rule.js
index e49fe87d31..f8f13f22af 100644
--- a/src/marks/rule.js
+++ b/src/marks/rule.js
@@ -47,8 +47,8 @@ export class RuleX extends Mark {
.data(index)
.join("line")
.call(applyDirectStyles, this)
- .attr("x1", X ? i => Math.round(X[i]) : (marginLeft + width - marginRight) / 2)
- .attr("x2", X ? i => Math.round(X[i]) : (marginLeft + width - marginRight) / 2)
+ .attr("x1", X ? i => X[i] : (marginLeft + width - marginRight) / 2)
+ .attr("x2", X ? i => X[i] : (marginLeft + width - marginRight) / 2)
.attr("y1", Y1 ? i => Y1[i] : marginTop)
.attr("y2", Y2 ? (y.bandwidth ? i => Y2[i] + y.bandwidth() : i => Y2[i]) : height - marginBottom)
.attr("stroke", S && (i => S[i]))
@@ -102,8 +102,8 @@ export class RuleY extends Mark {
.call(applyDirectStyles, this)
.attr("x1", X1 ? i => X1[i] : marginLeft)
.attr("x2", X2 ? (x.bandwidth ? i => X2[i] + x.bandwidth() : i => X2[i]) : width - marginRight)
- .attr("y1", Y ? i => Math.round(Y[i]) : (marginTop + height - marginBottom) / 2)
- .attr("y2", Y ? i => Math.round(Y[i]) : (marginTop + height - marginBottom) / 2)
+ .attr("y1", Y ? i => Y[i] : (marginTop + height - marginBottom) / 2)
+ .attr("y2", Y ? i => Y[i] : (marginTop + height - marginBottom) / 2)
.attr("stroke", S && (i => S[i]))
.call(title(L)))
.node();
diff --git a/src/marks/tick.js b/src/marks/tick.js
index 7f0e2cad46..bb5976ffce 100644
--- a/src/marks/tick.js
+++ b/src/marks/tick.js
@@ -64,10 +64,10 @@ export class TickX extends AbstractTick {
selection.call(applyTransform, x, null, 0.5, 0);
}
_x1(scales, {x: X}) {
- return i => Math.round(X[i]);
+ return i => X[i];
}
_x2(scales, {x: X}) {
- return i => Math.round(X[i]);
+ return i => X[i];
}
_y1(scales, {y: Y}, {marginTop}) {
return Y ? i => Y[i] : marginTop;
@@ -98,10 +98,10 @@ export class TickY extends AbstractTick {
return X ? i => X[i] + x.bandwidth() : width - marginRight;
}
_y1(scales, {y: Y}) {
- return i => Math.round(Y[i]);
+ return i => Y[i];
}
_y2(scales, {y: Y}) {
- return i => Math.round(Y[i]);
+ return i => Y[i];
}
}
diff --git a/test/output/aaplCandlestick.svg b/test/output/aaplCandlestick.svg
index 9a03822975..e3f094b21e 100644
--- a/test/output/aaplCandlestick.svg
+++ b/test/output/aaplCandlestick.svg
@@ -1,306 +1,306 @@
\ No newline at end of file
diff --git a/test/output/aaplChangeVolume.svg b/test/output/aaplChangeVolume.svg
index 2daafe3bd2..fd2d702fc3 100644
--- a/test/output/aaplChangeVolume.svg
+++ b/test/output/aaplChangeVolume.svg
@@ -1,98 +1,98 @@