displaying the time in rawdata visualization (solved)
Submitted by Guest on Thu, 28/04/2016 - 18:57
We modified two lines in visualization rawdata to display the value AND THE TIME, when the mouse is positioned over a data point.
Eduardo
UFPR/Brazil
----------------
# displaytime.patch
# Modification to Raw-Visualization to display the time when the mouse pointer is over one data point
# Apply this patch to Modules/vis/visualisations/rawdata.php
# $ patch Modules/vis/visualisations/rawdata.php displaytime.patch
# Modified on Emoncms version 9 RC | 2015.09.03, should also work on more recent versions
# 2015 by Evandro Copercini and Eduardo Parente, Federal University of Parana (UFPR), Brazil
--- rawdata_original.php 2015-10-15 10:37:40.000000000 -0300
+++ rawdata.php 2015-09-19 12:09:58.000000000 -0300
@@ -138,10 +138,11 @@
$("#tooltip").remove();
var itemTime = item.datapoint[0];
var itemVal = item.datapoint[1];
+ var itemTime2 = (new Date(item.datapoint[0])).format("dd/mm/yy HH:MM:ss");
// I'd like to eventually add colour hinting to the background of the tooltop.
// This is why showTooltip has the bgColour parameter.
- tooltip(item.pageX, item.pageY, itemVal.toFixed(dp) + " " + units, "#DDDDDD");
+ tooltip(item.pageX, item.pageY, itemVal.toFixed(dp) + " " + units + "<br>" + itemTime2, "#DDDDDD");
}
}
else
displaying the time in rawdata visualization (solved)
Submitted by Guest on Thu, 28/04/2016 - 18:57We modified two lines in visualization rawdata to display the value AND THE TIME, when the mouse is positioned over a data point.
Eduardo
UFPR/Brazil
----------------
# displaytime.patch
# Modification to Raw-Visualization to display the time when the mouse pointer is over one data point
# Apply this patch to Modules/vis/visualisations/rawdata.php
# $ patch Modules/vis/visualisations/rawdata.php displaytime.patch
# Modified on Emoncms version 9 RC | 2015.09.03, should also work on more recent versions
# 2015 by Evandro Copercini and Eduardo Parente, Federal University of Parana (UFPR), Brazil
--- rawdata_original.php 2015-10-15 10:37:40.000000000 -0300
+++ rawdata.php 2015-09-19 12:09:58.000000000 -0300
@@ -138,10 +138,11 @@
$("#tooltip").remove();
var itemTime = item.datapoint[0];
var itemVal = item.datapoint[1];
+ var itemTime2 = (new Date(item.datapoint[0])).format("dd/mm/yy HH:MM:ss");
// I'd like to eventually add colour hinting to the background of the tooltop.
// This is why showTooltip has the bgColour parameter.
- tooltip(item.pageX, item.pageY, itemVal.toFixed(dp) + " " + units, "#DDDDDD");
+ tooltip(item.pageX, item.pageY, itemVal.toFixed(dp) + " " + units + "<br>" + itemTime2, "#DDDDDD");
}
}
else
------------------------