merging previous commits

master-patched
Bob Monteverde 12 years ago
commit 353f4354fd

@ -29,7 +29,7 @@ var chart = nv.models.bullet()
data = [
{"title":"Revenue","subtitle":"US$, in thousands","ranges":[150,225,300],"measures":[220],"markers":[250]}
{"title":"Revenue","subtitle":"US$, in thousands","ranges":[-150,-225,-300],"measures":[-220],"markers":[-250]}
/*
//TODO: fix the tooltip offset if multiple
,

@ -1066,7 +1066,7 @@ nv.models.bullet = function() {
// Compute the new x-scale.
var x1 = d3.scale.linear()
.domain([0, Math.max(rangez[0], markerz[0], measurez[0])]) // TODO: need to allow forceX and forceY, and xDomain, yDomain
.domain( d3.extent(d3.merge([forceX, rangez])) ) // TODO: need to allow forceX and forceY, and xDomain, yDomain
.range(reverse ? [availableWidth, 0] : [0, availableWidth]);
// Retrieve the old x-scale, if this is an update.
@ -1184,7 +1184,7 @@ nv.models.bullet = function() {
});
d3.transition(marker)
.attr('transform', function(d) { return 'translate(' + x1(d) + ',' + (availableHeight / 2) + ')' });
.attr('transform', function(d) { return 'translate(' + (x1(d) - x1(0)) + ',' + (availableHeight / 2) + ')' });
marker.exit().remove();

6
nv.d3.min.js vendored

File diff suppressed because one or more lines are too long

@ -42,7 +42,7 @@ nv.models.bullet = function() {
// Compute the new x-scale.
var x1 = d3.scale.linear()
.domain([0, Math.max(rangez[0], markerz[0], measurez[0])]) // TODO: need to allow forceX and forceY, and xDomain, yDomain
.domain( d3.extent(d3.merge([forceX, rangez])) ) // TODO: need to allow forceX and forceY, and xDomain, yDomain
.range(reverse ? [availableWidth, 0] : [0, availableWidth]);
// Retrieve the old x-scale, if this is an update.
@ -160,7 +160,7 @@ nv.models.bullet = function() {
});
d3.transition(marker)
.attr('transform', function(d) { return 'translate(' + x1(d) + ',' + (availableHeight / 2) + ')' });
.attr('transform', function(d) { return 'translate(' + (x1(d) - x1(0)) + ',' + (availableHeight / 2) + ')' });
marker.exit().remove();

Loading…
Cancel
Save