allowing the bullet chart to hide the previous data point if the value is null

This commit is contained in:
Ricardo 2012-12-13 16:28:43 -05:00
parent 38ba70f4dc
commit cdb68dafca
3 changed files with 43 additions and 35 deletions

View File

@ -1193,6 +1193,7 @@ nv.models.bullet = function() {
})
var h3 = availableHeight / 6;
if (markerz[0]) {
g.selectAll('path.nv-markerTriangle')
.attr('transform', function(d) { return 'translate(' + x1(markerz[0]) + ',' + (availableHeight / 2) + ')' })
.attr('d', 'M0,' + h3 + 'L' + h3 + ',' + (-h3) + ' ' + (-h3) + ',' + (-h3) + 'Z')
@ -1209,6 +1210,9 @@ nv.models.bullet = function() {
label: 'Previous'
})
});
} else {
g.selectAll('path.nv-markerTriangle').remove();
}
wrap.selectAll('.nv-range')

10
nv.d3.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -153,6 +153,7 @@ nv.models.bullet = function() {
})
var h3 = availableHeight / 6;
if (markerz[0]) {
g.selectAll('path.nv-markerTriangle')
.attr('transform', function(d) { return 'translate(' + x1(markerz[0]) + ',' + (availableHeight / 2) + ')' })
.attr('d', 'M0,' + h3 + 'L' + h3 + ',' + (-h3) + ' ' + (-h3) + ',' + (-h3) + 'Z')
@ -169,6 +170,9 @@ nv.models.bullet = function() {
label: 'Previous'
})
});
} else {
g.selectAll('path.nv-markerTriangle').remove();
}
wrap.selectAll('.nv-range')