mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-13 00:45:13 +02:00
Fixed problems with show data contextual in graphs. Tiquet: #3057
This commit is contained in:
parent
786d36ef79
commit
2b294df108
@ -467,8 +467,8 @@ var previousPoint = null, previousLabel = null;
|
|||||||
$.fn.HUseTooltip = function () {
|
$.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.dataIndex)) {
|
if ((previousLabel != item.series.label) || (previousPoint != item.seriesIndex)) {
|
||||||
previousPoint = item.dataIndex;
|
previousPoint = item.seriesIndex;
|
||||||
previousLabel = item.series.label;
|
previousLabel = item.series.label;
|
||||||
$("#tooltip").remove();
|
$("#tooltip").remove();
|
||||||
|
|
||||||
@ -480,7 +480,7 @@ $.fn.HUseTooltip = function () {
|
|||||||
showTooltip(item.pageX,
|
showTooltip(item.pageX,
|
||||||
item.pageY,
|
item.pageY,
|
||||||
color,
|
color,
|
||||||
"<strong>" + item.series.yaxis.ticks[y].label + "</strong>: <strong>" + x + "</strong>");
|
"<strong>" + item.series.yaxis.ticks[y].label + "</strong>: <strong>" + x + "</strong>");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$("#tooltip").remove();
|
$("#tooltip").remove();
|
||||||
@ -491,8 +491,8 @@ $.fn.HUseTooltip = function () {
|
|||||||
$.fn.VUseTooltip = function () {
|
$.fn.VUseTooltip = 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.dataIndex)) {
|
if ((previousLabel != item.series.label) || (previousPoint != item.seriesIndex)) {
|
||||||
previousPoint = item.dataIndex;
|
previousPoint = item.seriesIndex;
|
||||||
previousLabel = item.series.label;
|
previousLabel = item.series.label;
|
||||||
$("#tooltip").remove();
|
$("#tooltip").remove();
|
||||||
|
|
||||||
@ -504,7 +504,7 @@ $.fn.VUseTooltip = function () {
|
|||||||
showTooltip(item.pageX,
|
showTooltip(item.pageX,
|
||||||
item.pageY,
|
item.pageY,
|
||||||
color,
|
color,
|
||||||
"<strong>" + item.series.xaxis.ticks[x].label + "</strong>" + " : <strong>" + y + "</strong>");
|
"<strong>" + item.series.xaxis.ticks[x].label + "</strong>" + " : <strong>" + y + "</strong>");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$("#tooltip").remove();
|
$("#tooltip").remove();
|
||||||
@ -600,7 +600,7 @@ function pandoraFlotVBars(graph_id, values, labels, labels_long, legend, colors,
|
|||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
hoverable: true,
|
hoverable: true,
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
backgroundColor: { colors: ["#FFF", "#FFF"] }
|
backgroundColor: { colors: ["#FFF", "#FFF"] }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user