Skip to content

Commit e53a3f6

Browse files
authored
Merge pull request #5430 from plotly/fix-5428
Fixes indicator traces with a threshold equal to 0
2 parents f852131 + 440075d commit e53a3f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/traces/indicator/plot.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ function drawBulletGauge(gd, plotGroup, cd, opts) {
324324
}
325325
fgBullet.exit().remove();
326326

327-
var data = cd.filter(function() {return trace.gauge.threshold.value;});
327+
var data = cd.filter(function() {return trace.gauge.threshold.value || trace.gauge.threshold.value === 0;});
328328
var threshold = bullet.selectAll('g.threshold-bullet').data(data);
329329
threshold.enter().append('g').classed('threshold-bullet', true).append('line');
330330
threshold.select('line')
@@ -497,7 +497,7 @@ function drawAngularGauge(gd, plotGroup, cd, opts) {
497497
// Draw threshold
498498
arcs = [];
499499
var v = trace.gauge.threshold.value;
500-
if(v) {
500+
if(v || v === 0) {
501501
arcs.push({
502502
range: [v, v],
503503
color: trace.gauge.threshold.color,

0 commit comments

Comments
 (0)