Skip to content

Commit

Permalink
Merge pull request #5430 from plotly/fix-5428
Browse files Browse the repository at this point in the history
Fixes indicator traces with a threshold equal to 0
  • Loading branch information
antoinerg authored Jan 21, 2021
2 parents f852131 + 440075d commit e53a3f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/traces/indicator/plot.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ function drawBulletGauge(gd, plotGroup, cd, opts) {
}
fgBullet.exit().remove();

var data = cd.filter(function() {return trace.gauge.threshold.value;});
var data = cd.filter(function() {return trace.gauge.threshold.value || trace.gauge.threshold.value === 0;});
var threshold = bullet.selectAll('g.threshold-bullet').data(data);
threshold.enter().append('g').classed('threshold-bullet', true).append('line');
threshold.select('line')
Expand Down Expand Up @@ -497,7 +497,7 @@ function drawAngularGauge(gd, plotGroup, cd, opts) {
// Draw threshold
arcs = [];
var v = trace.gauge.threshold.value;
if(v) {
if(v || v === 0) {
arcs.push({
range: [v, v],
color: trace.gauge.threshold.color,
Expand Down

0 comments on commit e53a3f6

Please sign in to comment.