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)
What is needed to localize chart series labels in the legend?
sebif
<p>Hi,</p><p> </p><p>I localized my reports but I'm not sure how to do that for the chart as the legend still shows the English labels. The Grid's columns were localized using labels bound to localized properties files.</p><p> </p><p>/s</p>
Find more posts tagged with
Comments
kclark
<p>Take a look at <a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/topic/24419-localization-of-the-datetime-in-the-chart/'>this
post</a>. It shows that you'll have to do a little scripting to do this, but the solution should be:</p><pre class="_prettyXprint _lang-">function beforeDrawAxisLabel( axis, label, icsc ){ importPackage (Packages.java.text); importPackage (Packages.java.util); paramValue = icsc.getExternalContext().getScriptable().getPersistentGlobalVariable("lang"); if (axis.isCategoryAxis()){ currentLabel = label.getCaption().getValue(); df = new SimpleDateFormat("MMM/yy"); temp = df.parse(currentLabel); if (paramValue == "fr"){ df1 = new SimpleDateFormat("MMM/yy",Locale.FRENCH); } else{ df1 = new SimpleDateFormat("MMM/yy",Locale.UK); } newLabel = df1.format(temp); label.getCaption().setValue(newLabel) }}</pre><p>This isn't for the legend but the same concept should apply for the legend.</p>