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)
resize grid/charts through javascript in text item
Arif shah
<p>Hi,</p><p> </p><p>Can someone please tell me how can I resize the chart size if I insert a text item and write html code to make it a button and write a javascript inside it.</p><p> </p><p>It should be something like below but I don't know how to get the chart element inside this function. Please have a look the set width syntax in the last three lines of the javascript funtion below</p><pre class="_prettyXprint"><script>function Collapse(){ if (document.getElementById("Population").style.visibility == "hidden") { document.getElementById("Population").style.display="inline"; document.getElementById("Population").style.visibility="visible"; } else { document.getElementById("Population").style.display="inline"; document.getElementById("Population").style.visibility="hidden"; var mychart = document.getReportElement( "population" ); mychart.setWidth("1in"); mychart.setHeight("1in"); }}</script><button type="button" style="width: 90px; height: 30px; color: #5a698b; font: bold 12px Arial;padding-top: 1px; padding-bottom: 1px; background: #ddddff; text-align: center;"onclick="Collapse()";">Show/Hide</button></pre>
Find more posts tagged with
Comments
There are no comments yet