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     [SOLVED] Time as measure (y axis) and day as dimension (x axis)

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[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: 23 | Registered: April 15, 2019Report 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.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report 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: 23 | Registered: April 15, 2019Report 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.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report 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: 1853 | Location: New York City | Registered: December 30, 2015Report 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: 23 | Registered: April 15, 2019Report This Post
Master
posted Hide Post
KR,

Excellent FocalPoint researching and post follow up.

:-)

-Dave




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
 
Posts: 822 | Registered: April 23, 2003Report 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     [SOLVED] Time as measure (y axis) and day as dimension (x axis)

Copyright © 1996-2020 Information Builders