Focal Point
more graph questions - html

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

June 13, 2006, 08:09 AM
Pam Kratt
more graph questions - html
I'm trying to move my graph to the left in html. The legend is getting cut off when the report prints. I have tried playing with the setRect command but it doesn't budge the graph at all. Any suggestions? I've also tried set vaxis and set haxis and that causes me to get no graph at all. Removing the setPlace(true) at least made the legend a little smaller, but it still does not fit on a portrait page. I'm fairly new to html ... I'm more accustomed to pdf which is working just fine. Thanks.

Here is the code to create the graph:
SET LOOKGRAPH=PIE
SET 3D=OFF

GRAPH FILE HOLD220
SUM PCT_MKT_VL AS ""
BY SEC_GRP_NM
WHERE MKT_VL IS-NOT MISSING AND MKT_VL GT 0 AND PCT_MKT_VL GE 1
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET GRAPHSTYLE *
setTitleString("Asset Allocation");
setTextJustHoriz(getTitle(),1);
setLegendTextAutofit(true);
setFontSizeAbsolute(getLegendText(),true);
-*setRect(getFrame(),new Rectangle(-12000,-8000,21000,18000));
setRect(getFrame(),new Rectangle(-24000,-12000,21000,18000));
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(false);
setUseSeriesBorderDefaults(true);
setFillMissingData(0);
setLegendPosition(2);
-*setPlace(true);
ENDSTYLE
ON GRAPH HOLD AS GRAPH1 FORMAT HTMTABLE
END

This is the commands that display everything:
-HTMLFORM BEGIN
< !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">


Trust Portfolio Report
<script>
var finished = false;
function finishedLoading(){
finished = true;
}



!IBI.FIL.HEADER1;
!IBI.FIL.GRAPH1;
!IBI.FIL.TABLE1;



-HTMLFORM END


webfocus 8.105M; os: windows; pdf, html, exl2k, csv
June 13, 2006, 09:04 AM
Prarie
Graph placement still mistifies me...but if you mess with the
first number here it moves it left and right...the second number moves it up and down. Hopefully JG will log in and save the day if that doesn't help.

setRect(getFrame(), new Rectangle(10500,300, 5000,4000));


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
the setRect command was the command I was playing with all morning and it didn't move the graph at all. So, there is some command that I'm missing that says to look at that command or there is a command I have already that is causing it to be ignored (I don't have many commands, so I can't figure out which one would cause it to be ignored).


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

The values in the Rectangle parm relate to virtual co-ordinates and here is a portion of a previous post -

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 in understanding?

BTW, I tried your graph using a basic table from GGSALES and the graph was mostly off to the left of the page owing to the -24000.

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 
the set vaxis and haxis worked. I originally had them set to the same as pdf (svg graph) haxis 6 and vaxis 4, but it appears the amounts need to be in the hundreds. I did the following and it worked:

ON GRAPH SET HAXIS 600
ON GRAPH SET VAXIS 400


webfocus 8.105M; os: windows; pdf, html, exl2k, csv
aughhh I think that bit me one time too...glad you got it to work.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003