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)
changing the name that appears for a legend
laye50
<div>Hi all, </div><div> </div><div>How to change the name of a legend in a chart bar graph after generation? </div><div> </div><div>thank you</div>
Find more posts tagged with
Comments
GLO_FR
<p>Hi,</p><p> </p><p>what do you mean by the name of a legend ? The title, the categories name, the series name ?</p>
laye50
<p>the categories name</p>
GLO_FR
<p>Hi,</p><p> </p><p>You can do it with some lines of script.</p><p>On the chart scripting page, choose <strong>beforeDrawLegendItem</strong> and uses this for instance</p><div><pre class="_prettyXprint">function beforeDrawLegendItem( lerh, bounds, icsc ){if (lerh.getLabel().getCaption().getValue() == 'XXXXX') { lerh.getLabel().getCaption().setValue('YYYY'); }}</pre></div>
laye50
<div>thank you, it works well
</div><div>I thought this function but I did not know her methods. I am beginner in this technology.</div><div>Thank you very much.</div>
sray2001
<p>I'm new here. How we could set legend Title based upon selected category?</p>