hi i have a problem with the Y-axis
i want to modify the labels on the Y-Axis with a dynamic suffix e.g
5,20 MWh
13,20 KWh
1,20 KWh
500,00 Wh
etc
i tried with:
function Wh(val)
{
if(val<1000)
return format("# Wh",val);
else if(val<1000000)
return format("#,## KWh",val/10);
else if(val <1000000000)
return format("#,## MWh",val/10000);
return format("#,## GWh",val/10000000);
}
function beforeDrawAxisLabel( axis, label, icsc )
{
if(axis.getTitle().getCaption().getValue() == "Y")
label.getCaption().setValue(Wh(label.getCaption().getValue()));
}
i works but only if i set a fixed label span with 60 points
but i want to set the span dynamic without fixed!
if i uncheck it some labels are not complete visible

is it possible to insert a dynamic size??