Hello All,<br />
<br />
I'm trying to work my way through doing some scripting to dynamically resize a chart based on the number of rows in the dataSet the chart uses. I was trying to do something like this but it totally fails:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
var chart1 = this.getReportElement("chartAccountSummary");
var rowCount = AccountSummary.getRowCount("account_id");
var height = 5;
var finalHeight = "";
for(var counter=0;counter<rowCount;counter++){
height += 1;
}
finalHeight = height + "in";
chart1.setHeight(finalHeight);
</pre>
<br />
It fails because it doesn't know what "AccountSummary" is. That is the name of the dataset that I'm trying to retrieve row count from. I may just be completely off. I currently have this code in the <strong class='bbc'>beforeFactory()</strong> of the report.<br />
<br />
Any information would be very helpful. Thanks

<br />
<br />
Amanda