Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Expanding Bar Graph

$
0
0

I am using the followng code to create a horizontal bar graph inside a table cell containing a subform. I want the height of the bar to "grow" when the subform grows. The subform grows when the user enters more than one line of data in a different cell in the same row.

 

Form1.Table1.ActionItemGrp.Row5.PercentCompleteSubform.HiddenPercent::calculate - (JavaScript, client)if(PercentComplete.rawValue !==null){
 this.rawValue = PercentComplete.rawValue;
 var vScore = 0; if (this.rawValue == 1) { vScore = vScore + 1; }if (this.rawValue == 2) { vScore = vScore + 2; }if (this.rawValue == 3) { vScore = vScore + 3; }if (this.rawValue == 4) { vScore = vScore + 4; }if (this.rawValue == 5) { vScore = vScore + 5; }if (this.rawValue == 6) { vScore = vScore + 6; }if (this.rawValue == 7) { vScore = vScore + 7; }if (this.rawValue == 8) { vScore = vScore + 8; }if (this.rawValue == 9) { vScore = vScore + 9; }if (this.rawValue == 10) { vScore = vScore + 10; }
 var vWidth = (vScore/10) * 1.5109; // width of the subform
 this.resolveNode("Table1.ActionItemGrp.Row5.PercentCompleteSubform.Bar").w = vWidth + "in";
 this.resolveNode("Table1.ActionItemGrp.Row5.PercentCompleteSubform.Bar").x = ".01in"; // relative to the subform}

I want the height of the bar (rectangle) to grow the same height as the subform it is in when it expands.

 

Thank you


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>