Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
chart height relative/percentage to the height of grid row?
Arif shah
<p>Hi,</p>
<p> </p>
<p>I am dynamically decreasing and increasing the height of a grid through JavaScript. I want the objects inside chart (tabels/crosstabs/charts) to also change their heights according to the height of the of the row</p>
<p> </p>
<p>so Basically Its the below scenario</p>
<p> </p>
<p>A grid has four rows..each row has 25% of the grid height and I want the charts/crosstabs inside each row to be occupying 100% of the row height. So initially the chart is 8in in height (each row is 25% so thus 2in and the objects inside them are also 2in).</p>
<p> </p>
<p>Next time I change the height of the grid through javascript to 12in. Now the heights of each row is 3in. However, I have no idea how to make the heights of crosstabs and tables/charts to be 100% of the row height</p>
<p> </p>
<p>P.S: I can ofcourse change the individual heights of each object separately but I want to know if it is possible by simply changing the height of the grid. One more thing...I cannot find the height property of crosstab</p>
<p> </p>
<p>Regards</p>
<p>Arif</p>
Find more posts tagged with
Comments
rgleason
<p>Bookmark your charts and go to onPrepare or onRender of the row for your table and do something like this:</p>
<p> </p>
<div>var rowHeight = this.this.getHeight();</div>
<div> </div>
<div> </div>
<div>var bpChart = this.getViewer().getChart("BenchmarkedPerformanceChart");</div>
<div>var rvrChart = this.getViewer().getChart("RiskVsReturnChart");</div>
<div>var hstoChart = this.getViewer().getChart("DistrOfMonthlyReturn");</div>
<div>var bnchMrk = this.getViewer().getReportletBookmark("BenchMarkAnalysisXTab")</div>
<div> </div>
<div> </div>
<div> </div>
<div>//var chartHeight = $(pChart.getHtmlDom()).height(); //<---this gets the default height of the chart</div>
<div> </div>
<div>rvrChart.getClientChart().setSize(*1, rowHeight *.555);</div>
<div>bpChart.getClientChart().setSize(*1, rowHeight * .555);</div>
<div>hstoChart.getClientChart().setSize(*1, rowHeight * .465);</div>
<div>bnchMrk.getClientBookmark().setSize(*1, rowHeight * .465);</div>
<div>}</div>
<div> </div>
<div>I've used this with good results in a report I've done recently. I can re-create using the Classic Models Database if you like. </div>
<div> </div>
<div>Thanks, </div>
<div> </div>
<div>RG</div>
rupali.kundar
<p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Can you please re-create the above using the Classic Models Database. Thanks.</span></p>