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)
Update label text in chart client script
divyani
<p>Hi,</p>
<p> </p>
<p>Can we update label text when we click on a pie slice with the category data in the chart's client script? I have used the following script in Y series script of the pie chart, but it does not update the label text:</p>
<div> </div>
<div>var label = actuate.getViewer(evt.srcElement || evt.target).getCurrentPageContent().getLabelByBookmark("Label")</div>
<div>alert(label.getLabel());</div>
<div>label.getLabel().setText(categoryData);</div>
<p> </p>
<p>Please find the attached sample report.</p>
<p> </p>
<p>Thanks in advance!</p>
Find more posts tagged with
Comments
Clement Wong
<p>Not sure what your requirements are, but if it's just HTML viewing, can you use jQuery instead of the code you have in the Y Series > Mouse Click > Script?</p>
<pre class="_prettyXprint">
$("#container_Label").html(categoryData);</pre>
divyani
<p>Sorry for not being clear about the requirements. As per the requirements, the label has to be hidden first (For that, I have set display="No Display" in the property editor). Later when i click on the pie slice the text in the label has to be set to the categoryData and the label is made visible. The code mentioned above does not work in this case. Is there any other way to do it?</p>
<p> </p>
<p>Please find the attached report design for reference.</p>
<p> </p>
<p>Thanks in advance!</p>
Clement Wong
<p>How about just use pure jQuery in the Mouse Click event? Replace your current code with this single line:</p>
<pre class="_prettyXprint">
$("#container_Label").html(categoryData).show();</pre>