Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Legend Width and beforeDrawLegendItem
Legend Width and beforeDrawLegendItem [message #872302] Tue, 15 May 2012 21:33 Go to next message
Mark Victory is currently offline Mark VictoryFriend
Messages: 133
Registered: July 2009
Senior Member
Hi All,

We use the beforeDrawLegendItem method to set the NLS value for the legend entries (in our bar charts).
It appears that the width of the legend area is determined before the beforeDrawLegendItem method is called, however.
Regardless of the "Max Percent" setting I provide for the Legend, if the NLS string for the language in use is much longer than the English string, the Legend gets clipped.

Is there a way to make the legend take into account the values that are set in the beforeDrawLegendItem method when determining the width of the legend area?

Thanks,
Mark
Re: Legend Width and beforeDrawLegendItem [message #873148 is a reply to message #872302] Thu, 17 May 2012 15:41 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Mark

You could always set the right insets on the plot and then in the script
adjusts the left insets and bounds for the chart legend entries. Take a
look at the attached zip that contains an example report and an image to
show you where to set the plot insets.

Jason

On 5/15/2012 5:33 PM, Mark Victory wrote:
> Hi All,
>
> We use the beforeDrawLegendItem method to set the NLS value for the
> legend entries (in our bar charts).
> It appears that the width of the legend area is determined before the
> beforeDrawLegendItem method is called, however.
> Regardless of the "Max Percent" setting I provide for the Legend, if the
> NLS string for the language in use is much longer than the English
> string, the Legend gets clipped.
>
> Is there a way to make the legend take into account the values that are
> set in the beforeDrawLegendItem method when determining the width of the
> legend area?
>
> Thanks,
> Mark
>
Re: Legend Width and beforeDrawLegendItem [message #873315 is a reply to message #873148] Fri, 18 May 2012 00:30 Go to previous message
Mark Victory is currently offline Mark VictoryFriend
Messages: 133
Registered: July 2009
Senior Member
Thanks a lot, Jason.
That looks like it would work.
I can just check the locale and if it is one that I know will translate into long strings I can expand the legend area.
I appreciate the help.

Mark
Previous Topic:Unable to change the run time connection properties of data source using JTDS driver
Next Topic:Deploying BIRT Report to Tomcat with MongoDB ODA
Goto Forum:
  


Current Time: Thu Apr 25 20:56:57 GMT 2024

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

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

Back to the top