Change Chart Bar Series Label via Script [message #535752] |
Tue, 25 May 2010 09:51  |
Eclipse User |
|
|
|
Hi,
i want to change the Label of each Bar depending on a parameter.
I've tried to manipulate the Label by calling the beforeDrawSeries function.
function beforeDrawSeries( series, isr, icsc )
{
var currency;
if(icsc.getExternalContext().getScriptable().getParameterValue("currency") == "EUR")
currency = " €";
else
currency = " $";
series.getLabel().getCaption().setValue(series.getLabel().getCaption().getValue() + currency);
}
However, there is no effect when previewing the Report. What can I do to make this work?
|
|
|
Re: Change Chart Bar Series Label via Script [message #535762 is a reply to message #535752] |
Tue, 25 May 2010 10:14  |
Eclipse User |
|
|
|
Try this on the beforeDrawDataPointLabel script ie
function beforeDrawDataPointLabel(dph, label, icsc)
{
var mylab =
icsc.getExternalContext().getScriptable().getGlobalVariable( "reportvariable");
label.getCaption().setValue(mylab);
}
Jason
On 5/25/2010 9:51 AM, tobias.koehler1987@googlemail.com wrote:
> Hi,
>
> i want to change the Label of each Bar depending on a parameter.
> I've tried to manipulate the Label by calling the beforeDrawSeries
> function.
>
> function beforeDrawSeries( series, isr, icsc )
> {
> var currency;
> if(icsc.getExternalContext().getScriptable().getParameterVal ue( "currency")
> == "EUR")
> currency = " €";
> else
> currency = " $";
> series.getLabel().getCaption().setValue(series.getLabel().ge tCaption().getValue()
> + currency);
> }
>
> However, there is no effect when previewing the Report. What can I do to
> make this work?
|
|
|
Powered by
FUDForum. Page generated in 0.24029 seconds