Merging from repo

master-patched
Bob Monteverde 12 years ago
commit c09abc9cfb

@ -56,7 +56,7 @@ historicalBarChart = [
values: [
{
"label" : "A" ,
"value" : -29.765957771107
"value" : 29.765957771107
} ,
{
"label" : "B" ,
@ -76,15 +76,15 @@ historicalBarChart = [
} ,
{
"label" : "F" ,
"value" : -98.079782601442
"value" : 98.079782601442
} ,
{
"label" : "G" ,
"value" : -13.925743130903
"value" : 13.925743130903
} ,
{
"label" : "H" ,
"value" : -5.1387322875705
"value" : 5.1387322875705
}
]
}

@ -148,6 +148,7 @@ d3.time.monthEnds = d3_time_range(d3.time.monthEnd, function(date) {
left, top;
windowHeight = window.innerWidth >= document.body.scrollWidth ? windowHeight : windowHeight - 16;
windowWidth = window.innerHeight >= document.body.scrollHeight ? windowWidth : windowWidth - 16;
var tooltipTop = function ( Elem ) {
var offsetTop = top;
@ -192,7 +193,7 @@ d3.time.monthEnds = d3_time_range(d3.time.monthEnd, function(date) {
var tLeft = tooltipLeft(container);
var tTop = tooltipTop(container);
if (tLeft < scrollLeft) left = scrollLeft + 5;
if (tLeft + width > windowWidth) left = parseInt(body.offsetWidth) - width - 5;
if (tLeft + width > windowWidth) left = left - width/2 + 5;
if (tTop + height > scrollTop + windowHeight) top = scrollTop + windowHeight - tTop + top - height;
break;
case 's':
@ -201,7 +202,7 @@ d3.time.monthEnds = d3_time_range(d3.time.monthEnd, function(date) {
var tLeft = tooltipLeft(container);
var tTop = tooltipTop(container);
if (tLeft < scrollLeft) left = scrollLeft + 5;
if (tLeft + width > windowWidth) left = parseInt(body.offsetWidth) - width - 5;
if (tLeft + width > windowWidth) left = left - width/2 + 5;
if (scrollTop > tTop) top = scrollTop;
break;
}
@ -2640,7 +2641,11 @@ nv.models.discreteBarChart = function() {
if (staggerLabels)
xTicks
.selectAll('text')
.attr('transform', function(d,i,j) { return 'translate(0,' + (j % 2 == 0 ? '0' : '12') + ')' })
.attr('transform', function(d,i,j) { return 'translate(0,' + (j % 2 == 0 ? '5' : '17') + ')' })
else
xTicks
.selectAll('text')
.attr('transform', 'translate(0,5)');
yAxis
.scale(y)

10
nv.d3.min.js vendored

File diff suppressed because one or more lines are too long

@ -169,7 +169,11 @@ nv.models.discreteBarChart = function() {
if (staggerLabels)
xTicks
.selectAll('text')
.attr('transform', function(d,i,j) { return 'translate(0,' + (j % 2 == 0 ? '0' : '12') + ')' })
.attr('transform', function(d,i,j) { return 'translate(0,' + (j % 2 == 0 ? '5' : '17') + ')' })
else
xTicks
.selectAll('text')
.attr('transform', 'translate(0,5)');
yAxis
.scale(y)

@ -34,6 +34,7 @@
left, top;
windowHeight = window.innerWidth >= document.body.scrollWidth ? windowHeight : windowHeight - 16;
windowWidth = window.innerHeight >= document.body.scrollHeight ? windowWidth : windowWidth - 16;
var tooltipTop = function ( Elem ) {
var offsetTop = top;
@ -78,7 +79,7 @@
var tLeft = tooltipLeft(container);
var tTop = tooltipTop(container);
if (tLeft < scrollLeft) left = scrollLeft + 5;
if (tLeft + width > windowWidth) left = parseInt(body.offsetWidth) - width - 5;
if (tLeft + width > windowWidth) left = left - width/2 + 5;
if (tTop + height > scrollTop + windowHeight) top = scrollTop + windowHeight - tTop + top - height;
break;
case 's':
@ -87,7 +88,7 @@
var tLeft = tooltipLeft(container);
var tTop = tooltipTop(container);
if (tLeft < scrollLeft) left = scrollLeft + 5;
if (tLeft + width > windowWidth) left = parseInt(body.offsetWidth) - width - 5;
if (tLeft + width > windowWidth) left = left - width/2 + 5;
if (scrollTop > tTop) top = scrollTop;
break;
}

Loading…
Cancel
Save