October 14, 2009, 03:41 AM
<JG>Prarie, I have done an internal search and unfortunately it's a known bug supposedly fixed in 7.6.5,
have you tried it on your 7.6.5 test environment.
It does work in 7.6.6 and above.
One possible solution that I saw was instead of coding ON GRAPH SET LOOKGRAPH VAREA
explicitly set the graph type using the API call
e.g. setGraphType(31);
Never know might work.
October 14, 2009, 09:44 AM
VLozovskyJG, that's an excellent idea. I actually tried it in Release 7.6.1 and it worked. I modified the original fex to show a working example.
-DEFAULT &VARCTR = 1
-DEFAULT &COUNTRY = 'ITALY'
GRAPH FILE CAR
SUM DEALER_COST AS ''
ACROSS MODEL
BY COUNTRY
WHERE COUNTRY EQ '&COUNTRY'
-* try also commenting above condition
-*VLozovsky: changed VAREA to VLINE
ON GRAPH SET LOOKGRAPH VLINE
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 GRWIDTH 0
ON GRAPH SET GRMERGE ON
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
-*VLozovsky: api call below will visualize the line chart as an area
setSeriesType(0,3);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
-IF &VARCTR NE 1 GOTO SKIP_ANNOT;
setDisplay(getAnnotation(0), true);
setTextString(getAnnotation(0), "&COUNTRY");
setRect(getAnnotation(0),new Rectangle(500,-14850,1500,100));
setFillColor(getAnnotation(0), new Color(0,0,0));
-SKIP_ANNOT
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setPlace(true);
ENDSTYLE
ON GRAPH SET STYLE *
PAGESIZE='Letter',
LEFTMARGIN=0.250000,
RIGHTMARGIN=0.250000,
TOPMARGIN=0.250000,
BOTTOMMARGIN=0.250000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
BACKCOLOR='NONE',
STYLE=NORMAL,
$
TYPE=HEADING,
LINE=1,
OBJECT=FIELD,
ITEM=1,
COLOR='BLACK',
$
ENDSTYLE
END
October 14, 2009, 10:02 AM
PrarieVlozovsky -
That work around will not work for me...because the real graph will some days have one value and others have several.
JG I'll try your suggestion.
October 14, 2009, 10:30 AM
<JG>Come on Prarie wake up, you know better than that.
What's actually missing from the work around is the first step.
TABLE FILE CAR
SUM DEALER_COST AS ''
ACROSS MODEL
BY COUNTRY
ON TABLE SAVE
END
-RUN
-SET &&VARCTR = &LINES;
That accomodates the bypass if more than 1 exists.
October 14, 2009, 01:51 PM
PrarieYes you are correct I was not awake, and was coming back to say...I got it! Brain was not with me earlier.