Skip to content

Commit 03ebbbc

Browse files
committed
Clip imaginary axis grid lines to correct angular bounds
1 parent 1e748cc commit 03ebbbc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/plots/smith/smith.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,11 @@ proto.updateAngularAxis = function(fullLayout, polarLayout) {
695695
var value = d.x;
696696
var radius = _this.radius / d.x;
697697

698-
return Lib.pathArc(Math.abs(radius), Math.PI / 2.0, 3.0 * Math.PI / 2.0, cx + _this.radius, cy - radius);
698+
var arc = 2.0 * Math.atan(Math.abs(d.x));
699+
var startAngle = value > 0.0 ? 1.5 * Math.PI - arc : Math.PI / 2.0;
700+
var endAngle = value > 0.0 ? 1.5 * Math.PI : Math.PI / 2.0 + arc;
701+
702+
return Lib.pathArc(Math.abs(radius), startAngle, endAngle, cx + _this.radius, cy - radius);
699703
};
700704

701705
var out = Axes.makeLabelFns(ax, 0);

0 commit comments

Comments
 (0)