Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Image Placement

Status
Not open for further replies.

nonskanse

Programmer
Jan 7, 2004
9
US
I am trying to position graph images in a pdf report so that the mostly useless space on the left hand side of the graph does not show up on the page. I have tried positioning the graph so that the is negative, but the graph is always at a -Y value (whether I use -y or -x).

Is there a workaround for this? I am willing to cut the graph on the fly if there's a way in webfocus.

POSITION=(-.1, 1),

Thanks,
nonskanse
 
Whoops- I knew as soon as I asked the question I'd find a solution.


for position, you have to use a + on any field you want to be positive IF you use a negative previously. So my (-.1 1) position was going to -.1 -1.

-nonskanse
 
FYI,

For your issue, you will probably want to stick with the solution that you came up with since it is 1-a simple solution and 2-you have already implemented it. However you can use the solution below when you find that you need to use every bit of space available to you.

You can remove the "mostly useless" space on the left side of the graph using the graph stylesheet to utilize the space needed more efficiently. I recently needed to do this for a client that wanted a dashboard but wanted all of their graphs to show on the screen without having to scroll. When I made all of the graphs small enough, you could no longer easily tell what was in the graph due to the extra white space. This was done by adding the following api call to the graphstyle style sheet.

setRect(getFrame(),new Rectangle(x,y,width,hight));

The x,y cordinates start with -16000,16000 and end in 16000,-16000. Note that the x,y cordinate represents the lower left corner of the graph as the starting position and uses width and height to adjust the size of the graph within the HAXIS and VAXIS that you are already using.

The same rules apply to the legend as well, however you would use getLegend() rather than getFrame.

gizzy
 
I did end up using the setRect function eventually. Thanks for the help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top