As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
Actually, it's not so cold up here in Dearborn that I need to be thawed out. But, my WebFOCUS Graph seems to need a bit of thawing on this one.
What I'm looking for is a way to have the "TITLEs" in a bar graph to appear (under each BAR) the same way that "TITLEs" in a report appear (above each data column). The catch is that the sort BY field in the graph is a concatenation of multiple fields AND each one of the concatenated fields must appear on its own line.
The below code simulates what I need although it done in the below code as a TABLE FILE request (which is not an acceptable solution).
Hopefully, there's someting for GRAPH TITLEs similar to the use of the comma in the TABLE FILE request.
The thing is: I don't know what that is, Do You?
Here's my sample code:
SET ACROSSPRT = COMPRESS
DEFINE FILE CAR
CRLF/A1 = HEXBYT(126,CRLF) ;
SORTLINE/A132 = COUNTRY || CRLF || CAR || CRLF || MODEL ;
CNTR/I1 WITH MODEL = CNTR + 1 ;
END
-RUN
GRAPH FILE CAR
SUM CAR.BODY.DEALER_COST AS ''
BY HIGHEST CAR.BODY.DEALER_COST NOPRINT
BY CAR.CARREC.SORTLINE AS ''
WHERE RECORDLIMIT EQ 6
ON GRAPH SET LOOKGRAPH VBAR
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 VAXIS 250
ON GRAPH SET HAXIS 750
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);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setPieFeelerTextDisplay(1);
setPieLabelDisplay(3);
setTextFormatPreset(getPieSliceLabel(),2);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setTextJustHoriz(getO1Title(),1);
setFontSizeAbsolute(getO1Title(),true);
setFontSize(getO1Title(),12);
setTextRotation(getO1Title(),0);
setTextWrap(getO1Title(),false);
setTextJustHoriz(getO1Label(),0);
setFontSizeAbsolute(getO1Label(),true);
setFontSize(getO1Label(),8);
setTextRotation(getO1Label(),0);
setTextWrap(getO1Label(),false);
setPlaceResize(getO1Title(),0);
setPlaceRotate(getO1Title(),0);
setPlaceAlign(getO1Title(),0);
setPlaceWordWrap(getO1Title(),0);
setPlaceResize(getO1Label(),0);
setPlaceRotate(getO1Label(),0);
setPlaceAlign(getO1Label(),0);
setPlaceWordWrap(getO1Label(),0);
setPlace(true);
ENDSTYLE
ON GRAPH SET STYLE *
SQUEEZE=ON, ORIENTATION=PORTRAIT,$
TYPE=REPORT,
GRID=OFF, FONT='TIMES NEW ROMAN', SIZE=10, COLOR=RGB(224 224 224), BACKCOLOR='NONE',$
ENDSTYLE
END
-RUN
TABLE FILE CAR
PRINT COUNTRY AS ''
OVER CAR AS ''
OVER MODEL AS ''
BY CRLF AS ''
ACROSS CNTR NOPRINT
WHERE RECORDLIMIT EQ 6
FOOTING
"NOTE: This simulates the way that I want the values of SORTLINE"
"to appear,one set of items under each bar."
ON TABLE SET PAGE OFF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
GRID=OFF, JUSTIFY=CENTER,$
TYPE=DATA, FONT=ARIAL, SIZE=9, JUSTIFY=CENTER,$
TYPE=FOOTING, FONT=ARIAL, SIZE=9, JUSTIFY=LEFT,$
ENDSTYLE
END
Thanks a Gig, in advance...
In FOCUS Since 1983 ~ from FOCUS to WebFOCUS. Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
However, there's still some issues with the following code, they are: 1) The data lines are "clipped" only the first one or two lines and the top half of the 3rd are visible. 2) The stagger is not acceptable to the user 3) Without the stagger: not all items are displayed
DEFINE FILE CAR
SORTLINE/A132 = COUNTRY || '\n' || MODEL || '\n' || CAR || '\n' || EDIT(MODEL,'99999999999999') || '\n' || CAR ;
END
-RUN
GRAPH FILE CAR
SUM CAR.BODY.DEALER_COST AS ''
BY HIGHEST CAR.BODY.DEALER_COST NOPRINT
BY CAR.CARREC.SORTLINE AS ''
WHERE RECORDLIMIT EQ 10
ON GRAPH SET LOOKGRAPH VBAR
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 VAXIS 300.000
ON GRAPH SET HAXIS 960.000
ON GRAPH SET UNITS PIXELS
ON GRAPH SET GRMERGE ON
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
setLabelStagger(getO1Label(),true);
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDepthRadius(0);
setPlaceWordWrap(getO1Label(),1);
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),6);
setPieFeelerTextDisplay(1);
setPieLabelDisplay(3);
setTextFormatPreset(getPieSliceLabel(),2);
setLegendDisplay(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setTextJustHoriz(getO1Title(),1);
setFontSizeAbsolute(getO1Title(),true);
setFontSize(getO1Title(),12);
setTextRotation(getO1Title(),0);
setTextWrap(getO1Title(),false);
setTextJustHoriz(getO1Label(),1);
setFontSizeAbsolute(getO1Label(),true);
setFontSize(getO1Label(),8);
setFillColor(getO1Label(),new Color(0,0,0));
setTextRotation(getO1Label(),0);
setTextWrap(getO1Label(),false);
setPlaceResize(getO1Title(),0);
setPlaceRotate(getO1Title(),0);
setPlaceAlign(getO1Title(),0);
setPlaceWordWrap(getO1Title(),0);
setPlaceResize(getO1Label(),0);
setPlaceRotate(getO1Label(),0);
setPlaceAlign(getO1Label(),0);
setPlaceWordWrap(getO1Label(),0);
setPlace(true);
ENDSTYLE
ON GRAPH SET STYLE *
SQUEEZE=ON, ORIENTATION=PORTRAIT,$
TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=10, COLOR=RGB(224 224 224),$
TYPE=DATA, COLUMN=N3, COLOR='SILVER',$
ENDSTYLE
END
-* Copy and run this code to see what I mean.
-* With and without the stagger
So, what next? ( I don't want to open a case )
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
I was going to suggest that. A friend of mine did that here for a graph and it was very effective. You can make it a compound and it will look nicely integrated.
That's how I would normally do it, together with the values in a data grid. Suits all recipients as some prefer to look at graphics, others at numbers. Giving them both means that all tastes are counted for.
I also persuade them to have it in a PDF document so that I can use pixel perfect.
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
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
I'll post me initial results after I get to FTP the image to my site. Is there a way to embed an image another way (other then to have it reside somewhere on the net)?
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
@ Tony... How'd you get the alignment to match up between the graph and the table... is it just by setting wrap size or is there any other way.. i got a report that has 24 bars in the graph and that need to align to 24 columns in the table... problem is the values go into the millions in the columns and the client does not want the report to be too wide !!! any suggestions for alignments??
The output I posted was from a PDF output using the latest flavour of compound output, so it was a case of matching the graphic positioning and width to match the tabular output which had same width columns using TYPE=REPORT, WRAP=n.nn, WIDTH=n.nn, $
I have achieved a similar result in HTML at a previous client some 5 years ago using release 5.3.2, so you should still be able to action either of these outputs using your 7.1.4.
If most of your a of the data values are over, say, 10,000 then how about dividing by 1000 and posting the data with a trailing "K" or annotate the report to identify that the results are in 1000's?
For Excel output I suggest to the users that, as only a few mouse clicks will supply them with a graph for a given data grid, there might be a call for them not to be so lazy and click away Trouble is that the users get so used to getting their graphic and grid results in the other two main formats that they want that extra inch every time!
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
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
thanks for that.. i have implemented the dividing by thousands and put up a specifc annotation.... for the alignment in html i had to work on the wrap sizing as mentioned.. however, the client wants the entire report to fit in a legal landscape paper... i have been trying to get everything in to a PDF but i hit upon a problem where in i cannot color ITEMS in the FOOTING/SUBFOOT... is ther any other way to get around this coloring issue ?
You just have to ensure that the style key words are correct -
APP PREPENDPATH IBISAMP
DEFINE FILE GGSALES
YRMONTH/I6MYY = DATE
END
GRAPH FILE GGSALES
SUM DOLLARS
BY YRMONTH
WHERE DATE GE '19970101'
ON TABLE HOLD AS GRAPH01 FORMAT GIF
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET GRID OFF
-*ON GRAPH SET VAXIS 6
-*ON GRAPH SET HAXIS 12
ON GRAPH SET GRAPHSTYLE *
setGraphType(18);
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(false);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(false);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setPlace(true);
setFillType(getSeries(0),1);
setSeriesFillColor(0,new Color(255,255,120));
setFillType(getSeries(1),1);
setSeriesFillColor(1,new Color(255,120,255));
setFillType(getSeries(2),1);
setSeriesFillColor(2,new Color(120,255,255));
setFillType(getSeries(3),1);
setSeriesFillColor(3,new Color(080,080,255));
ENDSTYLE
END
-RUN
SET HTMLARCHIVE=ON
COMPOUND LAYOUT PCHOLD FORMAT PDF
UNITS=IN, $
SECTION=section1, LAYOUT=ON, METADATA='0.5^0.5^0.5^0.5', MERGE=OFF, ORIENTATION=LANDSCAPE, PAGESIZE=A4, $
-* Section - Area Dashboard
PAGELAYOUT=1, NAME='Layout page 1', text='Form', BOTTOMMARGIN=0.5, TOPMARGIN=0.5, METADATA='0^0.5^0^0.5', $
OBJECT=IMAGE, NAME='Graph1', IMAGE=graph01.gif, POSITION=(0.630 0.467), DIMENSION=(11.337 3.275), $
COMPONENT='Report1', TEXT='Report', POSITION=(1.380 3.400), DIMENSION=(10.167 2.085), $
END
SET COMPONENT='Report1'
TABLE FILE GGSALES
SUM DOLLARS
BY REGION AS ''
ACROSS YRMONTH AS ''
WHERE DATE GE '19970101'
ON TABLE SUBFOOT
"Colouring <+0> should <+0> be <+0> simple enough"
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE OFF
ON TABLE SET STYLE *
UNITS=IN, PAGESIZE='A4', LEFTMARGIN=0.19, RIGHTMARGIN=0.19, TOPMARGIN=0.00, BOTTOMMARGIN=0.00,
SQUEEZE=ON, ORIENTATION=LANDSCAPE, SIZE=8, GRID=ON, $
TYPE=REPORT, FONT='ARIAL', SIZE=8, COLOR=BLACK, BACKCOLOR='NONE', STYLE=NORMAL, WRAP=OFF, $
TYPE=REPORT, COLUMN=DOLLARS(*), WIDTH=0.455, WRAP=0.455, $
TYPE=TABFOOTING, ITEM=1, COLOR=RED, $
TYPE=TABFOOTING, ITEM=2, COLOR=GREEN, $
TYPE=TABFOOTING, ITEM=3, COLOR=BLUE, $
TYPE=TABFOOTING, ITEM=4, COLOR=ORANGE, $
ENDSTYLE
END
-*
COMPOUND END
-RUN
TThis message has been edited. Last edited by: Tony A,
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
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
i guess i was not specific... i meant BACKCOLOR... when i try using the BACKCOLOR for every item (even for the above code) only the first color is applied and that too for the entire subfoot...