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] Time as measure (y axis) and day as dimension (x axis)
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Time as measure (y axis) and day as dimension (x axis)
 Login/Join
 
Member
posted
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,
KR

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


Version 8.2.03
Output : HTML, Excel & PDF
 
Posts: 21 | Registered: April 15, 2019Reply With QuoteReport This Post
Expert
posted Hide Post
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...

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

 
Posts: 6252 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Reply With QuoteReport This Post
Member
posted Hide Post
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
 
Posts: 21 | Registered: April 15, 2019Reply With QuoteReport This Post
Expert
posted Hide Post
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...

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

 
Posts: 6252 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Reply With QuoteReport This Post
Virtuoso
posted Hide Post
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
 
Posts: 1822 | Location: New York City | Registered: December 30, 2015Reply With QuoteReport This Post
Member
posted Hide Post
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
 
Posts: 21 | Registered: April 15, 2019Reply With QuoteReport This Post
Master
posted Hide Post
KR,

Excellent FocalPoint researching and post follow up.

:-)

-Dave




Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2012/Tomcat Standalone Workstation: Windows 7/IE 11 Database: Oracle 12c/Netezza Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer, & ReportCaster

 
Posts: 789 | Registered: April 23, 2003Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Time as measure (y axis) and day as dimension (x axis)

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