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]Graphing Time

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]Graphing Time
 Login/Join
 
Platinum Member
posted
In WF8, I'm trying to graph a time field by date on a vertical bar chart. I've tried a few different formats for time but none of them seem to work. The report just shows up blank with no data.

Has anyone tried this before? Is there a specific format I have to use? I feel like this should be a simple thing to do but it is escaping me.

This message has been edited. Last edited by: <Emily McAllister>,


WebFOCUS App Studio 8.2.02
Windows 7, All Outputs
 
Posts: 141 | Location: Mclean, VA | Registered: December 04, 2012Report This Post
Virtuoso
posted Hide Post
Have you tried to convert the time field as a plain text (using FPRINT) ?


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Platinum Member
posted Hide Post
I have to be honest I'm a bit naïve on FPRINT but I can give it a shot.


WebFOCUS App Studio 8.2.02
Windows 7, All Outputs
 
Posts: 141 | Location: Mclean, VA | Registered: December 04, 2012Report This Post
Virtuoso
posted Hide Post
But attention on the fact that it will become an alpha, so it will be ordered alphabetically.
You may need to add a BY ... NOPRINT using the original value (time field) to have it in the proper order on the graph.
Such as:
BY time_fld NOPRINT
BY time_fld_x

Tim, you have changed your original post, so the request is not exactly the same as it was when I first answer and may not respond to your request.

Can you be more specific and give us a sample of what is your issue ?


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Platinum Member
posted Hide Post
Sorry hopping back on this. What should happen is there is a 1:1 relationship between date and time. Date was MDYY and time was, I think, HHIS1. I figured I could just bring out time by date and it would be fine but that doesn't seem to be the case. Any ideas?

There is no other criteria for HOLD_TIME, just two fields.

 ENGINE INT CACHE SET ON
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE HOLD_TIME
-* Created by Info Assist for Graph
SUM
	TIME
BY DATE
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
setUseSeriesShapes(true);
setMarkerSizeDefault(50);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
*END
ENDSTYLE
END
-RUN 


WebFOCUS App Studio 8.2.02
Windows 7, All Outputs
 
Posts: 141 | Location: Mclean, VA | Registered: December 04, 2012Report This Post
<Emily McAllister>
posted
Hello Tim,

I spoke with one of our graphing experts about this and he is not sure why this wouldn't work for you. His theory is that there may be something in your dataset causing this issue. Can you replicate something similar with a test file like CAR or WF_RETAIL?

Thanks,
Emily McAllister
Focal Point Moderator
 
Report This Post
Master
posted Hide Post
I'm going to ressurect this thread as I'm having the same issue. please find below an example using CAR

TABLE FILE CAR
PRINT  
	COMPUTE TIME_STRT/HHIS='00:00:00';
	COMPUTE DTE/YYMD=&YYMD;
	COMPUTE TIME/HHIS = HADD(TIME_STRT,'MINUTE',SEAT,8,'HHIS');
	COMPUTE DATE/YYMD=DATEADD(DTE,'DAY',MPG);
BY CAR
ON TABLE HOLD AS TIME_TEST
END

-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
GRAPH FILE TIME_TEST
-* Created by Info Assist for Graph
SUM TIME
BY DATE
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0); 
setCurveFitEquationDisplay(false); 
setPlace(true); 
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT='WebFOCUS Report', $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setSeriesType(0,2);
setSeriesType(1,2);
setSeriesType(2,2);
setSeriesType(3,1);
*END
*GRAPH_JS
yaxis: {mode: 'time'}
*END
ENDSTYLE
END  


I did find that removing the "ON GRAPH PCHOLD FORMAT JSCHART" Allowed the graph to work properly, but as Francis points out in this thread: Graph Y-axis label format for HHIS (time), The y-axis has a AM/PM designation. Like Francis I would like to have the times formatted as 00:00:00 not 12:00:00 AM. I'm graphing elapsed time, not time of day. Has anyone figured out how to do this using either JSCHART or the old graphing? Any thoughts would be appreciated!

Emily,

If you could bring this up with your graphing expert, that would be great!

Thanks!


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Master
posted Hide Post
quote:
Originally posted by eric.woerle:
I'm going to ressurect this thread as I'm having the same issue. please find below an example using CAR

Your example generates this scripting code for the number of minutes:

script += 'setDateData(0,0,"00:02:00","HHIS");';
script += 'setDateData(0,1,"00:05:00","HHIS");';
script += 'setDateData(0,2,"00:04:00","HHIS");';
script += 'setDateData(0,3,"00:02:00","HHIS");';
script += 'setDateData(0,4,"00:05:00","HHIS");';
script += 'setDateData(0,5,"00:05:00","HHIS");';
script += 'setDateData(0,6,"00:05:00","HHIS");';
script += 'setDateData(0,7,"00:04:00","HHIS");';
script += 'setDateData(0,8,"00:02:00","HHIS");';
script += 'setDateData(0,9,"00:04:00","HHIS");';

(There are really more minutes coming out of the CAR file than that, but when you sum "TIME BY DATE" it doesn't really look like anything is being summed.)

WebFOCUS doesn't see your computed "TIME" as a measure. But it let's you specify it as a measure because you might want to do a count or distinct count on it. In any case, it doesn't complain and passes it on to the charting software, which then gets very confused.

I modified your code to compute minutes as an integer named "DT_MINUTES". Then I summed "DT_MINUTES BY DATE" and now there is at least a valid graph.

Here is what is being passed into the charting software now:

script += 'setData(0,0,6.00);';
script += 'setData(0,1,5.00);';
script += 'setData(0,2,4.00);';
script += 'setData(0,3,2.00);';
script += 'setData(0,4,20.00);';
script += 'setData(0,5,13.00);';
script += 'setData(0,6,5.00);';
script += 'setData(0,7,9.00);';
script += 'setData(0,8,2.00);';
script += 'setData(0,9,4.00);';

And here is the modified code:

TABLE FILE CAR
PRINT
	COMPUTE TIME_STRT/HHIS='00:00:00';
	COMPUTE DTE/YYMD=&YYMD;
	COMPUTE TIME/HHIS = HADD(TIME_STRT,'MINUTE',SEAT,8,'HHIS');
	COMPUTE DT_MINUTES/I2 = HPART(TIME,'MINUTE','I2');
	COMPUTE DATE/YYMD=DATEADD(DTE,'DAY',MPG);
BY CAR
ON TABLE HOLD AS TIME_TEST
END

-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
GRAPH FILE TIME_TEST
-* Created by Info Assist for Graph
SUM DT_MINUTES
BY DATE
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
-*INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT='WebFOCUS Report', $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setSeriesType(0,2);
setSeriesType(1,2);
setSeriesType(2,2);
setSeriesType(3,1);
*END
*GRAPH_JS
yaxis: {mode: 'time'}
*END
ENDSTYLE
END


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report 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]Graphing Time

Copyright © 1996-2020 Information Builders