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)
how to enable chart scripting functions onRender view
suresh@anumolu
<p>Hi,</p>
<p> </p>
<p>I am trying to add beforeDrawAxisLabel functionality inside onRender view. But I cant find the function in the dropdown. </p>
<p> </p>
<p>Please see the attached screenshot.</p>
<p> </p>
<p>The chart i was referring can be found at the following link:</p>
<p><span style="font-family:calibri, sans-serif;"><span style="font-size:11pt;"> <a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/topic/39516-chart-category-x-axis-as-string-and-sort-enabled-on-numerical-value/?view=getnewpost'>http://developer.actuate.com/community/forum/index.php?/topic/39516-chart-category-x-axis-as-string-and-sort-enabled-on-numerical-value/?view=getnewpost</a></span></span></p>
;
<p> </p>
<p>Thanks</p>
<p>suresh</p>
Find more posts tagged with
Comments
suresh@anumolu
<p>First chart was downloaded from actuate website, that has all the events where as the second chart in the attached rptdesign doesnt show all the events. </p>
<p> </p>
<p>Can you let me know how to enable the events?</p>
<p> </p>
<p>Thanks for your help in advance..</p>
suresh@anumolu
<p>Hi, After spending some more time I have figured out the problem was with chart type being html5 vs svg. Is there any reason why the events are being different between svg vs html?</p>
<p> </p>
<p>The charts are rendered much better in html5 compared to the other formats svg, jpeg. So I would like to implement this functionality in html5. Please let me know if there is any other event which serves the purpose of <span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">beforeDrawAxisLabel event in html5 format?</span></p>
<p> </p>
<p><span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">I tried using clientscript beforeDrawAxis, but i am not sure how retrieve a hash map from </span><strong>getExternalContext().getScriptable().getPersistentGlobalVariable. </strong>Any help would be appreciated.</p>
<p> </p>
<p>Thanks for your help in advance.</p>
<p> </p>
<p>Thanks</p>
<p>Suresh</p>
Clement Wong
<p>HTML5 Charts are based on HighCharts. The events of the Chart item for HTML5 format are client side (on the browser) as opposed to runtime for non-HTML5 (SVG/PNG/JPG).</p>
<p> </p>
<p>Yes, HTML5 Charts produce much cleaner and more interactive output than the other formats.</p>
<p> </p>
<p>In the HTML5 Charts, you have access to Report Parameter and Report Variables via:</p>
<p> </p>
<p> this.getReportParameter("parmname")<br>
this.getReportVariable("varname")<br>
</p>
suresh@anumolu
<p>Thanks for your response Celement Wong. Is it possible to set the hashMap object to that Report variable/parameter. I guess its not right? I would like to set a key/value pair to customized x-axis labels.</p>
<p>whats the best way to acheive that? If its possible to sepcify getReportParameter/Vairable can i do that inside onFetch event?</p>
<p> </p>
<p>thanks for your help. </p>
Clement Wong
<p>Yes, you can.</p>
<p> </p>
<p>Attached is a sample that sets a java.util.HashMap(); in a report variable. (See <em>Data Explorer > Report Variable > myReportVariable</em>).</p>
<p> </p>
<p>Then in the HTML5 chart, it retrieves the HaspMap values in the beforeGeneration via this.getReportVariable("varname").</p>
<p> </p>
<p> </p>
suresh@anumolu
<p>Thanks Clement Wong.. Your example works fine, let me try to set the hashmap inside the script and get back to you..thanks again for your prompt response.</p>
suresh@anumolu
<p>Clement, Does this hash map have any dependency on the BIRT designer?</p>
<p>Your eg works fine if i run the rport from the designer version Eclipse BIRT Designer Version 4.4.0.v20150710-0101 Build <4.2.3.v20150710-0101 </p>
<p>but it doesnt seem to be working on the version</p>
<p>Eclipse BIRT Designer Version 4.2.3.v20131216-0430 Build <4.2.3.v20131216-0430</p>
<p> </p>
<p>Can you please confirm?</p>
<p> </p>
<p>Thanks again</p>
Clement Wong
<p>Access to report and parameter values from the script was not added until BIRT iHub 3.1. (4.4.0 version).</p>
<p> </p>
<p>The alternative in previous versions would be to create a HTML text report item and save it off in a JavaScript variable. Then in the HTML5 chart, you would be able to access that JavaScript variable (on the client side).</p>
suresh@anumolu
<p>Thanks for the confirmation Clement Wong.. I will use the alternate approach for now..</p>