Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Setting Y-Axis Title from persistent global variable
Setting Y-Axis Title from persistent global variable [message #976800] Thu, 08 November 2012 21:38 Go to next message
Olly   is currently offline Olly Friend
Messages: 61
Registered: June 2010
Location: Florida
Member
I have a graph in a table. One of the detail rows is the column "Units". I have a persistent global variable name "Y_AXIS_UNITS". I set it onRender for that row. It works b/c I used it incorrectly to set the labels. I was using the method beforeDrawAxisLabel. Now I am using beforeDrawAxisTitle and I am trying to set the Y Axis Title to "Value <Units Value>". The problem is that normally to get the global variable I would normally use the following code:
value = context.getExternalContext().getScriptable().getPersistentGlobalVariable("Y_AXIS_UNITS")
However, the last method, getPersistentGlobalVariable is not available to me through icsc. How can I get this value and set the title? I have the following code:
beforeDrawAxisTitle( axis, label, icsc )
{
importPackage(Packages.org.eclipse.birt.chart.model.attribute);
   if(axis.getType() == AxisType.LINEAR_LITERAL)
   {
        label.getCaption().setValue("Units go here");
   }
}
Re: Setting Y-Axis Title from persistent global variable [message #976807 is a reply to message #976800] Thu, 08 November 2012 21:43 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

It doesn't show it, but it's there.

icsc.getExternalContext().getScriptable().getPersistentGlobalVariable("varName"); should still get you what you're wanting.


Michael

Developer Evangelist, Silanis
Re: Setting Y-Axis Title from persistent global variable [message #976817 is a reply to message #976807] Thu, 08 November 2012 21:52 Go to previous messageGo to next message
Olly   is currently offline Olly Friend
Messages: 61
Registered: June 2010
Location: Florida
Member
Thank you. That was correct, it worked.
Re: Setting Y-Axis Title from persistent global variable [message #982369 is a reply to message #976817] Tue, 13 November 2012 04:50 Go to previous message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

You're welcome!

Michael

Developer Evangelist, Silanis
Previous Topic:BIRT and .dll files
Next Topic:A single page Birt report viewer
Goto Forum:
  


Current Time: Thu Apr 25 22:29:59 GMT 2024

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

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

Back to the top