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)
How to access the Legend object or specifically legend title in beforeGeneration method
swapnilpingale
<p>Hello All,</p>
<p>I want to know the legend title.</p>
<p>We have</p>
<p>function beforeDrawLegendItem( lerh, bounds, icsc )</p>
<div>{</div>
<div>}</div>
<p>where we can get all the properties related to Legend.</p>
<p>But i want to access all those properties in beforeGeneration().</p>
<p>Can anybody please let me know how i can access the Legend object in beforeGeneration()?</p>
<p>Thanks in advance.</p>
Find more posts tagged with
Comments
Clement Wong
<p>You can access the legend in <em>beforeGeneration </em>via chart.getLegend()</p>
<pre class="_prettyXprint">
function beforeGeneration( chart, icsc )
{
chart.getLegend().getTitle().setVisible(true);
chart.getLegend().getTitle().getCaption().setValue("Legend-ary");
}</pre>