Professional Documents
Culture Documents
Graph Head1
Graph Head1
js"></script>
<script type="text/javascript">
<!--
var MILLIS_PER_DAY = (1000*60*60*24);
var margin = 1;
var barWidth = 2;
var maxNumFrames = 52;
var barMaxHeight = 30;
return barID;
}
barID = getBarID(eventTime);
if (barID >= 0) {
curNumEvents = curNumEvents + 1;
if (bars[barID] == null) {
bars[barID] = eventImportance;
} else {
// update only if importance is higher.
bars[barID] = Math.max(bars[barID], eventImportance);
}
// document.writeln('bars[' + barID + '] = ' + bars[barID]);
}
}
return {barsState: bars, curNumEvents: curNumEvents};
}
canvas.setColor("#00FC00"); // green
if (importance >= 80) {
canvas.setColor("#EEEE00"); // yellow
}
if (importance >= 95) {
canvas.setColor("#FF9900"); // oragne
}
if (importance == 101) {
canvas.setColor("#FC0000"); // red
}
canvas.setColor("#999999"); // grey
canvas.fillRect(xpos, ypos, width, barMaxHeight);
canvas.paint();
// alert(xpos + ' ' + ypos + ' ' + barWidth + ' ' + barHeight);
}
/*
if (!(highBar == -1)) {
var xpos = margin + ((maxNumFrames - highBar+1) * barWidth);
var ypos = margin;
var width = barWidth * (highBar-1);
canvas.setColor("#CCCCCC"); // grey
canvas.fillRect(xpos, ypos, width, barMaxHeight);
canvas.paint();
}
*/
}
function getParentTR(obj)
{
while( obj && obj.tagName != "TR" )
obj = obj.parentNode;
return obj;
}
function showTableRow(canvasName)
{
body=document.getElementById(canvasName);
row = getParentTR(body);
if (row) {
try {
row.style.display='table-row';
} catch(e) {
row.style.display = 'block';
}
}
}
function hideTableRow(canvasName)
{
body=document.getElementById(canvasName);
row = getParentTR(body);
if (row) {
if (row.style.display != 'none') {
row.style.display = 'none';
}
}
}
jg.setColor("#000000"); // black
jg.fillRect(0, 0, (2 * margin) + (barWidth * maxNumFrames), (2 *
margin) + barMaxHeight);
jg.paint();
if (empty) {
hideTableRow(canvasName);
} else {
showTableRow(canvasName);
}
// update the '# of events' cell with the number of events shown.
var pnum = document.getElementById('ne' + canvasName);
if (pnum) {
pnum.innerHTML = curNumEvents;
}
}
function DrawAllGraphs(ECsData)
{
var curCanvas;
for (var canvasName in ECsData) {
curCanvas = ECsData[canvasName];
createBarGraph(canvasName, curCanvas.events);
}
function redrawGraphs() {
// alert('initiating redraw');
DrawAllGraphs(ECsData);
}
function init()
{
var tmp;
resetTimeLimits();
// document.getElementById("scoreHeader").title="Score Key:\n" +
// document.getElementById("IBMSG_MelodyMessageLog").title="Score Key:\n" +
// "101: This message is very rare.\n" +
// "90-100: This message is quite rare, or it appeared an unusually large number
of times.\n" +
// "70-90: This message appears in this log file more than it usually appears.\n"
+
// "0-70: This message appears in this log file about the usual number of times.";
function resetTimeLimits()
{
var tmp;
tmp = new Date(maxDate);
updateLastToShow(tmp.getUTCFullYear(), tmp.getUTCMonth()+1,
tmp.getUTCDate(),true);
function updateFirstToShow(y,m,d,skipRedraw)
{
var newFirstMilli = Date.UTC(y,m-1,d);
firstToShow = newFirstToShow;
// DEBUG //
// document.forms[0].dateFrom.value = firstToShow;
if (!skipRedraw) {
redrawGraphs();
}
}
function updateLastToShow(y,m,d,skipRedraw)
{
var newLastMilli = Date.UTC(y,m-1,d);
// add 1 day to the last date to show, as we want to include all events
// in this day.
newLastToShow = ((maxDate - newLastMilli) / MILLIS_PER_DAY) - 1;
lastToShow = newLastToShow;
var lastMilliDate = new Date(newLastMilli);
document.forms[0].dateTo.value = formatDate(lastMilliDate, 'MM/dd/yyyy');
// DEBUG //
// document.forms[0].dateTo.value = lastToShow;
if (!skipRedraw) {
redrawGraphs();
}
}
window.onload = init;
-->
</script>
<style type="text/css">
#slider a img {
border: none;
}
#slider img.first{
float: left;
}
#sliderbg{
background-image: url(rail.gif);
background-position: center left;
background-repeat: repeat-x;
height: 10px;
width: 95px;
margin: 0 5px;
float: left;
}
#sliderthumb{
height: 12px;
width: 12px;
}
A.title {
color: white;
}
.graphCanvas {
position: relative;
height:32px;
width:106px;
}
</style>