Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]StackedTotalOnTop Runs into Frame when Result is 100% on Horizontal Stkd Bar

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]StackedTotalOnTop Runs into Frame when Result is 100% on Horizontal Stkd Bar
 Login/Join
 
Platinum Member
posted
I am new to WebFocus, and I've learned a lot through this forum as well as through online documentation, YouTube videos as well as trial-and-error. That being said, I've explored several different resources online, and I've not yet found a solution for this challenge.

Also, this is my first post to the forum. While I have tried to follow all the posting guidelines, please let me know if I missed anything.

Here is my question:

Is there a way to control the sizing of the graph so that my StackedTotalOnTop does not run into the frame on the HTML page when the resulting total is 100.0%? Currently, the stacked totals work well so long as the total is not 100.0%. When the total equals 100.0%, it runs into the frame and only shows one or two digits. I think the solution might be in controlling either the width of the grid step itself or redrawing the graph frame. I have attempted to find the answer in the graphing manual, but I think I might be overlooking the obvious.

I do not have access to the CAR file; however, I have posted my code using some generic data.

As additional information, the Sales Types can be:

1 = New Family Car
2 = New Corporate Car
3 = Rental Family Car
4 = Rental Corporate Car
5 = Leased Family Car
6 = Leased Corporate Car
7 = No Purchase or Agreement

Also, the flags in the code calculate the percentage of the first six sales types but do not show the seventh on the graph. That's what my users need. The Stacked Total Percentage displays at the end of each bar. When this percentage results in 100.0% is when the challenge occurs in terms of sizing. The 100.0% brushes against the frame on my HTML page.

Below is my code. I think I condensed it to the essential components as I removed most of the styling elements.


DEFINE FILE AUTOMOBILES
SALESPERSON_STATUS/A10 MISSING ON NEEDS SOME DATA=DECODE AUTOMOBILES.AUTOMOBILES.FTPT (FT 'Full-Time', PT 'Part-Time');
COUNT/P8.6 MISSING ON NEEDS SOME DATA=EDIT (AUTOMOBILES.AUTOMOBILES.COUNT);
NUM/A1 MISSING ON NEEDS SOME DATA=EDIT (AUTOMOBILES.AUTOMOBILES.SALES_TYPE, '9');
NUM_2/P8 MISSING ON NEEDS SOME DATA=ATODBL(NUM, '1', 1);
FLAG1/P8 MISSING ON NEEDS SOME DATA=IF NUM_2 EQ 7 THEN 0 ELSE 1;
FLAG2/P8 =IF AUTOMOBILES.AUTOMOBILES.COUNT EQ 0 THEN 0 ELSE 1;
END

ENGINE INT CACHE SET ON
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
GRAPH FILE AUTOMOBILES
-* Created by Info Assist for Graph
SUM PCT.AUTOMOBILES.AUTOMOBILES.COUNT/P8.6 AS 'Employee Success Rate';
BY AUTOMOBILES.AUTOMOBILES.SALES_TYPE
ACROSS AUTOMOBILES.AUTOMOBILES.CALENDAR_YEAR AS 'Calendar Year'
WHERE AUTOMOBILES.AUTOMOBILES.REGION_NAME EQ '®ION_NAME.().Region:.';
WHERE AUTOMOBILES.AUTOMOBILES.DEALERSHIP EQ '&DEALERSHIP.().Dealership:.';
WHERE AUTOMOBILES.AUTOMOBILES.STATUS EQ '&STATUS.(FIND AUTOMOBILES.AUTOMOBILES.STATUS IN AUTOMOBILES).Salesperson Type:.';
WHERE AUTOMOBILES.AUTOMOBILES.SALESPERSON_STATUS EQ '&SALESPERSON_STATUS.(,).Salesperson Status:.';
WHERE AUTOMOBILES.AUTOMOBILES.SALES_DESC '&SALES_DESC.(FIND AUTOMOBILES.AUTOMOBILES.SALES_DESC IN AUTOMOBILES).Sales Year:.';
WHERE TOTAL (AUTOMOBILES.AUTOMOBILES.FLAG1 GE 1) AND (AUTOMOBILES.AUTOMOBILES.FLAG2 GE 1);
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET UNITS PIXELS
ON GRAPH SET HAXIS 700
ON GRAPH SET VAXIS 350
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH HBRSTK1
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDisplay(getDataTextStackedTotalOnTop(),true);
setZeroValueDataTextStackedTotalOnTopDisplay(false);
setZeroValueDataTextDisplay(false);
setScaleMinAuto(getY1Axis(),false);
setScaleMaxAuto(getY1Axis(),false);
setScaleMax(getY1Axis(),100.0);
setGridStepAuto(getY1MajorGrid(),false);
setDisplay(getY1MajorGrid(),true);
setGridStyle(getY1MajorGrid(),2);
setFontSizeAbsolute(getDataTextStackedTotalOnTop(),true);
setAutofit(getDataTextStackedTotalOnTop(),false);
setPlaceResize(getDataTextStackedTotalOnTop(),0);
setY1MustIncludeZero(false);
setScaleMinAuto(getY1Axis(),false);
setScaleMin(getY1Axis(),0.01);
setDisplayOffScale(getY1Axis(),false);
setZeroValueDataTextDisplay(false);
setTransparentFillColor(getFrame(),true);
setGridStep(getY1MajorGrid(),20.0);
setDataTextDisplay(true);
setDisplay(getDataText(),false);
setDataTextPosition(2);
setDataTextRadiusDefault(10);
setDisplay(getO1MajorGrid(),false);
setTextFormatPreset(getY1Label(),28);
setTextFormatPreset(getDataTextStackedTotalOnTop(),29);
setDataTextAngleDefault(90);
setDataTextRadiusDefault(0);
setDisplay(getAnnotation(0),true);
setTextWrap(getAnnotation(0),true);
setRect(getAnnotation(0),new Rectangle(-16000.0,9600.0,32000.0,6400.0));
setTextString(getAnnotation(0),"");

This message has been edited. Last edited by: Tamra,


WebFocus 8.2.04
WebFocus 8.2.04

 
Posts: 191 | Registered: September 18, 2015Report This Post
Virtuoso
posted Hide Post
In 8105, I just created something similar to what you have using ibisamp/car and the horizontal bar goes up to 120%. I tried it with both AUTOFIT ON and OFF and it still didn't do what's happening to your chart. Could you try raising the value for this line:

setScaleMax(getY1Axis(),100.0);




ENGINE INT CACHE SET ON


-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='350.0';
-DEFAULTH &WF_STYLE_WIDTH='700.0';

-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE CAR
-* Created by Info Assist for Graph
SUM PCT.CAR.BODY.DEALER_COST
BY CAR.COMP.CAR
ACROSS CAR.ORIGIN.COUNTRY
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET ARGRAPHENGIN JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH HBRSTK1
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT

setPieDepth(0);
setPieTilt(0);
setDepthRadius(0); 
setCurveFitEquationDisplay(false); 
setPlace(true); 

*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);

*END
ENDSTYLE
END

-RUN



This message has been edited. Last edited by: BabakNYC,


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Platinum Member
posted Hide Post
Thank you. I will try to edit my code and see what happens with it.


WebFocus 8.2.04
WebFocus 8.2.04

 
Posts: 191 | Registered: September 18, 2015Report This Post
Expert
posted Hide Post
Try adding this, 110 or 120:

setExcludeMaxLabel(getY1Label(),true);
setScaleMin(getY1Axis(),0.0);
setScaleMax(getY1Axis(),110.0);


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Platinum Member
posted Hide Post
Tom:

Thank you. That solution was exactly what I needed for my graph. I appreciate both solutions though, and I'm going to keep the other solution provided by BabakNYC in mind for future use.

This message has been edited. Last edited by: JulieA,


WebFocus 8.2.04
WebFocus 8.2.04

 
Posts: 191 | Registered: September 18, 2015Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]StackedTotalOnTop Runs into Frame when Result is 100% on Horizontal Stkd Bar

Copyright © 1996-2020 Information Builders