mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
Visual fixes on the horizontal bar graphs
This commit is contained in:
parent
74ab9a5fe9
commit
e16cb318a1
@ -468,7 +468,7 @@ function pandoraFlotHBars(graph_id, values, labels, water_mark,
|
|||||||
function yFormatter(v, axis) {
|
function yFormatter(v, axis) {
|
||||||
format = new Array();
|
format = new Array();
|
||||||
for (i = 0; i < labels_total.length; i++) {
|
for (i = 0; i < labels_total.length; i++) {
|
||||||
format.push([i,'<div style="visibility: hidden;" class="legend_'+i+'">'+labels_total[i][1]+'</div>']);
|
format.push([i,'<div class="legend_'+i+'">'+labels_total[i][1]+'</div>']);
|
||||||
}
|
}
|
||||||
return format;
|
return format;
|
||||||
}
|
}
|
||||||
@ -480,7 +480,6 @@ $.fn.HUseTooltip = function () {
|
|||||||
$(this).bind("plothover", function (event, pos, item) {
|
$(this).bind("plothover", function (event, pos, item) {
|
||||||
if (item) {
|
if (item) {
|
||||||
if ((previousLabel != item.series.label) || (previousPoint != item.seriesIndex)) {
|
if ((previousLabel != item.series.label) || (previousPoint != item.seriesIndex)) {
|
||||||
$('.legend_'+previousPoint).css("visibility","hidden");
|
|
||||||
previousPoint = item.seriesIndex;
|
previousPoint = item.seriesIndex;
|
||||||
previousLabel = item.series.label;
|
previousLabel = item.series.label;
|
||||||
$("#tooltip").remove();
|
$("#tooltip").remove();
|
||||||
@ -489,15 +488,13 @@ $.fn.HUseTooltip = function () {
|
|||||||
var y = item.datapoint[1];
|
var y = item.datapoint[1];
|
||||||
|
|
||||||
var color = item.series.color;
|
var color = item.series.color;
|
||||||
$('.legend_'+y).css("visibility","");
|
|
||||||
showTooltip(item.pageX,
|
showTooltip(item.pageX,
|
||||||
item.pageY,
|
item.pageY,
|
||||||
color,
|
color,
|
||||||
"<strong>" + $('.legend_'+x).text() + "</strong>: <strong>" + x + "</strong>");
|
"<strong>" + x + "</strong>");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$("#tooltip").remove();
|
$("#tooltip").remove();
|
||||||
$('.legend_'+previousPoint).css("visibility","hidden");
|
|
||||||
previousPoint = null;
|
previousPoint = null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user