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     [CLOSED] how to show Average bar in graph

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] how to show Average bar in graph
 Login/Join
 
Platinum Member
posted
Hello,

I have bar graph which percentage of minutes - group by different status ( like down, setup) and it is plotted against each day.
But want to show the total average minutes of all the day by different status - how can add the average bar at the end of report (means after all the days graph are plotted).

Thanks in advance.
Let me know if you have any questions.

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


WF 7.6.2/ OS WIN2003.
DM 7.6.2
 
Posts: 103 | Registered: September 08, 2006Report This Post
<JG>
posted
First to make the graph appear more readable I would definately not show the average as a bar
I would show it as a reference line.

That way at a single glance you can see exactly what is above/below average.

Search the forum for graph and reference line and you will find exactly the answer you need.

but a hint, pre calulate the average, read it into a variable and then use a couple of API calls to set the line
 
Report This Post
Master
posted Hide Post
This is sample code for a bar graph with the average as a line graph. If you check the stylesheet, anything that references (5) is controlling the line.

-* Created by Graph Assistant
-* HTML Tool
-* Created by Graph Assistant
-* FF Line do not change this line! Field Name
-* FF Line do not change this line! Alias
-* FF Line do not change this line! Format
-* FF Line do not change this line! Segment
-* FF Line do not change this line! UseAlias
DEFINE FILE TENDERTRACK
-* DEFINE BEGIN T_DATE
T_DATE/MtYY = TENDERTRACK.TENDERTRACK.ISSUEDBYCUSTOMER;
APR_CNT/I8=IF REGION CONTAINS 'APR' THEN 1 ELSE 0;
EAR_CNT/I8=IF REGION CONTAINS 'EAR' THEN 1 ELSE 0;
LAR_CNT/I8=IF REGION CONTAINS 'LAR' THEN 1 ELSE 0;
MER_CNT/I8=IF REGION CONTAINS 'MER' THEN 1 ELSE 0;
UNKWN/I8=IF APR_CNT EQ 0 AND EAR_CNT EQ 0 AND LAR_CNT EQ 0 AND MER_CNT EQ 0 THEN 1 ELSE 0;
END
TABLE FILE TENDERTRACK
SUM
APR_CNT
EAR_CNT
LAR_CNT
MER_CNT
COMPUTE AVG/D12.2 = (APR_CNT + EAR_CNT + LAR_CNT + MER_CNT)/4;

-* UNKWN AS 'UNKNOWN'
BY T_DATE
&WHR1.EVAL
&WHR2.EVAL

ON TABLE HOLD AS THOLD1
END
-*
GRAPH FILE THOLD1
PRINT
APR_CNT AS 'APR'
EAR_CNT AS 'EAR'
LAR_CNT AS 'LAR'
MER_CNT AS 'MER'
AVG
ACROSS T_DATE AS ''


ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET 3D OFF
ON GRAPH SET BARNUMB OFF
ON GRAPH SET GRID ON
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET GRMERGE ON
ON GRAPH SET VZERO ON
ON GRAPH SET VAXIS 560
ON GRAPH SET HAXIS 1100
ON GRAPH SET GRAPHSTYLE *
-* setTemplateFile("/images/tdg/template/IBITrueColors.txt");
-* setGraphType(20);
setSeriesType(0,1);
setLegendDisplay(true);
setLegendMarkerPosition(0);
setMarkerDisplay(true);
setUseSeriesShapes(false);
setConnectLineMarkers(true);
setConnectScatterMarkers(true);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(4);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setSeriesType(0,1);
setAxisAssignment(1,0);
setSeriesType(1,1);
setAxisAssignment(4,1);
setSeriesType(4,2);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),1);
setDataTextDisplay(true);
setCustomDataText(getSeries(0), true);
setCustomDataText(getSeries(1), true);
setCustomDataText(getSeries(2), true);
setCustomDataText(getSeries(3), true);
setCustomDataText(getSeries(4), true);
setCustomDataText(getSeries(5), true);
setDisplay(getDataText(0), false);
setDisplay(getDataText(1), false);
setDisplay(getDataText(2), false);
setDisplay(getDataText(3), false);
setDisplay(getDataText(4), false);
setDisplay(getDataText(5), true);
setTextFormatPreset(getDataText(2),2);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setTextJustHoriz(getO1Label(),2);
setFontSizeAbsolute(getO1Label(),true);
setFontSize(getO1Label(),12);
setTextRotation(getO1Label(),3);
setTextWrap(getO1Label(),false);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
ENDSTYLE
ON GRAPH SET STYLE *

TYPE=DATA,
FIELD=APR_CNT,
COLOR=RED,
$
TYPE=DATA,
FIELD=EAR_CNT,
COLOR=PURPLE,
$
TYPE=DATA,
FIELD=LAR_CNT,
COLOR=RGB(255 215 0),
$
TYPE=DATA,
FIELD=MER_CNT,
COLOR=GREEN,
$
TYPE=DATA,
FIELD=AVG,
COLOR=NAVY,
$
ENDSTYLE
ON GRAPH PCHOLD FORMAT HTML
END
-EXIT


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report This Post
Platinum Member
posted Hide Post
Thank you all for your suggestion.

Let me try to put in the code and let you know the result.

Once again Thanks to all.


WF 7.6.2/ OS WIN2003.
DM 7.6.2
 
Posts: 103 | Registered: September 08, 2006Report This Post
Platinum Member
posted Hide Post
I have tried
here is my fex code

-IF '&TIME_UNIT.EVAL' EQ 'D' THEN GOTO ASSIGN_DAY;
-IF '&TIME_UNIT.EVAL' EQ 'W' THEN GOTO ASSIGN_WEEK;

-ASSIGN_DAY
-SET &ACROSS01 = 'ACROSS DAYFMT AS ' || ' ''' || '''';
-SET &WITHIN01 = 'DAYFMT';
-GOTO END_ACROSS

-ASSIGN_WEEK
-SET &ACROSS01 = 'ACROSS WEEKFMT AS ' || ' ''' || '''';
-SET &WITHIN01 = 'WEEKFMT';
-GOTO END_ACROSS

-END_ACROSS

GRAPH FILE TEMPHLD
SUM PCT.NEWMINUTES AS ''
NEW_FINISHED AS 'WFR'
&ACROSS01
BY STATUS_RANK NOPRINT
BY STATUS
ON GRAPH SET LOOKGRAPH VBRSTK2
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH SET GRMERGE ON
ON GRAPH SET HAXIS 625
ON GRAPH SET VAXIS 250
ON GRAPH PCHOLD FORMAT JPEG
ON GRAPH SET GRAPHSTYLE *
-------------------------------
Now when adding the avg minutes graph doesn't work.
Looking for Avg. minutes by Status field
for All the days or weeks are plotted on the graph.

so each day/week there will be minutes stack up by status, also line grpah for "wfr" for

Thanks,
Viral.


WF 7.6.2/ OS WIN2003.
DM 7.6.2
 
Posts: 103 | Registered: September 08, 2006Report This Post
Platinum Member
posted Hide Post
Hello,

I am trying again if anybody think if possible to show avg. grpah bar at the end of the other bar.

Like following is my data set

7/12/09 7/13/09 7/14/09 Avg
stat
Run 10 40 7 19
Stop 15 10 14 13
Down 45 05 25 25
Setup 9 21 30 20

Across field date will be dynamic depends on the user selection

Now need to plot which each day one bar which stack up by different states like "Run", "Stop".
At end of graph 7/12 , 7/13, 7/14 it will have Ave bar which be stack by different states.

To get above data set by using following code.


TABLE FILE THEDATA1
SUM AVE.NEWMINS NOPRINT
BY STATUS_PCT
SUM NEWMINS AS ''
BY STATUS_PCT ROWS 'Running%' OVER 'Idle%' OVER 'PM%' OVER 'Setup%' OVER 'Maint%' OVER 'Other%' OVER 'Stop%' OVER 'Offline%' OVER 'Down%'

&ACROSS01
COMPUTE AVERC/D7.2=C1; AS 'Ave'
END

Is anybody has done similar type request before or any idea ?

Thanks,


WF 7.6.2/ OS WIN2003.
DM 7.6.2
 
Posts: 103 | Registered: September 08, 2006Report This Post
Expert
posted Hide Post
Interesting... Did you ever get your solution? If so, please post it. If not, let me know - I think I have a solution. But, please elaborate on your data set.




   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, 2005Report 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     [CLOSED] how to show Average bar in graph

Copyright © 1996-2020 Information Builders