Skip to content

Commit

Permalink
Removed unnecessary div
Browse files Browse the repository at this point in the history
  • Loading branch information
Jairus Martin committed Feb 12, 2014
1 parent 2961864 commit 7a740ee
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions xadmin/static/xadmin/js/xadmin.plugin.charts.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$(document).ready(function(){

function showTooltip(x, y, contents) {
$('<div id="chart-tooltip" class="tooltip-inner"><div>' + contents + '</div></div>').css( {
$('<div id="chart-tooltip" class="tooltip-inner">' + contents + '</div>').css( {
position: 'absolute',
display: 'none',
top: y + 5,
Expand All @@ -24,7 +24,7 @@ $(document).ready(function(){
if (item) {
if (previousPoint != item.dataIndex) {
previousPoint = item.dataIndex;

$("#chart-tooltip").remove();
var x = item.series.xaxis.tickFormatter(item.datapoint[0], item.series.xaxis),
y = item.series.yaxis.tickFormatter(item.datapoint[1], item.series.yaxis);
Expand All @@ -35,11 +35,11 @@ $(document).ready(function(){
y = item.series.data[item.dataIndex][1];
}
showTooltip(item.pageX, item.pageY,
item.series.label + " : <br/>(" + x + " , " + y+")");
item.series.label + " :<br/>(" + x + " , " + y+")");
}
} else {
$("#chart-tooltip").remove();
previousPoint = null;
previousPoint = null;
}
});
$chart.data('chart-obj', chart);
Expand Down

0 comments on commit 7a740ee

Please sign in to comment.