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]Suppress zero data points on a line graph

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Suppress zero data points on a line graph
 Login/Join
 
Silver Member
posted
Is there anyway to suppress the zero data points on a line graph? The graph I am creating is for last year over this year of gross transactions (sales). The last three months of this year are plotting as zero on the line graph. Here is the code with some things I have tried
 -SET &ECHO=ALL;
-SET &CRYR = EDIT(&YYMD,'9999');
-SET &CM = EDIT(&YYMD,'$$$$99');
-SET &PRIOR_YYMD = DATECVT(DATEADD(DATECVT(&YYMD, 'I8YYMD', 'YYMD'),'YR',-1),'YYMD', 'I8YYMD');
-SET &PRYR = EDIT(&PRIOR_YYMD,'9999');
-SET &PM = EDIT(&CM-1);

JOIN
 TRANSACTIONS.T1_TRANSACTIONS.SITEKEY IN TRANSACTIONS TO MULTIPLE
 SITE.SITE.SITEKEY IN SITE TAG J0 AS J0
 END
DEFINE FILE TRANSACTIONS
PURCHAMTPY/D12.2S MISSING ON NEEDS ALL DATA=IF TRANSACTIONS.T2_DATE.CALENDARYEAR EQ &PRYR THEN (TRANSACTIONS.T1_TRANSACTIONS.PURCHASEAMOUNT/1000) ELSE .;
PURCHAMTCY/D12.2S MISSING ON NEEDS SOME DATA=IF TRANSACTIONS.T2_DATE.CALENDARYEAR EQ &CRYR AND TRANSACTIONS.T2_DATE.MONTHOFYEAR LE &PM THEN (TRANSACTIONS.T1_TRANSACTIONS.PURCHASEAMOUNT/1000) ELSE .;
END
-*Do not delete or modify the comments below
*-INTERNAL_COMMENT LINE#0$CjxSb290IHZlcnNpb249IjEuMCIgPgogICA8T2JqZWN0IG9iamVjdElkPSJHTE9CQUwiID4KICAgICAgPFByb3BlcnR5IG5hbWU9IlNhbXBsZURhdGEiIHR5cGU9ImphdmEubGFuZy5Cb29sZWFuIiA+ZmFsc2U8L1Byb3BlcnR5PgogICAgICA8UHJvcGVydHkgbmFtZT0iR2xvYmFsUmVjb3JkTGltaXQiIHR5cGU9ImphdmEubGFuZy5TdHJpbmciID41MDA8L1Byb3BlcnR5PgogICAgICA8UHJvcGVydHkgbmFtZT0iR2xvYmFsUnVuUmVjb3JkTGltaXQiIHR5cGU9ImphdmEubGFuZy5TdHJpbmciID4wPC9Qcm9wZXJ0eT4KICAgICAgPFByb3BlcnR5IG5hbWU9ImZpZWxkRGlzcGxheU1vZGUiIHR5cGU9ImphdmEubGFuZy5TdHJpbmciID5sYWJlbDwvUHJvcGVydHk+CiAgICAgIDxQcm9wZXJ0eSBuYW1lPSJwcmVmaXhEaXNwbGF5TW9kZSIgdHlwZT0iamF2YS5sYW5nLlN0cmluZyIgPjwvUHJvcGVydHk+CiAgICAgIDxQcm9wZXJ0eSBuYW1lPSJlbmFibGVQcmV2aWV3IiB0eXBlPSJqYXZhLmxhbmcuQm9vbGVhbiIgPnRydWU8L1Byb3BlcnR5PgogICAgICA8UHJvcGVydHkgbmFtZT0iRm9jZXhlY1ByZWZlcmVuY2VzIiB0eXBlPSJNYXAiID4KICAgICAgICAgPEVudHJ5IGtleT0iZGVmYXVsdF90YWJsZV9mb3JtYXQiIHR5cGU9ImphdmEubGFuZy5TdHJpbmciID5IVE1MPC9FbnRyeT4KICAgICAgICAgPEVudHJ5IGtleT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IgPnRydWU8L0VudHJ5PgogICAgICAgICA8RW50cnkga2V5PSJkaXNwbGF5U2xpY2Vyc1RhYkludGVyYWN0aXZlSW5mb01pbmlQcmVmZXJlbmNlIiB0eXBlPSJqYXZhLmxhbmcuU3RyaW5nIiA+dHJ1ZTwvRW50cnk+CiAgICAgICAgIDxFbnRyeSBrZXk9ImRpc3BsYXlMYXlvdXRUYWJJbmZvTWluaVByZWZlcmVuY2UiIHR5cGU9ImphdmEubGFuZy5TdHJpbmciID5mYWxzZTwvRW50cnk+CiAgICAgIDwvUHJvcGVydHk+CiAgICAgIDxQcm9wZXJ0eSBuYW1lPSJjYXNjYWRlTmFtZXMiIHR5cGU9Ik1hcCIgPjwvUHJvcGVydHk+CiAgICAgIDxQcm9wZXJ0eSBuYW1lPSJNYXN0ZXJfRmlsZXMiIHR5cGU9IlNldCIgPgogICAgICAgICA8RW50cnkgdHlwZT0iamF2YS5sYW5nLlN0cmluZyIgPlRSQU5TQUNUSU9OUzwvRW50cnk+CiAgICAgIDwvUHJvcGVydHk+CiAgIDwvT2JqZWN0Pgo8L1Jvb3Q+
-*Do not delete or modify the comments above
GRAPH FILE TRANSACTIONS
-* Created by Advanced Graph Assistant
SUM TRANSACTIONS.T2_DATE.PURCHAMTPY
TRANSACTIONS.T2_DATE.PURCHAMTCY
BY TRANSACTIONS.T2_DATE.MONTHOFYEAR
WHERE J0.SITE.PRODUCT EQ 'OVE';
WHERE TRANSACTIONS.T2_DATE.MONTHOFYEAR NE 0;
HEADING
"OVE Gross Transactions"
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HAXIS 770
ON GRAPH SET VAXIS 405
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET GRID ON
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBISouthWestern.txt");
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDepthRadius(5);
setTransparentBorderColor(getChartBackground(),true);
setTransparentBorderColor(getSeries(0),true);
setTransparentBorderColor(getSeries(1),true);
setTransparentBorderColor(getSeries(2),true);
setTransparentBorderColor(getSeries(3),true);
setTransparentBorderColor(getSeries(4),true);
setTransparentBorderColor(getSeries(5),true);
setTransparentBorderColor(getSeries(6),true);
setTransparentBorderColor(getSeries(7),true);
setTransparentBorderColor(getSeries(8),true);
setTransparentBorderColor(getSeries(9),true);
setTransparentBorderColor(getSeries(10),true);
setMarkerDisplay(true);
setConnectLineMarkers(true);
setConnectScatterMarkers(true);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setAxisAssignment(1,0);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setLegendDisplay(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setPlace(true);
setZeroValueDataTextDisplay(false);
setScaleFromZero(false);
ENDSTYLE
ON GRAPH SET STYLE *
TYPE=HEADING, LINE=1, JUSTIFY=CENTER, $
TYPE=HEADING, LINE=1, ITEM=1, OBJECT=TEXT, FONT='TREBUCHET MS', COLOR=RGB(0 0 0), $
ENDSTYLE
END

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


release 7.7.03M
OS - Linux
HTML, PDF, Excel, Delimited files, Graphs, Dashboards, MRE, Report Caster
 
Posts: 35 | Registered: December 13, 2011Report This Post
Virtuoso
posted Hide Post
Not sure how you want to handle the zero values, but setFillMissingData might help:

setFillMissingData(value);

where: value
Can be one of the following:
0 skips missing data. 0 is the default value.
1 sets missing data to zero.
2 interpolates.


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Silver Member
posted Hide Post
quote:
setFillMissingData(value);

Tried this but unfortunately, October November and December of this year are appearing in the 2012 line as zero data points.
I am wondering if I have to rethink the define fields...but I can't seem to wrap my brain around it.


release 7.7.03M
OS - Linux
HTML, PDF, Excel, Delimited files, Graphs, Dashboards, MRE, Report Caster
 
Posts: 35 | Registered: December 13, 2011Report This Post
Expert
posted Hide Post
Another option is to use setY1OffScaleDisplay(false);

If the value is outside the scale, then it will not be shown.

e.g.
GRAPH FILE CAR
SUM 
    COMPUTE Sales/I9 = IF SALES EQ 0 THEN -1 ELSE SALES ;
BY CAR
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET GRAPHSTYLE *
setY1ScaleMin(0.0);
setY1ScaleMinAuto(false);
setY1OffScaleDisplay(false);
ENDSTYLE
END


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Silver Member
posted Hide Post
quote:
setY1ScaleMin(0.0);
setY1ScaleMinAuto(false);
setY1OffScaleDisplay(false);


AWESOME - that did it! Thanks!

Is there a way to find this in the Advance Graph Assistant GUI? For future reference.

Thanks, again!


release 7.7.03M
OS - Linux
HTML, PDF, Excel, Delimited files, Graphs, Dashboards, MRE, Report Caster
 
Posts: 35 | Registered: December 13, 2011Report 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]Suppress zero data points on a line graph

Copyright © 1996-2020 Information Builders