Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] 2 graphs displayed when there is no BY field?
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] 2 graphs displayed when there is no BY field?
 Login/Join
 
Guru
posted
I am sorry but I cannot recreate the problem using the CARS file.

For some reason, I am getting 2 graphs when I don't have a BY field. It graphs the 1st category with the rest of the categories as nulls (y-axis = 0) and then it creates another graph with the 1st category values having nulls and then the rest of the categories being okay. It is super wierd.

Okay, so this is the gist of the program... I have 2 tables that I join together. The first table contains data on certain dates. But, since I want to graph ALL dates regardless of whether it has data or not, I joined it with another table that has all the date categories. I made sure ALL is set to PASS and I have a Left-Outer join on the category table.

So then I create a stacked bar graph. The y-axis is a count of the number of records in the data table for each date category. It should be 0 when null.

Here's my code:
SET ALL=PASS
JOIN LEFT_OUTER PRD_START_DATE IN HOLDCAL TO ALL PRD_START_DATE IN HOLDMET AS J0
END
-RUN

DEFINE FILE HOLDCAL
WEEKNO/I2=HPART(PRD_START_DATE, 'WEEK', WEEKNO);
PRDSTART/A20=HCNVRT(PRD_START_DATE,'(HYYMDS)',20,'A20');
PRDSTXT/A10=SUBSTR(20,PRDSTART,1,10,10,PRDSTXT);
WEEKLBL/A30='Week ' | EDIT(WEEKNO) | ' ' | EDIT(PRDSTXT,'$$$$$999') | EDIT(PRDSTXT,'$$$$$$$$99') | '/' | EDIT(PRDSTXT,'$$99');
ONTIME/I5=IF HDIFF(DATE_CLOSED, DUE_DATE, 'DAY', 'D12') GT 0 THEN 0 ELSE 1;
LATE/I5=IF HDIFF(DATE_CLOSED, DUE_DATE, 'DAY', 'D12') GT 0 THEN 1 ELSE 0;
END
GRAPH FILE HOLDCAL
SUM CNT.ITEM_ID AS 'Items Closed'
    ONTIME AS 'Items On Time'
    LATE AS 'Items Late'
ACROSS WEEKLBL AS 'Periods'
ON GRAPH SET LOOKGRAPH VBRSTK1
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB ON
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
setFillColor(getLegendArea(),new Color(214,214,214));
setTitleString("Non-Project Throughput Trend for &MGRTEAMLBL ");
setMarkerDisplay(true);
setConnectLineMarkers(true);
setConnectScatterMarkers(true);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(false);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setSeriesType(0,2);
setAxisAssignment(1,0);
setSeriesType(1,1);
setAxisAssignment(2,0);
setSeriesType(2,1);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MustIncludeZero(true);
setY1AxisLineDisplay(true);
setY1ZeroLineDisplay(true);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setLegendDisplay(true);
setTextJustHoriz(getTitle(),1);
setFontSizeAbsolute(getTitle(),true);
setFontSize(getTitle(),16);
setTextRotation(getTitle(),0);
setTextWrap(getTitle(),true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setTextJustHoriz(getO1Title(),1);
setFontSizeAbsolute(getO1Title(),true);
setFontSize(getO1Title(),12);
setTextRotation(getO1Title(),0);
setTextWrap(getO1Title(),false);
setTextJustHoriz(getO1Label(),1);
setFontSizeAbsolute(getO1Label(),true);
setFontSize(getO1Label(),12);
setTextRotation(getO1Label(),0);
setTextWrap(getO1Label(),true);
setPlaceResize(getTitle(),0);
setPlaceRotate(getTitle(),0);
setPlaceAlign(getTitle(),0);
setPlaceWordWrap(getTitle(),0);
setPlaceResize(getO1Title(),0);
setPlaceRotate(getO1Title(),0);
setPlaceAlign(getO1Title(),0);
setPlaceWordWrap(getO1Title(),0);
setPlaceResize(getO1Label(),0);
setPlaceRotate(getO1Label(),0);
setPlaceAlign(getO1Label(),0);
setPlaceWordWrap(getO1Label(),0);
setPlace(true);
ENDSTYLE
ON GRAPH SET STYLE *
     PAGESIZE='Letter',
     LEFTMARGIN=0.250000,
     RIGHTMARGIN=0.250000,
     TOPMARGIN=0.250000,
     BOTTOMMARGIN=0.250000,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
     TITLETEXT=' Non-Project Weekly Throughput Trend',
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=12,
     COLOR=RGB(210 232 255),
     BACKCOLOR=RGB(214 214 214),
     STYLE=NORMAL,
     RIGHTGAP=0.125000,
$
TYPE=DATA,
     ACROSSCOLUMN=N1,
     COLOR='YELLOW',
$
TYPE=DATA,
     ACROSSCOLUMN=N2,
     COLOR='NAVY BLUE',
$
TYPE=DATA,
     ACROSSCOLUMN=N3,
     COLOR='MAROON',
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
$
TYPE=FOOTING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
$
ENDSTYLE
END


Any ideas?

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


WF 8.1.05 Windows
 
Posts: 330 | Location: Orlando, FL | Registered: October 17, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
Check out: GRMERGE
 
Posts: 2967 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Guru
posted Hide Post
Yes, I know about GRMERGE...

BUT, I am not supposed to get two graphs because I don't have any BY fields!

There is something wierd about this and I can't figure out what could possibly cause 2 graphs to get created when you don't have a BY field...


WF 8.1.05 Windows
 
Posts: 330 | Location: Orlando, FL | Registered: October 17, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
Just a thought....

If you TABLE and HOLD the data before graphing, does it work.

May be something with the GRAPH command, and the join.

Pure guess only.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.05OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6072 | Location: Land of the Darug people, Terra Australis Incognita | Registered: October 31, 2006Reply With QuoteReport This Post
Guru
posted Hide Post
Yes, I can table and hold the data and it comes out exactly as I expect.

I even have an Excel Output format option that feeds the data to an Excel spreadsheet and an Excel macro runs on worksheet_open that builds the chart in Excel. That works perfectly fine too.


WF 8.1.05 Windows
 
Posts: 330 | Location: Orlando, FL | Registered: October 17, 2006Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] 2 graphs displayed when there is no BY field?

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.