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 setDataTextPosition(#) sets the position of the values used in a stacked bar chart, 5:top/left and 2: above/right, for all series. However, I need to be able too see all the values of the bars. NOTE that the HIVAL for Italy is only visible if I change setScaleMax(getY1Axis(),975.0); to 990 [975 is the max of HIVALs]. The LOVAL for Japan is not visible. Here's the code (Using the CAR file):
ENGINE INT CACHE SET ON
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE CAR
-* Created by Info Assist for Graph
SUM COMPUTE LOVAL/I6%=DECODE COUNTRY ( 'ENGLAND' 975 'ITALY' 960 'FRANCE' 488 'JAPAN' 13 'W GERMANY' 36 ) ;
COMPUTE HIVAL/I6%=975 - LOVAL ;
BY CAR.ORIGIN.COUNTRY AS ''
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET AUTOFIT ON
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET LOOKGRAPH BAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setPlace(true);
setCurveFitEquationDisplay(false);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $
TYPE=DATA, COLUMN=N2, BUCKET=y-axis, $
TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDataTextPosition(5);
setDataTextDisplay(true);
setPieFeelerTextDisplay(1);
setFontName(getDataText(),"ARIAL");
setFontSizeAbsolute(getDataText(),true);
setAutofit(getDataText(),false);
setFontSizeInPoints(getDataText(),18);
setPlaceResize(getDataText(),0);
setScaleMinAuto(getY1Axis(),false);
setScaleMaxAuto(getY1Axis(),false);
setGridStepAuto(getY1MajorGrid(),false);
setDisplay(getLegendArea(),false);
setDisplay(getY1Label(),false);
setScaleMax(getY1Axis(),975.0);
*GRAPH_JS_FINAL
"pieProperties": {
"holeSize": "0%"
},
"blaProperties": {
"seriesLayout": "stacked",
"orientation": "horizontal"
},
"agnosticSettings": {
"chartTypeFullName": "Bar_Stacked_Horizontal"
}
*END
ENDSTYLE
END
-RUN
-*IA_GRAPH_FINISH
This message has been edited. Last edited by: Doug,
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
Please delete the first 5 lines of code, which we do not need to see
But it said "Do not delete or modify the comments
quote:
Use developer tools to view what is created and you'll see that these data labels are not even created within the output.
They're just displayed, or not, with options under Series / Data Labels. So I played around with that. But, it's for all series and, imho, should be series selectable. But, then again, if the values need to with within the bar segment, that won't do either. So perplexing ...
quote:
what about forcing the minimum axis value to be negative?
I did think of that... But, it doesn't work as it's still "right justified" and doesn't fit within the actual bar / value series.
quote:
You might be able to force these elements using JavaScript yourself, but that might be tricky.
I'm not sure how tricky I want to get on this. The values do show when you hoover over the bars, narrow or wide.This message has been edited. Last edited by: Doug,
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
I considered using setFontSizeInPoints(getDataText(),8);, but, this needs to be display on a laptop with a 1366x768 display, making 8 pt too small for the user . Thanks anyway .
Actually, that does work for "COUNTRY", but, I neglected to add that my bar titles are A48, such as "856 Received < Partial Shipment : 013"
To see this, change the following sections of the code as follows:
...
...
DEFINE FILE CAR
MyTitle/A38=DECODE COUNTRY ( 'ENGLAND' 'Item 1 for England with more info: 013' 'ITALY' 'Italy 67890123456789012345678901234567' 'FRANCE' 'France 7890123456789012345678901234567' 'JAPAN' 'Japan 67890123456789012345678901234567' 'W GERMANY' 'W Germany 0123456789012345678901234567' ) ;
END
GRAPH FILE CAR
-* Created by Info Assist for Graph
SUM
COMPUTE LOVAL/I6%=DECODE COUNTRY ( 'ENGLAND' 975 'ITALY' 960 'FRANCE' 488 'JAPAN' 10 'W GERMANY' 36 ) ;
COMPUTE HIVAL/I6%=975 - LOVAL ;
BY MyTitle AS ''
BY COUNTRY NOPRINT
...
-* Add COLUMN=N4 to the BUCKET list
TYPE=DATA, COLUMN=N4, BUCKET=y-axis, $
...
-* Change the following line to variaous numbers:
setFontSizeInPoints(getDataText(),6);
...
This message has been edited. Last edited by: Doug,
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
I considered using setFontSizeInPoints(getDataText(),8);, but, this needs to be display on a laptop with a 1366x768 display, making 8 pt too small for the user
Not to challenge you Doug, I know that sometime users may be picky, but at least getDataText(),10) is not that bad. I have a 1920x1080 laptop and it's farely readable. At 1366x768 it is even bigger. Do you also plan to change the axis font to 18 because actually, you kept them as the default 10 ?
Personally, I don't know how it could be possible to manage every single screen resolution. Even with a default recommended screen resolution, a user can decide to change it to a lowest one. So, normally I build a default format suitable for most of the screens then unfortunately nothing more I can do .
No matter the font size you will use, when resizing the output window, some data will be hidden...This message has been edited. Last edited by: MartinY,
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
Thanks Martin, I totally agree. I'm not challenged or offended by your comments at all. "We" just decided to accommodate the 1366x768 as our standard with the caveat that "It may not be a perfect fit for other screen resolutions.". We have not even considered tablets or smart phones yet.
I am going to present the font size of 6 for not and hope that they can live with it considering that they can hoover over the bars, as long as the are GT 0, to see the actual values.
Thanks again Tony and Martin
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