|
From: <j-...@us...> - 2012-09-27 18:07:38
|
Revision: 1021
http://openautomation.svn.sourceforge.net/openautomation/?rev=1021&view=rev
Author: j-n-k
Date: 2012-09-27 18:07:29 +0000 (Thu, 27 Sep 2012)
Log Message:
-----------
Fixed "undefined" in diagram tooltip (axis-unit is displayed)
Modified Paths:
--------------
CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
Modified: CometVisu/trunk/visu/plugins/diagram/structure_plugin.js
===================================================================
--- CometVisu/trunk/visu/plugins/diagram/structure_plugin.js 2012-09-27 08:56:47 UTC (rev 1020)
+++ CometVisu/trunk/visu/plugins/diagram/structure_plugin.js 2012-09-27 18:07:29 UTC (rev 1021)
@@ -72,7 +72,7 @@
var unit = this.getAttribute('unit') || "";
axes[ axesnum ] = { axisLabel:this.getAttribute('label') || null, position: this.getAttribute('position') || "left",
min: this.getAttribute('min') || null, max: this.getAttribute('max') || null,
- tickFormatter: function (v, axis) { return v.toFixed(axis.tickDecimals)+unit; }
+ unit: unit, tickFormatter: function (v, axis) { return v.toFixed(axis.tickDecimals)+unit; }
};
axesnames ['_'+name] = axesnum+1;
axesnum ++;
@@ -176,7 +176,7 @@
var offset = new Date().getTimezoneOffset() * 60 * 1000;
var dte = new Date(x + offset);
showDiagramTooltip(item.pageX, item.pageY,
- dte.toLocaleString() + ": " + y + jQuery(this).data("unit"));
+ dte.toLocaleString() + ": " + y + item.series.yaxis.options.unit);
}
} else {
$("#diagramTooltip").remove();
@@ -384,7 +384,7 @@
var offset = new Date().getTimezoneOffset() * 60 * 1000;
var dte = new Date(x + offset);
showDiagramTooltip(item.pageX, item.pageY,
- dte.toLocaleString() + ": " + y + jQuery(this).data("unit"));
+ dte.toLocaleString() + ": " + y + item.series.yaxis.options.unit);
}
} else {
$("#diagramTooltip").remove();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|