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.
I have an issue. We have data that has decimal dates within them. The client wants them to be sorted by this, but wants them to only show the Year and only show that year name once.. So across the bottom of the below image, they want it to only say "2000 2001 2002 etc.", but the data points between to remain. Anyone ever attempted this?
Here is some demo code:
-*
-* Create test data.
-*
APP FI EXAMPLE DISK EXAMPLE.MAS (LRECL 80
-RUN
-WRITE EXAMPLE
-WRITE EXAMPLE FILE=EXAMPLE,SUFFIX=FOC
-WRITE EXAMPLE SEGNAME=SEG1
-WRITE EXAMPLE FIELD=DECYEAR,,A11,A11,$
-WRITE EXAMPLE FIELD=SMMCNT,,I9,I9,$
-WRITE EXAMPLE FIELD=MSMMCNT,,I9,I9,$
-RUN
CREATE FILE EXAMPLE
MODIFY FILE EXAMPLE
FIXFORM DECYEAR/A11 SMMCNT/A9 MSMMCNT/A9
DATA
2000.833333000000020000000050
2001.000000000000080000000090
2001.166666000000038000000045
2001.333333000000035000000050
2001.500000000000120000000100
2001.666666000000305000000350
2001.833333000000090000000080
2002.000000000000285000000200
END
-RUN
-*TABLE FILE EXAMPLE
-*PRINT SMMCNT AS 'SMM'
-* MSMMCNT AS 'Model SMM'
-*BY DECYEAR AS 'Year'
-*END
-*-EXIT
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 EXAMPLE
PRINT SMMCNT AS 'SMM'
MSMMCNT AS 'Model SMM'
BY DECYEAR AS 'Year'
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT 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 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
setUseSeriesShapes(true);
setMarkerSizeDefault(50);
*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);
setFrameAutoShade(false);
setTransparentFillColor(getFrameSide(),true);
setTransparentBorderColor(getFrameSide(),true);
setTransparentFillColor(getFrameBottom(),true);
setTransparentBorderColor(getFrameBottom(),true);
setPieTilt(0);
setPieDepth(0);
setDepthRadius(0);
setDepthAngle(0);
setFillColor(getFrame(),new Color(255,255,255));
setDisplay(getDataText(0), false);
setDisplay(getDataText(1), false);
setDataTextDisplay(false);
setFillColor(getSeries(0),new Color(255,0,0));
setFillColor(getSeries(1),new Color(0,0,255));
setTransparentFillColor(getFrame(),true);
*GRAPH_JS
introAnimation: {
duration: 250.0,
animateOnce: true
}
,
*END
ENDSTYLE
END
-RUN
This message has been edited. Last edited by: <Emily McAllister>,
- FOCUS Man, just FOCUS! ----------------------------- Product: WebFOCUS Version: 8.1.04 Server: Windows 2008 Server
Basically you need to create a field that is just you're year, then you add both and set DECYEAR to noprint. The other thing to note is the GRXAXIS value. This needs to be set to 2 since you have 2 x-axis.
DEFINE FILE EXAMPLE1
MY_YEAR/A4=EDIT(DECYEAR,'9999');
END
GRAPH FILE EXAMPLE1
PRINT SMMCNT AS 'SMM'
MSMMCNT AS 'Model SMM'
BY MY_YEAR AS 'Year'
BY DECYEAR NOPRINT
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT 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 0
ON GRAPH SET GRXAXIS 2
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
setUseSeriesShapes(true);
setMarkerSizeDefault(50);
*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);
setFrameAutoShade(false);
setTransparentFillColor(getFrameSide(),true);
setTransparentBorderColor(getFrameSide(),true);
setTransparentFillColor(getFrameBottom(),true);
setTransparentBorderColor(getFrameBottom(),true);
setPieTilt(0);
setPieDepth(0);
setDepthRadius(0);
setDepthAngle(0);
setFillColor(getFrame(),new Color(255,255,255));
setDisplay(getDataText(0), false);
setDisplay(getDataText(1), false);
setDataTextDisplay(false);
setFillColor(getSeries(0),new Color(255,0,0));
setFillColor(getSeries(1),new Color(0,0,255));
setTransparentFillColor(getFrame(),true);
*GRAPH_JS
introAnimation: {
duration: 250.0,
animateOnce: true
},
*END
ENDSTYLE
END
-RUN
Eric Woerle 8.1.05M Gen 913- Reporting Server Unix 8.1.05 Client Unix Oracle 11.2.0.2
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013
have you pulled down the WFJSChart PDF from tech support yet? I think with the move to JSCharts, you would do it in the GRAPH_JS section. There is a ton of information in there about how to affect different things like group names etc. Where as I thought the old graph script logic would still work, the documentation now only talks about the Java script commands.
Eric Woerle 8.1.05M Gen 913- Reporting Server Unix 8.1.05 Client Unix Oracle 11.2.0.2
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013
Here is a snippet around selecting specific groups. There is a ton of information in the document, and with a little javascript you can do quite a bit. Its worth pulling down and holding onto as a reference.
Selecting Specific Groups
A group number is a zero-based number that represents a group in the request.
Syntax: How to Select Specific Groups
{series: svalue, group: gnumber,
property:value, ..., property:value}
where:
svalue
Defines the series for the selected group.
gnumber
Is a zero-based number. If the group does not exist in the chart, the property is ignored. If a
group number is not specified, the properties are applied to all risers in the series.
property:value
Is a supported series property and its value.
Creating HTML5 Charts With WebFOCUS Language 281
8. Series-Specific Properties
Example: Selecting a Specific Group
The following request generates a vertical bar chart and defines a color for each series. It defines
a different color (red) for group 4 in series 2:
GRAPH FILE WF_RETAIL_LITE
SUM COGS_US GROSS_PROFIT_US REVENUE_US DISCOUNT_US
ACROSS PRODUCT_CATEGORY
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET STYLE *
*GRAPH_JS
series: [
{series: 0, color: 'cyan'},
{series: 1, color: 'green'},
{series: 2, group:4, color: 'red'},
{series: 2, color: 'slateblue'},
{series: 3, color: 'orange'},
]
*END
ENDSTYLE
END
On the output, the series 2 risers are all slate blue except for the red one in group 4:
Eric Woerle 8.1.05M Gen 913- Reporting Server Unix 8.1.05 Client Unix Oracle 11.2.0.2
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013
Because you have two fields on the X axis, rotation doesn't work, because there isn't anything in place to check if it would overlay on the other label. Rotation is intentionally turned off for multiple fields on the same axis. In this case with NOPRINT that wouldn't matter, but that isn't checked for.
Because you have two fields on the X axis, rotation doesn't work, because there isn't anything in place to check if it would overlay on the other label. Rotation is intentionally turned off for multiple fields on the same axis. In this case with NOPRINT that wouldn't matter, but that isn't checked for.
The JS Chart Engine is newish, so it should be able to determine that there is only one visible column on the X axis (the other being used for sorting purposes only, with NOPRINT).
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