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     AGA: Problem with Line/Bar Graph and missing values

Read-Only Read-Only Topic
Go
Search
Notify
Tools
AGA: Problem with Line/Bar Graph and missing values
 Login/Join
 
Gold member
posted
Hi, following problem:

I want to show 2 values in a graph over one year.
First value is given not daily, but for every 2-3 days.
This value I want to show with a line graph.

Second value is given every 6-8 weeks. This value I want to show with a bar.

Note:
- There are days with no entry.
- Second value can exist for a day even if no first value exists.

To prevent that the width of the bar changes depending on the number of occurances, I thought of the following:

On ther X-Axis I group the data by the last 365 days, eg. 2008-11-18 to 2009-11-17.

This solves my problem with the width of the bar. Great.

But therefore my line graph "touches" the x-axis when it has no values; now the graph looks like a rollercoaster ;-)

I would like my line graph only to connects those fields with present values.

I read about something like "suppress zero lines", but it seems as it doesn't work with my line graph.


WF 7.6.9
PMF 5.1.3
BID 7.6.9

Win XP
HTML, PDF, Excel, PowerPoint
 
Posts: 69 | Location: Germany | Registered: September 21, 2009Report This Post
Expert
posted Hide Post
It seems that htere is something that does this.

Its to do with missing data.

Search for GRAPH INTERPOLATE

I think that the graph style added is setFillMissingData(n);

I could not get it to work though.


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: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
Hi Waz,

I tried
setFillMissingData(n)
in combintation with some
MSSING
settings. This seems to be nice.

But, as far as I could see,
setFillMissingData(n)
works for all series. I want to use it just for one of my series.


WF 7.6.9
PMF 5.1.3
BID 7.6.9

Win XP
HTML, PDF, Excel, PowerPoint
 
Posts: 69 | Location: Germany | Registered: September 21, 2009Report This Post
Expert
posted Hide Post
If no one else has any suggestions, then I would suggest working out the values your self prior to graphing.


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: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
So here is what I did:
1.) Create a HOLD-File H_DATES with the last 365 dates as
CALDAY_NAME


2.) Create a HOLD-File H_LINES with the values for the line series with
MISSING ON
and
BY NAME


3.) Create a Hold-File H_BARS with the values for the bar series with
MISSING ON
and
BY NAME


4.) Match the files from Step 2 and 3. The Option
OLD-OR-NEW
ensures that I get all the data from both files, even with I do not have a corresponding date in on of them.
  
MATCH FILE H_LINES
  PRINT LINEPRICE
  BY CALDAY_NAME
RUN
FILE H_BARS
  PRINT BARPRICE
  CALDAY_NAME
AFTER MATCH HOLD AS H_GRAPH OLD-OR-NEW
END
-RUN

5.)Join the files from Step 1 and Step 4 to build my X-axis:
JOIN
 LEFT_OUTER H_DATES.CALDAY_NAME IN DATES TO MULTIPLE
 H_GRAPH.CALDAY_NAME IN H_GRAPH TAG J4 AS J4
 END

6.)Build a last HOLD-File to prepare the data for my graph:
TABLE FILE H_DATES
PRINT
     J4.H_GRAPH.LINEPRICE
     J4.H_GRAPH.BARPRICE
BY H_DATES.CALDAY_NAME
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS H_GRAPH_2 FORMAT FOCUS
END

7.) Give a Define on Step 6, as I want to show Month and Year on the y-axis
DEFINE FILE H_GRAPH_2 
YEAR/A4 = EDIT (CALDAY_NAME, '9999$$$$');
MONTH/A2 = EDIT (CALDAY_NAME, '$$$$99$$');
END

8.) Create Graph
GRAPH FILE H_GRAPH_2
-* Created by Advanced Graph Assistant
SUM 
LINEPRICE
BARPRICE
BY YEAR
BY MONTH
BY CALDAY_NAME NOPRINT
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
...

I figured out that ON GRAPH SETSTYLE, following options had to be set:
ON GRAPH SET GRAPHSTYLE *
...
setFillMissingData(2);
setNumMissingDataSegments(25);
setScaleFromZero(false);
setRiserWidth(50);
...


I'm still working on one thing: I want to display the labels for BARPRICE. Unfortunately - I think due to the interpolation with setFillMissingData(2) - the labels for BARPRICE are even shown for the interpolated values. Maybe I can figure this out too.

Thanks all for your help.


WF 7.6.9
PMF 5.1.3
BID 7.6.9

Win XP
HTML, PDF, Excel, PowerPoint
 
Posts: 69 | Location: Germany | Registered: September 21, 2009Report 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     AGA: Problem with Line/Bar Graph and missing values

Copyright © 1996-2020 Information Builders