/******** to set display for chart **********/
document.getElementById("TableDataId").style.display = "";
/******** to display the scale **********/
var x = document.getElementById("ScaleId").insertRow(0);
var Xcell1 = x.insertCell(0);
var Xcell2 = x.insertCell(1);
var Xcell3 = x.insertCell(2);
var Xcell4 = x.insertCell(3);
var Xcell5 = x.insertCell(4);
var Xcell6 = x.insertCell(5);
var Xcell7 = x.insertCell(6);
Xcell1.align = "right";
Xcell2.align = "right";
Xcell3.align = "right";
Xcell4.align = "right";
Xcell5.align = "right";
Xcell6.align = "right";
Xcell7.align = "right";
Xcell1.innerHTML = "<label class='scaleTick' style= 'border-top:1;height:10px;width:50;'> 25% </label>";
Xcell2.innerHTML = "<label class='scaleTick' style= 'border-top:1;height:10px;width:50;'> 50% </label>";
Xcell3.innerHTML = "<label class='scaleTick' style= 'border-top:1;height:10px;width:50;'> 75% </label>";
Xcell4.innerHTML = "<label class='scaleTick' style= 'border-top:1;height:10px;width:50;'> 100% </label>";
Xcell5.innerHTML = "<label class='scaleTick' style= 'border-top:1;height:10px;width:50;'> 125% </label>";
Xcell6.innerHTML = "<label class='scaleTick' style= 'border-top:1;height:10px;width:50;'> 150% </label>";
Xcell7.innerHTML = "<label class='scaleTick' style= 'border-top:1;height:10px;width:50;'> 175% </label>";
/******** to display stacked bars **********/
for(i = 0; i < rowCount-1; i++)
{
var x = document.getElementById("HorizontalBarId").insertRow(i);
var cell1 = x.insertCell(0);
var cell2 = x.insertCell(1);
var PercP = document.PipelineReportCommand.getValueByName("PerToPipeline",i+1);
var Perc = PercP.substring(0,PercP.indexOf("%"));
var TQ = document.PipelineReportCommand.getValueByName("TotalPipeline",i+1);
var PQ = document.PipelineReportCommand.getValueByName("PriorityQty",i+1);
if(Perc < 100)
{
var greenPart = Perc;
var redPart = 100 - Perc;
cell1.innerHTML="<input type='text' readOnly style= 'border:0;background-
color:#00FF00;height:15px;width:" + 2*greenPart + ";'/>";
cell1.innerHTML= cell1.innerHTML + "<input type='text' readOnly style= 'border:0;background-
color:red;height:15px;width:" + 2*redPart + ";'/>";
}
if(Perc >= 100)
{
cell1.innerHTML="<input type='text' readOnly style= 'border:0;background-
color:#00FF00;height:15px;width:" + 200 + ";'/>";
var otherGreenPart = Perc - 100;
if((2*otherGreenPart) >= 150)
cell2.innerHTML="<input type='text' align='right' class='smallRight' readOnly style=
'border:0;background-color:#00FF00;height:15px;width:" + 150 + ";'/>";
else
cell2.innerHTML="<input type='text' align='right' class='smallRight' readOnly style= 'border:0;background-color:#00FF00;height:15px;width:" + 2*otherGreenPart + ";'/>"; }}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.