Author: croberts
Date: 2011-12-06 20:24:23 +0000 (Tue, 06 Dec 2011)
New Revision: 5164
Modified:
branches/noflash/cumin/resources/app.js
Log:
Cleaning up the display of the charts by 1) Changing the date formatting on the tooltips
(shorter date/time display) and 2) Tweaking some of the options on cursor to remove the
cursor tracking "legend" and providing explicit values for some of the visual
elements on the moused-over data points.
Modified: branches/noflash/cumin/resources/app.js
===================================================================
--- branches/noflash/cumin/resources/app.js 2011-12-06 18:13:50 UTC (rev 5163)
+++ branches/noflash/cumin/resources/app.js 2011-12-06 20:24:23 UTC (rev 5164)
@@ -639,13 +639,22 @@
},
},
highlighter: {
+ sizeAdjust: 6,
+ lineWidthAdjust: 2.5,
+ showTooltip:true,
+ fadeTooltip:true,
+ tooltipOffset: 2,
+ tooltipSeparator: ",",
tooltipaxes:'xy',
useAxesFormatters:true,
show: true,
formatString:'<table
class="jqplot-highlighter"><tr><td>Time:</td><td>%s</td></tr><tr><td>Value:</td><td>%s</td></tr></table>'
},
- cursor:{show:true,
+ cursor:{
+ style:"pointer",
+ show:true,
zoom:true,
+ showTooltip:false, // this is for the tooltip that gives the location of the cursor
whether on a point or not
looseZoom:true,
showCursorLegend:false,
constrainZoomTo: 'x'
@@ -687,10 +696,11 @@
// when called to render a popup tooltip, the caller is named "g"...not
sure why. Whattup, g?
if(arguments.callee.caller.getName() == 'g') {
var tempTime = allCharts['chartNowTime'].clone();
+ timeFormat = "%b %e, %T";
if(format.search(/min/) > -1) {
- return (tempTime.increment('minute', val));
+ return (tempTime.increment('minute', val).format(timeFormat));
} else {
- return (tempTime.increment('hour', val));
+ return (tempTime.increment('hour', val).format(timeFormat));
}
}
return ($j.jqplot.sprintf(format, val)).replace(/-/,""); // hack to
prevent negative axis labels, which we don't have
Show replies by date