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 add/remove chart
MarkW
I have setup 10 report parameters that represent the same type of data. A user can select up to 10 items and have these passed in using those parameters. The report itself may contain 10 charts that represent the result of queries that used the 10 different parameters. However, what if the user only selected 6 items. How can I dynamically remove the last 4 charts on report and not have an empty space left for them in the report?
Find more posts tagged with
Comments
MarkW
I came up with a solution in the beforeGeneration function of each chart to check to see if the report parameter is null, and if so, set the chart width/height = 0;
function beforeGeneration( chart, icsc )
{
var pm = icsc.getExternalContext().getScriptable().getParameterValue("pm2");
if(!pm){
chart.getBlock().getBounds().setWidth(0);
chart.getBlock().getBounds().setHeight(0);
}
}
Tubal
You could also use the Visibility property in the Property Editor on each chart to be True of False based on what the report parameter is.
Vineet Joshi
Hi ,
Sorry for jumping into your post but i have some similar problem . i need user to select the type of graph ..
Also i cannot play on visibility (like said by Tubal) looking at the broader aspect.
the real question is:
1> at the start there should be only one chart .
2> so as the user select multiple values, the same chart should be called in loop ,producing the resulting charts.
3>now the resulting charts should be intelligent enough to adjust itself.
PLS tell me if i am not clear.....:)
Regards