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.
The example code below, using the CAR file, demonstrates the problem. Normally method "setDataTextPosition" will position data text for the risers in a bar graph. Comment out the COMPUTE for TOT_RATIO below and you will see how the data text values are placed inside of the risers. But when the second graph series (the line graph for TOT_RATIO) is added, this method no longer works properly. Thinking that maybe I needed to specifically identify the series I wanted to control, I experimented with using "get" methods in conjunction with this method (ex.: setDataTextPosition(getSeries(0),4) and setDataTextPosition(getDataText(0),4)), but these attempts only resulted in error messages. Does anyone have other ideas for moving the data text back inside the risers? Thanks.
DEFINE FILE CAR
CAR_WGT/D6 = IF (CAR LIKE 'A%' OR 'T%') THEN WEIGHT ELSE 0 ;
CAR_MPG/D6 = IF (CAR LIKE 'A%' OR 'T%') THEN MPG ELSE 0 ;
END
-*
GRAPH FILE CAR
SUM
WEIGHT NOPRINT
MPG NOPRINT
CAR_WGT NOPRINT
CAR_MPG NOPRINT
COMPUTE CAR_RATIO/D6.2 = CAR_MPG / CAR_WGT * 100 ; AS 'A & T Cars'
COMPUTE TOT_RATIO/D6.2 = MPG / WEIGHT * 100 ; AS 'All Cars'
ACROSS COUNTRY AS ''
HEADING
"Example of Data Text Problem"
-* ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET GRAPHEDIT OFF
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID OFF
ON GRAPH SET VAXIS 400
ON GRAPH SET HAXIS 1200
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
-*setGraphType(17);
setViewableSeries(2);
setSeriesType(0,1);
setSeriesType(1,2);
setAxisAssignment(0,0);
setRiserWidth(50);
setLegendPosition(3);
setFillColor(getSeries(0),new Color(255,204,0));
setFillColor(getSeries(1),new Color(0,0,255));
-*
setO1LabelDisplay(true);
setO1MajorGridDisplay(false);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setO1LabelRotate(3);
setFontSizeAbsolute(getO1Label(),true);
setFontSize(getO1Label(),14);
-*
setY1LabelDisplay(true);
setY1LabelFormat(1)
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
-*
setDataTextDisplay(true);
setDataTextPosition(4);
setDataTextFormat(0);
setDisplay(getDataText(1),false);
setCustomDataText(getSeries(0),true);
-*setTextRotation(getDataText(0),1);
ENDSTYLE
ON GRAPH SET STYLE *
SQUEEZE=ON, ORIENTATION=LANDSCAPE, $
TYPE=REPORT, GRID=OFF, FONT='TIMES NEW ROMAN', SIZE=10, $
TYPE=HEADING, SIZE=12, COLOR='WHITE', BACKCOLOR='GRAY', STYLE=BOLD, JUSTIFY=CENTER, $
ENDSTYLE
END
This message has been edited. Last edited by: Dan Satchell,
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
Because your incorporating a Line Graph with the Bar graph, the Line "needs" the middle for display, so the values move above.
Why not use a dual axis, which, does what you want:
DEFINE FILE CAR
CAR_WGT/D6 = IF (CAR LIKE 'A%' OR 'T%') THEN WEIGHT ELSE 0 ;
CAR_MPG/D6 = IF (CAR LIKE 'A%' OR 'T%') THEN MPG ELSE 0 ;
END
-*
GRAPH FILE CAR
SUM
WEIGHT NOPRINT
MPG NOPRINT
CAR_WGT NOPRINT
CAR_MPG NOPRINT
COMPUTE CAR_RATIO/D6.2 = CAR_MPG / CAR_WGT * 100 ; AS 'A & T Cars'
COMPUTE TOT_RATIO/D6.2 = MPG / WEIGHT * 100 ; AS 'All Cars'
ACROSS COUNTRY AS ''
HEADING
"Example of Data Text Problem"
-* ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET LOOKGRAPH VBAR2AX
ON GRAPH SET GRAPHEDIT OFF
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID OFF
ON GRAPH SET VAXIS 400
ON GRAPH SET HAXIS 1200
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
-*setGraphType(17);
setViewableSeries(2);
-*setSeriesType(0,1);
-*setSeriesType(1,2);
setAxisAssignment(0,0);
setRiserWidth(50);
setLegendPosition(3);
setFillColor(getSeries(0),new Color(255,204,0));
setFillColor(getSeries(1),new Color(0,0,255));
-*
setO1LabelDisplay(true);
setO1MajorGridDisplay(false);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setO1LabelRotate(3);
setFontSizeAbsolute(getO1Label(),true);
setFontSize(getO1Label(),14);
-*
setY1LabelDisplay(true);
setY1LabelFormat(1)
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
-*
setDataTextDisplay(true);
setDataTextPosition(4);
setDataTextFormat(0);
-*setDisplay(getDataText(1),false);
setCustomDataText(getSeries(0),true);
-*setTextRotation(getDataText(0),1);
ENDSTYLE
ON GRAPH SET STYLE *
SQUEEZE=ON, ORIENTATION=LANDSCAPE, $
TYPE=REPORT, GRID=OFF, FONT='TIMES NEW ROMAN', SIZE=10, $
TYPE=HEADING, SIZE=12, COLOR='WHITE', BACKCOLOR='GRAY', STYLE=BOLD, JUSTIFY=CENTER, $
ENDSTYLE
END
-EXIT
Dan, you have been an enormous help to quite a few of us; THANKS!!!
Thank you very much for your input. Unfortunately I am trying to replace some Excel graphs that have been in use for several years. The users are accustomed to seeing their department/section in relation to the overall organization in the manner depicted in my example (organization line graph overlaying department sections as bars). I will probably have an easier time selling the re-positioning or removal of of the data text than the redesign of the graph styles. But ultimately the changes I am allowed to make may depend on just how badly the production staff wants to off-load the manual production of those Excel graphs!
And a big THANK YOU! to you, too, and to the many other contributors who have given freely of their time and knowledge to make this forum the tremendous resource that it is. Best wishes for the holidays and the New Year to one and all.
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
I opened IBI case #63512544 regarding this issue. Here is IBI's response:
quote:
Dan,
I was not able to work around this problem. This looks like a bug, even in 7.7.01. The good news is that I have tested this in 7.7.02 and this is no longer a problem. The correct output is displayed.
Sincerely, Jim
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
IBI has provided a work-around for this specific problem. It is unclear to me why the minor changes made to my original code make a difference, but the code below does move the data values just inside the top of the bar risers. However, using any other setting for method setDataTextPosition() besides "3" results in the data values moving to a position outside and above the risers again. So this is a work-around that only works when the moon and stars are in a certain alignment.
DEFINE FILE CAR
CAR_WGT/D6 = IF (CAR LIKE 'A%' OR 'T%') THEN WEIGHT ELSE 0 ;
CAR_MPG/D6 = IF (CAR LIKE 'A%' OR 'T%') THEN MPG ELSE 0 ;
END
-*
GRAPH FILE CAR
SUM
WEIGHT NOPRINT
MPG NOPRINT
CAR_WGT NOPRINT
CAR_MPG NOPRINT
COMPUTE CAR_RATIO/D6.2 = CAR_MPG / CAR_WGT * 100 ; AS 'A & T Cars'
COMPUTE TOT_RATIO/D6.2 = MPG / WEIGHT * 100 ; AS 'All Cars'
ACROSS COUNTRY AS ''
HEADING
"Example of Data Text Problem"
ON GRAPH SET GRAPHEDIT OFF
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID OFF
ON GRAPH SET VAXIS 400
ON GRAPH SET HAXIS 1200
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
setViewableSeries(2);
setSeriesType(getSeries(0),1);
setSeriesType(getSeries(1),2);
setRiserWidth(50);
setLegendPosition(3);
setFillColor(getSeries(0),new Color(255,204,0));
setFillColor(getSeries(1),new Color(0,0,255));
setPlace(true);
-*
setO1LabelDisplay(true);
setO1MajorGridDisplay(false);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setO1LabelRotate(3);
setFontSizeAbsolute(getO1Label(),true);
setFontSize(getO1Label(),14);
-*
setY1LabelDisplay(true);
setY1LabelFormat(1)
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
-*
setDataTextDisplay(true);
setDataTextPosition(3);
setDataTextFormat(0);
setDisplay(getDataText(1),false);
setCustomDataText(getSeries(0),true);
ENDSTYLE
ON GRAPH SET STYLE *
SQUEEZE=ON, ORIENTATION=LANDSCAPE, $
TYPE=REPORT, GRID=OFF, FONT='TIMES NEW ROMAN', SIZE=10, $
TYPE=HEADING, SIZE=12, COLOR='WHITE', BACKCOLOR='GRAY', STYLE=BOLD,JUSTIFY=CENTER, $
ENDSTYLE
END
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007