Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Dynamically change a Chart
TheRealDea
I have an end-user that has asked me about changing an existing chart's width/height dynamically. I have not been able to nail-down a process to perform this. Is there an easy method to make these particular changes? Additionally, can I reference the underlying dataset for the chart to gather the rowcount for another task? Thanks,
Find more posts tagged with
Comments
mwilliams
Hi TheRealDea,
You've probably already solved this, but in case someone else has the same question...
You can dynamically change your chart size in the beforeFactory method of your report with code like the following:
MyChart = this.getReportElement("myChart"); //myChart is the name you give the chart in the property editor.
MyChart.setHeight("5in");
MyChart.setWidth("5in");
You can obviously set this based on the output format or a parameter or whatever you'd like.
Hope this helps.