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] Bar Graph -- I want to sort bars, but not show sort field

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Solved] Bar Graph -- I want to sort bars, but not show sort field
 Login/Join
 
Virtuoso
posted
I have a graph that looks like this --

DEFINE FILE TWO_YEAR_COMP
  DATE_AND_DAY/A20 = DATE_OF_MONTH | ' - ' | DAY_OF_WEEK_TEXT;
END

GRAPH FILE TWO_YEAR_COMP
SUM INTERACTION_COUNT_LAST_YEAR AS '&YEAR_1'
    INTERACTION_COUNT_THIS_YEAR AS '&YEAR_2'
ACROSS DATE_AND_DAY
BY MONTH_TEXT
END


This shows the date of the month and day of the week (example: 01 - Su) along the X axis. The date of the month sets the columns in the right order on the graph. But! I don't want to show the date of the month. I just want to show the day of the week. But if I just show the day of the week the sort order is wrong. In HTML I can hide information in the sort order by dropping it into an HTML tag but this is a graph and all that stuff shows up when it paints.

Can anyone think of a creative way to keep the date of the month in the sort order but out of the display?

J.

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



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report This Post
Platinum Member
posted Hide Post
I have a similar situation with the x axis -- I have a graph where the date values are month - year such as "Jun-11" and "Jul-11". This obviously is causing the wrong sort order.


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006Report This Post
Gold member
posted Hide Post
Gentlemen,

Depending on the WebFOCUS version you're using, the following functionality might be available. You use two sort fields with the graph and simply NOPRINT the other.

DEFINE FILE EMPDATA
HIRE_YYM/YYM = HIREDATE ;
HIRE_YEAR/YY = HIREDATE ;
HIRE_MONTH/M = HIREDATE ;
HIRE_DAY/D   = HIREDATE ;
END

GRAPH FILE EMPDATA
SUM SALARY
BY HIRE_YYM NOPRINT
BY HIRE_DAY AS ''
ON GRAPH SET 3D OFF
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 2
END


And we do have the good old COLUMNS command available, but this might not work with JohnE's problem, as there are columns with the same value, but this should work with JohnB's sorting problem.

GRAPH FILE CAR
SUM SALES
ACROSS COUNTRY
   COLUMNS 'W GERMANY' AND 'ENGLAND' AND 'FRANCE' AND 'ITALY' AND 'JAPAN'
END


Hope this helps.

Cheers,
Mika


WebFOCUS 7.6.x
PMF 5.2.x
 
Posts: 58 | Location: Sydney, Australia | Registered: April 22, 2005Report This Post
Virtuoso
posted Hide Post
I'm confused by your answer, because the BY field in my example is producing multiple graphs. It's the ACROSS field that places the bars on each graph being shown. The issue I'm having is with the ACROSS field.

But it's an academic issue because, as best I can tell, placing a NOPRINT on an ACROSS field or a BY field is the equivalent of removing the line from the command. At that point the line makes no change to the output whatsoever. This is 7.7.03. Are you able to produce graphs where the NOPRINT is having the effect you're talking about? And if so, what version are you on?

Are the settings you're showing (GRMERGE, GRMULTIGRAPH, and GRXAXIS) part of the solution?

J.



-- Update: Those options absolutely ARE part of the solution, and they only work on BY fields, not ACROSS. I am able to put my graph into a loop to remove the ACROSS, convert to using a BY field and then include the GRAPH options

ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 2

. . . in order to get the result I'm looking for.

Thank you for posting!

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



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report This Post
Virtuoso
posted Hide Post
You can control which BY fields go where by using the values in the section you italicized above.

GRMULTIGRAPH 0 means none of the BY fields are used for splitting the results over multiple graphs.
GRLEGEND 0 tells no BY fields will be used for the legend.
GRXAXIS 2 tells that two of the BY fields make up the ordinal axis.

The total, 0 + 0 + 2, tells that there are two BY fields in the report. That must match up with the actual situation, or you will get an error.

I don't know in what order these options are applied, but some experimenting can clear that up Wink


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report 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] Bar Graph -- I want to sort bars, but not show sort field

Copyright © 1996-2020 Information Builders