Skip to main content



      Home
Home » Archived » BIRT » Setting values for y-axis labels
Setting values for y-axis labels [message #153031] Wed, 12 April 2006 13:54 Go to next message
Eclipse UserFriend
Originally posted by: tmbyrne2002.yahoo.com

Our users have a funky requirement for the format of the numbers on the
y-axis of some of our line charts. To implement it, I figured I'd use the
'beforeDrawAxisLabel' script event. I put this line in the script, just
to test:

label.getCaption().setValue("1000");

Now I assumed this would set the value of ALL labels on the chart (both x
and y) to 1000, but it only set the x axis labels and the y axis labels
remained the same. Is there a different way to set y axis labels?

Thanks in advance
Re: Setting values for y-axis labels [message #153278 is a reply to message #153031] Thu, 13 April 2006 08:04 Go to previous messageGo to next message
Eclipse UserFriend
Sounds like a bug. Note that you can format the Y axis label with the
formatting UI in the chart builder.

Thanks,

David


"tmbyrne" <tmbyrne2002@yahoo.com> wrote in message
news:486e7478066d884918d2dc7cf4708986$1@www.eclipse.org...
> Our users have a funky requirement for the format of the numbers on the
> y-axis of some of our line charts. To implement it, I figured I'd use the
> 'beforeDrawAxisLabel' script event. I put this line in the script, just
> to test:
>
> label.getCaption().setValue("1000");
>
> Now I assumed this would set the value of ALL labels on the chart (both x
> and y) to 1000, but it only set the x axis labels and the y axis labels
> remained the same. Is there a different way to set y axis labels?
>
> Thanks in advance
>
Re: Setting values for y-axis labels [message #153397 is a reply to message #153278] Thu, 13 April 2006 10:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tmbyrne2002.yahoo.com

Yes, the interface does have a nice formatting UI but I couldn't quite get
it to do what I want, which is why I turned to the scripting approach.
Perhaps there is a way to do it in the UI... The users would like to see
long numbers abreviated so that, say, 10,000,000 would appear as 10m and
10,000 would appear as 10k. Can anybody think of a way to do this outside
of scripting? I gave them the exponential approach (10,000,000 as 10E6,
number format of ##E0) but they didn't like it.
Re: Setting values for y-axis labels [message #153927 is a reply to message #153397] Mon, 17 April 2006 15:07 Go to previous messageGo to next message
Eclipse UserFriend
You could do everything as k or m, but not mixing with the formatting UI.

For 10M, here is an example how to do it (see screenshot).

Thanks,

David


"tmbyrne" <tmbyrne2002@yahoo.com> wrote in message
news:0e011faeba3177003435ad24e1df4f89$1@www.eclipse.org...
> Yes, the interface does have a nice formatting UI but I couldn't quite get
> it to do what I want, which is why I turned to the scripting approach.
> Perhaps there is a way to do it in the UI... The users would like to see
> long numbers abreviated so that, say, 10,000,000 would appear as 10m and
> 10,000 would appear as 10k. Can anybody think of a way to do this outside
> of scripting? I gave them the exponential approach (10,000,000 as 10E6,
> number format of ##E0) but they didn't like it.
>


Re: Setting values for y-axis labels [message #154498 is a reply to message #153927] Wed, 19 April 2006 16:46 Go to previous message
Eclipse UserFriend
Originally posted by: tmbyrne2002.yahoo.com

Thank you, that worked well enough to put it to the thousands (k), though
once our data starts getting in the billions the users will probably
complain but I'll cross that bridge when we get there. Thanks again!
Previous Topic:Dynamic DataSources and Datasets-- possible? Best way?
Next Topic:Formula One e.Report Engine BEA Workshop Edition
Goto Forum:
  


Current Time: Tue May 13 18:14:06 EDT 2025

Powered by FUDForum. Page generated in 0.03191 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top