|
Re: Formatting value in Meter Chart legend [message #654456 is a reply to message #654415] |
Tue, 15 February 2011 21:10 |
|
Mike,
Can you put a script in like:
function beforeDrawLegendItem( lerh, bounds, icsc )
{
var curr = lerh.getValueLabel().getCaption().getValue();
importPackage( Packages.java.text );
importPackage( Packages.java.lang );
nf = NumberFormat.getPercentInstance(
icsc.getExternalContext().getScriptable().getLocale() );
nf.setMinimumFractionDigits(2);
str = nf.format( Double.parseDouble(curr)/100 );
lerh.getValueLabel().getCaption().setValue(str);
}
Jason
On 2/15/2011 11:34 AM, Mike Wulkan wrote:
> I have a meter chart and I have specified "Show Value" in the legend.
> The values in my case are some percentage that I would like to display
> in the form of nnn.nn%. However I cannot find anyplace in the GUI to
> specify a format for these values and since the value is computed by the
> specified aggregation function, I can't format in my own series script
> and display it as a string.
> Can this be done or do I need to just not use this feature and put in
> some dynamic text under the chart to display the values?
|
|
|
|
Powered by
FUDForum. Page generated in 0.03385 seconds