Focal Point
Advanced Graph Assistant Display

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

October 24, 2007, 09:15 AM
<Ryan>
Advanced Graph Assistant Display
Hello all! I am trying to create a graph in the "wonderful" Advanced Graph Assistant in 762. I cannot get anything to line up correctly. My report is fairly simple:

-*INTERNAL_PROPERTIES$SampleData=false;OBJECTID=GLOBAL
-*INTERNAL_PROPERTIES$GlobalRecordLimit=500;OBJECTID=GLOBAL
-*INTERNAL_PROPERTIES$FieldDisplayMode=label;OBJECTID=GLOBAL
-*INTERNAL_PROPERTIES$PrefixDisplayMode=;OBJECTID=GLOBAL
GRAPH FILE CAR
-* Created by Advanced Graph Assistant
SUM CAR.BODY.DEALER_COST
BY CAR.ORIGIN.COUNTRY
ACROSS CAR.CARREC.MODEL
ON GRAPH HOLD AS CARGRAPH FORMAT SVG
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 1
ON GRAPH SET HAXIS 8
ON GRAPH SET VAXIS 4
ON GRAPH SET UNITS INCHES
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBICylinderOnGrey.txt");
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDepthRadius(0);
setDepthAngle(0);
setLegendPosition(-1);
setLegendAutomatic(false);
setRect(getLegendArea(),new Rectangle(-12544.0,-14720.0,32000.0,5120.0));
setTextRotation(getO1Label(),3);
setRect(getFrame(),new Rectangle(-10368.0,-3584.0,20800.0,17664.0));
ENDSTYLE
END
-********************
-********************
TABLE FILE CAR
PRINT
COUNTRY NOPRINT
HEADING
" "
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD AS GRAPHDISP FORMAT PDF
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
-*TYPE=REPORT,
-* GRID=OFF,
-* FONT='TIMES NEW ROMAN',
-* SIZE=10,
-*$
TYPE=HEADING,
IMAGE=CARGRAPH.SVG,
POSITION=(+0.00000 +0.000000),
-* SIZE=(7.500000 4.000000),
$
ENDSTYLE
END


The sample shown in the editor does not match the output. I can get the graph to look very good in the editor, but when it runs, nothing seems to be in the correct place.

Has anyone run into this before and have a possible fix/workaround?

Or am I simply doing something wrong. Any help would be GREATLY appreciated

Thanks,
Ryan
October 24, 2007, 10:00 AM
Leah
Apparently their are issues with the 7.6.2 version, we are waiting for the 7.6.4 before using the advanced graph assistant. Get really strange errors in our environment.


Leah
October 24, 2007, 10:15 AM
Prarie
The new Graph Assistant is a great thing...but with everything new..it is going to have issues...I was able to tweak the numbers in Legends to make it look like it should..but you shoulnd't have to do that. We are waiting on 7.6.4 too...but then GUI only gets you so far and into the code you must go.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
I usually wait for two major releases before I start using the "wonderful" new stuff. Does EXL2K Formula work with FML reports by v7.6.2?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Thanks to everyone for your time. I was affraid that was going to be the answer. As you said Prarie, into the code I go to see if I can manually move things around.

Thanks again, and if anyone has any updates, please let us know!

Thanks,
Ryan
We use AIX and WebSphere with 762 and basically cannot use the Advanced Graph Assistant at all. If I go to Filters or Chart Properties, I get a 5051 error. I have a case open and it is a known problem with Unix installations.

It works fine on localhost.

And my developers REALLY wanted this new feature. Frowner


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
My graph expert suggests adding these two lines:
setPlace(true);
setTextWrap(getO1Label(), true);
And that does look better (but your legend box size needs some tweaking).


Brian Suter
VP WebFOCUS Product Development
Ryan,

Try adding the following lines to your request
setPlace(true);
setTextWrap(getO1Label(), true);

setPlace(true); (or 'Fit to Chart Area' property in GUI) should fix the alignment of the X-Axis labels.

You might notice that legend overlaps with the X-Axis title and that is due to the Legend rectangle area that was specified in:
setRect(getLegendArea(),new Rectangle(-12544.0,-14720.0,32000.0,5120.0));

Vicky Lozovsky
Brian and Vicky,

I was out on Friday, so I am just now getting back to this.

Thank you for that code. I did an initial test and things look remarkably better. I'll keeping toying with the placements of the different areas and see if I can't get it looking better with the AGA preview.

Thanks again!
Ryan
OK, so I have the graph looking pretty good (in the preview and when I run it). However, as soon as I add a title, with or without a subtitle), the graph portion gets "squished" down to an unreadable size (width remains correct).

Is this just another "undocumented feature" that I simply need to manually adjust the title and subtitle rectangles? Or is there something else I am missing?

Added:

setTextString(getTitle(),"Car Graph");
setDisplay(getTitle(),true);
setTextString(getSubtitle(),"Some Subtitle");
setDisplay(getSubtitle(),true);


Graph Style now looks like this:

ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBICylinderOnGrey.txt");
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDepthRadius(0);
setDepthAngle(0);
setLegendPosition(-1);
setLegendAutomatic(false);
setRect(getLegendArea(),new Rectangle(-12544.0,-14720.0,32000.0,5120.0));
setTextRotation(getO1Label(),3);
setRect(getFrame(),new Rectangle(-10368.0,-3584.0,20800.0,17664.0));
setPlace(true);
setTextWrap(getO1Label(), true);
setTextString(getTitle(),"Car Graph");
setDisplay(getTitle(),true);
setTextString(getSubtitle(),"Some Subtitle");
setDisplay(getSubtitle(),true);
ENDSTYLE


And yes, the legend still isn't right, but I'm not worried about that yet Smiler.
Another odd thing about the setPlace(true); piece of code. I can't resize my Legend rect.

I can move it all around the the window, but no matter how I adjust the width and height, the labels remain in the lower corner of the rect (which is expected) and are so narrow that you cannot read what they say.

If I set setPlace() to false, I can adjust the Legend rect so all the labels are readable, but I lose the other formatting you folks have helped me with.

Any other suggestions are greatly appreciated.

Thanks,
Ryan