Updated all nv.tooltip.show() calls to use the offsetElement as the parentElement

master-patched
Eric Rosenberg 12 years ago
parent a1a7d4fa4f
commit f0d60709a8

@ -33,7 +33,7 @@ nv.models.bulletChart = function() {
var content = '<h3>' + e.label + '</h3>' +
'<p>' + e.value + '</p>';
nv.tooltip.show([left, top], content, e.value < 0 ? 'e' : 'w');
nv.tooltip.show([left, top], content, e.value < 0 ? 'e' : 'w', null, offsetElement);
};

@ -48,7 +48,7 @@ nv.models.cumulativeLineChart = function() {
y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
content = tooltip(e.series.key, x, y, e, chart);
nv.tooltip.show([left, top], content);
nv.tooltip.show([left, top], content, null, null, offsetElement);
};

@ -32,7 +32,7 @@ nv.models.discreteBarChart = function() {
y = yAxis.tickFormat()(discretebar.y()(e.point, e.pointIndex)),
content = tooltip(e.series.key, x, y, e, chart);
nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's');
nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
};

@ -51,7 +51,7 @@ nv.models.lineChart = function() {
y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
content = tooltip(e.series.key, x, y, e, chart);
nv.tooltip.show([left, top], content);
nv.tooltip.show([left, top], content, null, null, offsetElement);
};

@ -34,7 +34,7 @@ nv.models.linePlusBarChart = function() {
y = (e.series.bar ? yAxis1 : yAxis2).tickFormat()(lines.y()(e.point, e.pointIndex)),
content = tooltip(e.series.key, x, y, e, chart);
nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's');
nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
};

@ -36,7 +36,7 @@ nv.models.lineChart = function() {
y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
content = tooltip(e.series.key, x, y, e, chart);
nv.tooltip.show([left, top], content);
nv.tooltip.show([left, top], content, null, null, offsetElement);
};

@ -38,7 +38,7 @@ nv.models.lineWithFocusChart = function() {
y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
content = tooltip(e.series.key, x, y, e, chart);
nv.tooltip.show([left, top], content);
nv.tooltip.show([left, top], content, null, null, offsetElement);
};

@ -44,7 +44,7 @@ nv.models.multiBarChart = function() {
y = yAxis.tickFormat()(multibar.y()(e.point, e.pointIndex)),
content = tooltip(e.series.key, x, y, e, chart);
nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's');
nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
};

@ -35,7 +35,7 @@ nv.models.multiBarHorizontalChart = function() {
y = yAxis.tickFormat()(multibar.y()(e.point, e.pointIndex)),
content = tooltip(e.series.key, x, y, e, chart);
nv.tooltip.show([left, top], content, e.value < 0 ? 'e' : 'w');
nv.tooltip.show([left, top], content, e.value < 0 ? 'e' : 'w', null, offsetElement);
};
//TODO: let user select default

@ -25,7 +25,7 @@ nv.models.pieChart = function() {
y = pie.valueFormat()(pie.y()(e.point)),
content = tooltip(pie.x()(e.point), y, e, chart);
nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's');
nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
};

@ -57,11 +57,11 @@ nv.models.scatterChart = function() {
yVal = yAxis.tickFormat()(scatter.y()(e.point, e.pointIndex));
if( tooltipX != null )
nv.tooltip.show([leftX, topX], tooltipX(e.series.key, xVal, yVal, e, chart), 'n', 1, null, 'x-nvtooltip');
nv.tooltip.show([leftX, topX], tooltipX(e.series.key, xVal, yVal, e, chart), 'n', 1, offsetElement, 'x-nvtooltip');
if( tooltipY != null )
nv.tooltip.show([leftY, topY], tooltipY(e.series.key, xVal, yVal, e, chart), 'e', 1, null, 'y-nvtooltip');
nv.tooltip.show([leftY, topY], tooltipY(e.series.key, xVal, yVal, e, chart), 'e', 1, offsetElement, 'y-nvtooltip');
if( tooltip != null )
nv.tooltip.show([left, top], tooltip(e.series.key, xVal, yVal, e, chart), e.value < 0 ? 'n' : 's');
nv.tooltip.show([left, top], tooltip(e.series.key, xVal, yVal, e, chart), e.value < 0 ? 'n' : 's', null, offsetElement);
};
var controlsData = [

@ -47,8 +47,8 @@ nv.models.scatterFisheyeChart = function() {
contentY = tooltipY(e.series.key, xVal, yVal, e, chart);
//content = tooltip(e.series.key, xVal, yVal, e, chart);
nv.tooltip.show([leftX, topX], contentX, 'n', 1);
nv.tooltip.show([leftY, topY], contentY, 'e', 1);
nv.tooltip.show([leftX, topX], contentX, 'n', 1, offsetElement);
nv.tooltip.show([leftY, topY], contentY, 'e', 1, offsetElement);
//nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's');
};

@ -48,7 +48,7 @@ nv.models.stackedAreaChart = function() {
y = yAxis.tickFormat()(stacked.y()(e.point, e.pointIndex)),
content = tooltip(e.series.key, x, y, e, chart);
nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's');
nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
};

Loading…
Cancel
Save