

Go  New  Search  Notify  Tools  Reply 
Member 
Hi, My requirement is to have time as measure (y axis) and date as dimension (x axis). Also how do you take average of time, apart from converting it into seconds. Any sample is greatly appreciated. Regards, KRThis message has been edited. Last edited by: rkiran1, Version 8.2.03 Output : HTML, Excel & PDF  

Expert 
A little more information would help. What is the format of your field(s) ? What version of WebFOCUS are you on ? You should update your signature Waz...
 

Member 
I hope the below details helps. 1 . We have time/duration HHIS in one field and category in another, we have to take average of time for all category. Bar graph is the desired output with y axis in time/duration and x axis as category. 2. We have date in YYMD format and want to plot against above time. Finally the user wants the datatext in ##:## format. Thanks, KR Version 8.2.03 Output : HTML, Excel & PDF  

Expert 
Can you do a mock up with one of the sample files ?, Still not getting what you are doing. Have you done a search of Focal Point for, say, "HHIS graph" ? Waz...
 

Virtuoso 
Bar charts are the default type in InfoAssist. Select the data you'd like to use and drage the Date field to the Horizontal Axis and the Time field to the Vertical Axis. That should give you a starting point for what you want. Now if you can make styling changes and so on. WebFOCUS 8206, Unix, Windows  

Member 
The below code worked for me. David Briars code from the below link help me solve my issue Solution * File yaxistime.fex * * Extract data from database. * DEFINE FILE GGSALES * Not part of the technique; create data for testing. NAME/A20 = DECODE SEQ_NO (1 'Francis' 2 'Tony' 3 'David' 4 'Waz'); DATE_START/HYYMDS = DT(2005/12/26 05:45:05.000); DATE_END/HYYMDS = IF SEQ_NO EQ 1 THEN DT(2005/12/26 08:46:06.000) ELSE IF SEQ_NO EQ 2 THEN DT(2005/12/26 07:47:06.000) ELSE IF SEQ_NO EQ 3 THEN DT(2005/12/26 07:47:06.000) ELSE DT(2005/12/26 16:00:00.000) ; END TABLE FILE GGSALES PRINT SEQ NAME COMPUTE MN_DIFF/I9 = HDIFF(DATE_END,DATE_START,'MINUTE','I9'); * IF RECORDLIMIT EQ 4 ON TABLE HOLD AS HLDTIME END RUN * * Create visualization. * GRAPH FILE HLDTIME SUM MN_DIFF AS 'Time Spent Studying' BY NAME AS 'Student' ON GRAPH PCHOLD FORMAT JSCHART ON GRAPH SET LOOKGRAPH VBAR ON GRAPH SET AUTOFIT ON ON GRAPH SET STYLE * *GRAPH_JS title: {text: 'Study Hall Report', visible: true}, subtitle: {text: 'Hours:Minutes Spent Studying Per Student', visible: true} *END *GRAPH_JS yaxis: { numberFormat: function(n){ var hours = Math.floor(Math.abs(n) / 60); var minutes = Math.abs(n) % 60; minutes = (minutes < 10) ? '0' + minutes : minutes return hours + ':' + minutes; }, intervalMode: 'interval', intervalValue: 60 } *END *GRAPH_JS series: [ {series: 'reset', tooltip: function(v, s, g) { var hours = Math.floor(Math.abs(v) / 60); var minutes = Math.abs(v) % 60; minutes = (minutes < 10) ? '0' + minutes : minutes var time = hours + ':' + minutes; return 'Name: ' + this.getGroupLabel(g) + '<br/>Time: ' + time;}} ] *END ENDSTYLE END Version 8.2.03 Output : HTML, Excel & PDF  

Master 
KR, Excellent FocalPoint researching and post follow up. :) Dave  

Powered by Social Strata 
Please Wait. Your request is being processed... 