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)
Show/Hide the chart in Y-series script
divyani
<p>Hi,</p>
<p> </p>
<p>I have two charts in my report. One is a pie chart and there is a bar chart. I am filtering the bar chart on clicking a pie slice using the following script in the "Y Series" script for pie chart:</p>
<p> </p>
<div>var chart = actuate.getViewer(evt.srcElement || evt.target).getCurrentPageContent().getChartByBookmark("BarChart");</div>
<div>var filter = new actuate.data.Filter("Country", "eq", categoryData);</div>
<div>chart.setFilters(filter);</div>
<div>chart.submit();</div>
<div> </div>
<div>I want the bar chart to be hidden when the report is first rendered. And later when i click on the pie slice the bar chart has to be displayed. I have used "chart.show()", but it does not work. Can anyone help me out.</div>
<div> </div>
<div>Thanks!</div>
Find more posts tagged with
Comments
JFreeman
<p>What version of BIRT are you using?</p>
<p>Can you attach a sample report based on classic models or a flat file data source the replicates the issue?</p>
divyani
<p>Thanks for your response! I figured out how it can be done and it is working perfectly fine.</p>
<p> </p>
<p>Regards</p>
<p>Divyani</p>
JFreeman
<p>I'm glad to hear you figured it out and resolved your issue.</p>
<p>Let us know if you have additional questions.</p>
DGI Systems
<p>Hi <span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Divyani,</span></p>
<p> </p>
<p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">I am having a similar issue, can you share your findings please?</span></p>
<p> </p>
<p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">David</span></p>
divyani
<p>Hi,</p>
<p> </p>
<p>You need to set the display(Property Editor > Properties > General) property of the chart to be hidden as "No Display". Use the following script in the Y Series(Edit Chart > Script > Y Series) of the chart from which you want to drill down.</p>
<div style="margin:0px;color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> </div>
<div style="margin:0px;color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">var chart = actuate.getViewer(evt.srcElement || evt.target).getCurrentPageContent().getChartByBookmark("BarChart");</div>
<div style="margin:0px;color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">var filter = new actuate.data.Filter("Country", "eq", categoryData);</div>
<div style="margin:0px;color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">chart.setFilters(filter);</div>
<div style="margin:0px;color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">chart.show();</div>
<div style="margin:0px;color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">chart.submit();</div>
<div style="margin:0px;color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> </div>
<div style="margin:0px;color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Divyani.</div>
DGI Systems
<p>Excellent, thanks for posting your solution</p>