How to change Data Point Label?

Hello Team, i need an help.
I have a birt chart (with four series and two Y axis, combinated series, line and bar) and i need change the label value for any series from my data set…

I define a globalvariable on fetch metod: reportContext.setPersistentGlobalVariable(“newlabel”,row[“Row15”]);

i use de function beforeDrawDataPointLabel( dph, label, icsc ) in this mode:

function beforeDrawDataPointLabel( dph, label, icsc )
{
var newlabel1=icsc.getExternalContext().getScriptable().getPersistentGlobalVariable(“newlabel”);
label.getCaption().setValue(newlabel1);
}
but the label value on the report is null…i think that i make a compilation error…but i don’t know…can you help me?

Thanks.
Biagio

Hi @Biagio -

Could you possibly upload an example workflow and dataset that recreates the problem? Then maybe I or @armingrudd (the resident BIRT wizard :slight_smile: ) can take a crack at it.

2 Likes

Hi Scott, i have solucionated my problem, without javascript only selectionating the label row as data row and changing the number of step Y axis in Birt chart.

Thanks

3 Likes

Perfect - thanks for posting your solution!