dynamic size of labels in Y-Axis
#1
Posted 17 February 2012 - 05:08 AM
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??
#2
Posted 17 February 2012 - 02:31 PM
#6
Posted 23 February 2012 - 10:16 PM
Attached File(s)
-
YAxisLabelWidth.rptdesign (77.91K)
Number of downloads: 13






MultiQuote





