Skip to content

Commit 3b9028a

Browse files
committed
fix bullet with range spanning negative values
1 parent cb5d3c4 commit 3b9028a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/traces/indicator/plot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ function drawBulletGauge(gd, plotGroup, cd, gaugeOpts) {
282282

283283
function drawRect(s) {
284284
s
285-
.attr('width', function(d) { return Math.max(0, ax.c2p(d.range[1] - d.range[0]));})
285+
.attr('width', function(d) { return Math.max(0, ax.c2p(d.range[1]) - ax.c2p(d.range[0]));})
286286
.attr('x', function(d) { return ax.c2p(d.range[0]);})
287287
.attr('y', function(d) { return 0.5 * (1 - d.thickness) * bulletHeight;})
288288
.attr('height', function(d) { return d.thickness * bulletHeight; });

0 commit comments

Comments
 (0)