Focal Point
svg graph in pdf - legend

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6441074661

May 04, 2006, 08:31 AM
Pam Kratt
svg graph in pdf - legend
Another svg graph question for pdf ... I'm hoping someone knows what I'm doing wrong. I've been reading the graph manual and none of the commands I'm trying are giving me what I want. My legend has a lot of items on it so webfocus has made it so tiny you can't read it. There is room for it to be bigger, I just can't seem to make it bigger. The -include save is to change the label descriptions to be descriptions instead of codes (someone on the forum helped me with that). I've removed the commands I was "playing" with this morning. Here is my code:

SET LOOKGRAPH=PIE
SET 3D=OFF
GRAPH FILE HOLD220
SUM PCT_MKT_VL AS ""
BY MAJMINCLASS AS ''
WHERE MKT_VL IS-NOT MISSING AND MKT_VL GT 0 AND PCT_MKT_VL GE 1
ON GRAPH SET LOOKGRAPH PIEMULTI
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH SET GRAPHSTYLE *
setSeriesLabelArray(
-INCLUDE SAVE
);
setRect(getFrame(),new Rectangle(-12000,-8000,21000,18000));
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(false);
setUseSeriesBorderDefaults(true);
setFillMissingData(0);
setLegendPosition(2);
setPlace(true);
ENDSTYLE


webfocus 8.105M; os: windows; pdf, html, exl2k, csv
May 04, 2006, 09:17 AM
Tony A
Pam,

Have a play with these API lines -
-* Set legend position and font
setLegendDisplay(true);
setLegendTextAutofit(false);
setFontSize(getLegendText(),10);
setRect(getLegendArea(),new Rectangle(-12500,7250,6000,6000));


Remember that the graph output is sized in virtual co-ordinates of width and height of 32000 units. These range from -16000 to 16000 left to right horizontally and 16000 to -16000 top to bottom vertically, and any VC reference in the API code will be as an offset to (0,0).

When I say units, these will be the value of the width of the graph output divided by 32000. The width and height of the output can be controlled by using WebFOCUS code -
ON GRAPH SET HAXIS (Width)
ON GRAPH SET VAXIS (Height)

where width and height are expressed in units set within the Style.

So the -12500 in the setting above means 12500 units to the left of vertical center. The 7250 means 7250 units above the horizontal center.
The first 6000 is the width and the second is the height.

Hope this helps.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
May 04, 2006, 10:16 AM
Pam Kratt
that worked perfectly. Thanks for explaining the positioning the way you did. I've read it many times, but how you explained it makes it much clearer. The setRect(getLegendArea(),new Rectangle(-12500,7250,6000,6000));
is what worked for me. Thanks.


webfocus 8.105M; os: windows; pdf, html, exl2k, csv