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.
Here's an example. This generates a graph showing order quantities for every day in year 2001 that had data. Along the x-axis, we only show the month-end date. This is done using the DEFINE virtual column ORDER_DATE_EOM_TXT and a series of BY statements. In this way, we have the each day's quantity plotted on the graph, but only show the month-end date in the labels.
I would also like to control when the data value is displayed above the point in the graph. When I set setDataTextDisplay to true, all points have the data value displayed - I only want to see them for the mont-end dates.
Is there a way to achieve this?
Thanks.
TABLE FILE CENTORD
SUM
COMPUTE QUANTITY_MM/D6 = QUANTITY / 1000;
BY ORDER_DATE
WHERE ORDER_DATE FROM '2001-01-01' TO '2001-12-31'
ON TABLE HOLD AS HCENTORD
END
-RUN
DEFINE FILE HCENTORD
ORDER_DATE_EOM/YYMD = DATEMOV(ORDER_DATE, 'EOM');
CTR/I4 = IF ORDER_DATE_EOM NE LAST ORDER_DATE_EOM THEN 1 ELSE CTR + 1;
ORDER_DATE_EOM_TXT/A10 = IF (ORDER_DATE EQ ORDER_DATE_EOM) THEN DATETRAN(ORDER_DATE, '(MD)', '(td)', 'EN', 10, 'A10') ELSE ' ';
END
-RUN
-*TABLE FILE HCENTORD
-*SUM
-*QUANTITY
-*BY ORDER_DATE
-*BY ORDER_DATE_EOM
-*BY ORDER_DATE_EOM_TXT
-*BY ORDER_DATE NOPRINT
-*END
-*-EXIT
GRAPH FILE HCENTORD
SUM
QUANTITY AS ''
BY ORDER_DATE NOPRINT
BY ORDER_DATE_EOM_TXT AS ''
BY ORDER_DATE NOPRINT
ON GRAPH SET VZERO OFF
ON GRAPH SET HAXIS 1000
ON GRAPH SET VAXIS 250
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRXAXIS 3
ON GRAPH SET STYLE *
ENDSTYLE
ON GRAPH SET GRAPHSTYLE *
setReportParsingErrors(false);
setSelectionEnableMove(false);
setTemplateFile("/images/tdg/template/IBIDefault.txt");
setDepthRadius(0);
setPlace(true);
-* X label -------------------------------------------------
setPlaceResize(getO1Label(),0);
setFontSizeAbsolute(getO1Label(),true);
setFontSizeInPoints(getO1Label(),8);
setTextRotation(getO1Label(),1);
-* Y label -------------------------------------------------
setPlaceResize(getY1Label(),0);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeInPoints(getY1Label(),8);
-* Lines and markers ---------------------------------------
setLineWidth(getSeries(0),1);
setMarkerDisplay(false);
-* Data values ---------------------------------------------
-*setDataTextDisplay(true);
setDataTextPosition(0);
setPlaceResize(getDataText(),0);
setFontSizeAbsolute(getDataText(),true);
setFontSize(getDataText(0), 8);
ENDSTYLE
END
-RUN
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
I haven't looked at your example extensively, but perhaps you can COMPUTE MISSING values for those dates that are not a month-end date? You can hide missing values in graphs, after all. If you were to combine that with a series that draws an invisible line through the existing values, I think you could achieve what you want...
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :