<%@LANGUAGE=javascript%> <% if ( Session("Authenticated") != "Yes" ) Response.Redirect("privacy/authentication.asp?../DBGPortal_Main.asp?" + Request.QueryString() ) //this is the number of milliseconds in a day var dayVal = 86400000 var BucketID = Request.QueryString("BucketID") var g_DBConn = GetDBConnection ( Application("CRASHDB3") ) var length = new String( Request.QueryString("Length" ) ) var interval = new String( Request.QueryString("Interval" ) ) var range = new String( Request.QueryString("range") ) var startOffset = 2 //number of days from present to go back to start the chart //var RemoveZero = new String( Request.QueryString( "chkRemoveZero" ) ) if ( length.toString() == "undefined" ) length = 30 if ( interval.toString() == "undefined" ) interval = 3 if ( range.toString() == "undefined" ) range = 1 //if ( RemoveZero.toString() == "undefined" ) //RemoveZero = false //else //RemoveZero = true //Need to prime the date value so that it doesn't use today's date, it will skew the data var endDate = new Date() endDate = new Date( endDate.valueOf() - (startOffset*dayVal) ) var chartValues = "" var chartDate = "" for ( var i=0 ; i< length ; i++ ) { endDate = endDate.valueOf() startDate = endDate - (dayVal*(range-1)) endDate = new Date( endDate ) startDate = new Date( startDate ) nextDate = endDate - ( dayVal*interval ) endDate = (endDate.getMonth()+1) + "-" + (endDate.getDate()) + "-" + endDate.getYear() startDate = (startDate.getMonth()+1) + "-" + (startDate.getDate()) + "-" + startDate.getYear() //endDate = endDate //startDate = startDate + " 00:00:00.001" //Response.Write(" nextdate: " + nextDate + "
" ) var Query = "DBGPortal_GetCrashCountByDate '" + startDate + " 00:00:00.001" + "','" + endDate + " 23:59:59.999" + "','" + BucketID + "'" //Response.Write( Query + "
" ) //continue var rsBuckets = g_DBConn.Execute( Query ) var count = new String( rsBuckets("CrashCount") ) //if( !(count.toString() == "0") ) { var endDate = new Date( endDate ) var startDate = new Date( startDate ) var chartValues = rsBuckets("CrashCount") + "\t" + chartValues //Response.Write(" Number: " + rsBuckets("CrashCount") + "
" ) if ( range > 1 ) chartDate = (endDate.getMonth()+1)+ "/" + endDate.getDate() + "-" + (startDate.getMonth()+1) + "/" + startDate.getDate() + '\t' + chartDate else chartDate = (endDate.getMonth()+1)+ "/" + endDate.getDate() + '\t' + chartDate } var endDate = new Date( nextDate ) } //Response.Write( Request.QueryString() ) //Response.Write("chart: " + chartDate + "
" ) //Response.Write("vals: " + chartValues + "
" ) %>

Crash Histogram

Select how many data points that you want to sample. This will determine how many columns will appear on the chart.

Select how many days you would like in between each data sample.

Select how many days you want to sample per data point. For example, a value of 3 would sum the total number of crashes over a three day period.

Currently displaying a total of <%=length%> days data, over <%=range%> day(s) with <%=interval%> day(s) between each sample.

Warning: Could not build chart

In order to display the crash histrogram, you must download the Office Web Components.