allowing the bullet chart to hide the previous data point if the value is null
This commit is contained in:
parent
38ba70f4dc
commit
cdb68dafca
4
nv.d3.js
4
nv.d3.js
@ -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
10
nv.d3.min.js
vendored
File diff suppressed because one or more lines are too long
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user