I know this has been asked before, but from what I can tell it has been a few years since it has been discussed.
Does anyone know if you can reproduce a chart that looks and functions like a Gantt chart? If so can someone supply an example. I am using version 7.6.5.
It is my understanding and according to documentation you can. If you use Advanced Graph Assistant...it should have a Graphtype of Gantt. I've never done it...but is there. SET LOOKGRAPH=GANTT
In Focus since 1993. WebFOCUS 7.7.03 Win 2003
August 11, 2008, 10:28 AM
<JG>
Prarie, Yes that setting is doicumented but I do not think that it actually works.
The only documentation that I can find is
"Provides a visual representation of project oriented time critical events. Gantt charts require six display fields and one sort field, in that order. Conditional styling and drill-down are not supported for GANTT charts."
However an example associated with an IB MIP still does not work (the focus short db is in IBISAMP)
GRAPH FILE SHORT SUM ARGENTINA_PESO BRAZIL_REAL CANADA_DOLLAR GUATEMALA_QUETZAL HONDURAS_LEMPIRAS MEXICO_PESO ACROSS CONTINENT ON GRAPH SET LOOKGRAPH GANTT END
August 11, 2008, 10:46 AM
jelli4908
Thanks for the info JG. I can confirm that setting LOOKGRAPH to GANTT does not work.
Checking back on the trial I was attempting in 2005 and I found that it didn't work (dates and non dates ), so looking through old libraries I have I found this which does actually produce a graph in 7.6.2 but the axis doesn't display the date format correctly. Anyway, FWIW -
SET HOLDLIST = PRINTONLY
APP FI GANTT DISK GANTT.MAS (LRECL 80
-RUN
-WRITE GANTT
-WRITE GANTT FILE=GANTT,SUFFIX=FOC
-WRITE GANTT SEGNAME=SEG1
-WRITE GANTT FIELD=AREA,,A15,A15,$
-WRITE GANTT FIELD=TASK,,A27,A27,$
-WRITE GANTT FIELD=BEGDATE,,YYMD,YYMD,$
-WRITE GANTT FIELD=ENDDATE,,YYMD,YYMD,$
-RUN
CREATE FILE GANTT
MODIFY FILE GANTT
FIXFORM AREA/A15 TASK/A27 BEGDATE/A8 ENDDATE/A8
DATA
Engineering 1 Site Survey 2000101820001115
Engineering 2 Draft Survey Results 2000101820001204
Engineering 3 GMBH Review 2000120420001229
Engineering 4 Survey RPT (Final) 2001010120010122
Engineering 5 GMBH RFV Approval 2001010320010206
Engineering 6 System Design 2001021420010320
Engineering 7 HMBC Review 2001032020010404
Engineering 8 Bid and Award 2001040420010604
Engineering 9 Construction Support 2001042720010905
END
-RUN
DEFINE FILE GANTT
CURRDATE/YYMD = 20010113;
END
TABLE FILE GANTT
SUM MAX.ENDDATE/I8
MIN.BEGDATE/I8
MAX.CURRDATE/I8
ON TABLE SAVE FORMAT ALPHA
END
-RUN
-READ SAVE X4 &MaxDate.A8. X4 &MinDate.A8. X4 &CurrDate.A8.
-SET &MinDate = &MinDate - 14;
-SET &MaxDate = &MaxDate + 14;
-SET &CurrDate = &CurrDate + 0;
-RUN
DEFINE FILE GANTT ADD
OFFSET/I9 = &MinDate + 14;
DURATION/I9 = ENDDATE - BEGDATE;
REMAIN/I9 = IF ENDDATE LT CURRDATE THEN 0
ELSE IF CURRDATE FROM BEGDATE TO ENDDATE THEN ENDDATE - CURRDATE
ELSE DURATION ;
BEGIN/I9 = BEGDATE - OFFSET;
COMPLETED/I9 = IF ENDDATE LT CURRDATE THEN DURATION
ELSE IF CURRDATE FROM BEGDATE TO ENDDATE THEN CURRDATE - BEGDATE
ELSE 0 ;
END
GRAPH FILE GANTT
SUM OFFSET
BEGIN
COMPLETED
REMAIN
BY TASK
ON GRAPH SET GRAPHEDIT OFF
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET GRID ON
ON GRAPH SET GRMERGE ON
ON GRAPH SET GRAPHSTYLE *
setGraphType(25);
setTransparentFillColor(getSeries(0), true);
setTransparentBorderColor(getSeries(0), true);
setSeriesLabel(0, "");
setTransparentFillColor(getSeries(1), true);
setTransparentBorderColor(getSeries(1), true);
setSeriesLabel(1, "");
-* Y1 scale
setY1ScaleMaxAuto(false);
setY1ScaleMax(&MaxDate);
setY1ScaleMinAuto(false);
setY1ScaleMin(&MinDate);
setTextFormatPreset(getY1Scale, 19);
setUseTimeScaleAxis(true);
END
TABLE FILE GANTT
SUM OFFSET DURATION
BEGIN BEGDATE ENDDATE
COMPLETED
REMAIN
BY TASK
END
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
August 12, 2008, 06:02 AM
Danny-SRL
This is what it looks like:
The bars are a function of the dates. I used the CAR file and created some fictitious dates. The output is produced by TABLE. The bars are generated from IBI pixels:
where hh and ww are variables containing the number of pixels for the thickness and the length of the bar.
My example is a bit complex because I had to show how to insert a "today" black mark so each bar is composed of 3, from start to today, today, from today to end.
Also by clicking on a country, the gantt adds another level of detail.
I can try and create a more simple example.This message has been edited. Last edited by: Danny-SRL,
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
August 12, 2008, 06:56 AM
Tony A
Danny,
Very unlike you to leave an image pointing to localhost!!
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
August 12, 2008, 03:22 PM
susannah
have a read on this its a very simple technique that produces a variant on the GRAPHTYPE concept that you can use to create GANTTs. You'll be creating your underlying matrix with a table and alot of .css.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
August 13, 2008, 02:00 AM
Danny-SRL
Tony,
Ooooops! I didn't realize that the forum would insert the URL. I thought it would use it to copy the image.
So, I should put it on a web site somewhere...
Done (I hope)!This message has been edited. Last edited by: Danny-SRL,
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
August 13, 2008, 02:55 AM
Tony A
Daany,
That's better and a good alternative to the "normal" Gantt chart. Great display of "thinking outside the box". Having seen the output (now ) I can probably work out the code - a good chance to get the grey cells working
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
August 13, 2008, 05:38 AM
Danny-SRL
Tony,
Thanks for the "heads up". As you can gather, the output is from TABLE. Here is a little peek on the code: TDY= today's date SDATE=start date of the work element EDATE=end date of the work element BARCOL=bar color of the work element BT1, BT2, BT3 are lengths of the bar pieces &HT is the bar height &XT is the height of today's black mark
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
August 13, 2008, 08:19 AM
Tony A
Thanks Danny, but I already had that code which is basically what Susannah uses in her article (link in Susannah's post above) from 2004(?). Nice to see her methods reused.
Always a good method to use and one I have taken advantage of many times!
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
August 18, 2008, 11:51 AM
Doug
I hope you don't mind if I add this to my library...
In FOCUS Since 1983 ~ from FOCUS to WebFOCUS. Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
August 18, 2008, 02:01 PM
jelli4908
Danny,
Thank you for you ideas. I understand the 'gantt' part of the chart. I am however having a problem understanding where the time scale at the top of the 'graph' comes from. Can you please post the code on how you did this?
&SDATE is the start date of the retrieval &EDATE is the end date of the retrieval &TDY is today's date &MAXWKS is the number of ticks between the min start date and the maximum end date of all operations &INTRVAL is interval in days between ticks &NDASH is the number of dashes between dates, depending upon the scale (&SC) chosen - in this example &SC=4 &ST is the height of the tick on the time scale &HT is the height of the time scale bar
I hope I didn't forget anything. This code is 5 years old +/-.
If you want, I can send you the whole fex and the data files...
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
August 18, 2008, 05:00 PM
FrankDutch
Great idea...I'm going to use this for an overall report based on a project and time registration database of our IT department.!!! They need a report and they are not able to create something themselves...
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
August 19, 2008, 12:59 AM
Danny-SRL
Frank,
Thanks. If you want all the code and the data files, just ask.
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
August 19, 2008, 08:38 AM
jelli4908
Daniel,
Can you send me the fex? I'm not sure of the best way to deliver this though.
Suggestion: If you use DM to factor out the recurring SRC=" ... .gif" code, Dan's (Susannah's) COMPUTE code becomes appreciably more succinct and maintainable.
If you want, I can send you the whole fex and the data files...
If you don't mind Daniel, I would LOVE the sample fex. I'll PM you in a moment.
There are not many threads on Gantt Charts, and this post seems to be the only one with a solution.
I know this is a 'vintage post', but many belated thanks to the contributors. :-)
Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster
May 03, 2016, 12:50 AM
Vivian
You rock Susannah! and Danny too!
Vivian Perlmutter Aviter, Inc.
WebFOCUS Keysheet Rel. 8.0.2 (Almost) 1001 Ways to Work with Dates thru Rel. 8.0.2 Focus since 1982 WebFOCUS since the beginning Vivian@aviter.com
May 03, 2016, 02:06 PM
Tim P.
I kinda wonder if at this point it would be easier to just use google charts to build it. I know their visualization tool has that chart type in it, although it wouldn't be "IBI approved".
The only challenging part would be to get the data out of WF and into the right formats for it to read into the graph.
WebFOCUS App Studio 8.2.02 Windows 7, All Outputs
May 03, 2016, 03:54 PM
GavinL
D3 Charts are IBI approved and are actually easily added in 8.2..