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] horizontal visualise with across

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] horizontal visualise with across
 Login/Join
 
Gold member
posted
Hello,

We want to have in html format a visualize bar for a field with across.
The bar is automatically displayed in vertical mode.
We can't find any solution to display the bar in horizontal mode.
Is there a way to do it ?
Thanks for your answers.
Catherine

This message has been edited. Last edited by: Cati - France,


7.7.02 (Html, Excel, Ahtml, Pdf,Graph,.....)
OS400 V5R3, V5R4
Windows 2000/2003/2007/2010
 
Posts: 68 | Location: France | Registered: February 27, 2008Report This Post
Expert
posted Hide Post
This may help:

Documentation: "Controlling Bar Graph Scaling in Horizontal (ACROSS) Sort Fields"

GRAPHTYPE=DATA, {COLUMN|ACROSSCOLUMN}=identifier, $


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Guru
posted Hide Post
Cati -

I see your problem. When you visualize data that is output ACROSS some other column the bars are vertical and there is no orientation setting for the bars.

Try this...
TABLE FILE CAR
SUM
     SALES AS ''
ACROSS COUNTRY AS ''
ON TABLE NOTOTAL
ON TABLE SET ASNAMES ON
ON TABLE SET PAGE-NUM OFF
ON TABLE HOLD
END
-RUN
TABLE FILE HOLD
PRINT
     *
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
     GRAPHTYPE=DATA,
     COLUMN=N1,
     GRAPHCOLOR='BLACK',
$
     GRAPHTYPE=DATA,
     COLUMN=N2,
     GRAPHCOLOR='BLACK',
$
     GRAPHTYPE=DATA,
     COLUMN=N3,
     GRAPHCOLOR='BLACK',
$
     GRAPHTYPE=DATA,
     COLUMN=N4,
     GRAPHCOLOR='BLACK',
$
     GRAPHTYPE=DATA,
     COLUMN=N5,
     GRAPHCOLOR='BLACK',
$
-******  May need to add more of these GRAPHTYPE style settings to accomodate greatest number of across values  ******-
TYPE=REPORT,
     GRID=OFF,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
$
ENDSTYLE
END


This should get you started.

Regards,

Dan


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report This Post
Gold member
posted Hide Post
Thank you Francis and Dan for your answers.

Francis,
I don't understand what to do with your answer.
In developper studio, when you select "visualise" for a field, these lines are generated :
TYPE=DATA,
ACROSSCOLUMN=N1,
COLOR =RGB(0 112 121),
TARGET='_blank',

GRAPHTYPE=DATA,
COLUMN=N3,
GRAPHLOOK=BAR,
$
So what do you mean with "identifier" ?


Dan,
We have tried your solution but with this solution, we have problems with the column titles because the across number of columns is variable.
Is there a way to retrieve the number of columns after the across ?

Thanks in advance.
Catherine


7.7.02 (Html, Excel, Ahtml, Pdf,Graph,.....)
OS400 V5R3, V5R4
Windows 2000/2003/2007/2010
 
Posts: 68 | Location: France | Registered: February 27, 2008Report This Post
Expert
posted Hide Post
Cati, "identifier" is the N1 or P1 - used instead of column names.

Documentation: Creating Reports With WebFOCUS Language > Identifying a Report Component in a WebFOCUS StyleSheet > Identifying an Entire Report, Column, or Row > Identify an Entire Column.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Gold member
posted Hide Post
Bonjour Francis,

I see what you mean.
I had a look in this documentation but It's written :

Controlling Bar Graph Scaling in Horizontal (ACROSS) SortFields
How to:
Apply Vertical Scaling to Data Visualization Bar Graphs
You can apply vertical bar graphs to different columns above a common ACROSS sort field.
The entire set of values for each column is grouped over an ACROSS sort field that has bar
graphs applied. Therefore, the longest bar graph corresponds

My problem is that it seems it's only possible to have vertical bar and not horizontal bar with across field.
But perhaps my documentation is not the last one and there is a new option to do this or you know a way to do it ?

Thanks.
Catherine


7.7.02 (Html, Excel, Ahtml, Pdf,Graph,.....)
OS400 V5R3, V5R4
Windows 2000/2003/2007/2010
 
Posts: 68 | Location: France | Registered: February 27, 2008Report This Post
Expert
posted Hide Post
Catherine,

Changing the ACROSS to BY in this example changes the vertical graph to horizontal, it looks like you cannot have horizontal bar graphs with ACROSS:

DEFINE FILE GGSALES
DIFFERENCE/D12.2M = DOLLARS - BUDDOLLARS; 
END
 
TABLE FILE GGSALES
SUM 
DOLLARS/D12.2M AS 'Sales'
BUDDOLLARS/D12.2M AS 'Budget'
DIFFERENCE AS 'Difference'
ACROSS REGION AS ''
ON TABLE SET STYLE *  
GRAPHTYPE=DATA, ACROSSCOLUMN=N3,color=blue,$ 
END

Sorry I cannot be of any help.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Guru
posted Hide Post
quote:
Is there a way to retrieve the number of columns after the across ?


Catherine,

If you do something like this you'll get a number for each across value. Then, perhaps you could come up with some way of repeating the style section based on that number. My thought is that the entire style section [GRAPHTYPE=DATA,COLUMN=N1,GRAPHCOLOR='BLACK',$] can be a variable. You would just need to increment the values N1, N2, N3... for each iteration up to the maximum value of RANK.
SET ASNAMES = ON
TABLE FILE CAR
SUM
     SALES
 RANKED  AS 'RANK' BY COUNTRY
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE HOLD AS HOLD1
END
-RUN
SET ASNAMES = ON
TABLE FILE HOLD1
SUM
     SALES AS ''
ACROSS COUNTRY AS ''
ACROSS RANK AS ''
ON TABLE NOTOTAL
ON TABLE SET PAGE-NUM OFF
ON TABLE HOLD AS HOLD2
END
-RUN
TABLE FILE HOLD2
PRINT *
...


Hope this helps!

Dan


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report This Post
Virtuoso
posted Hide Post
Cati,

Since WF will show show only vertical bars with ACROSS, the solution would be not to use ACROSS, but simulate ACROSS with DEFINE and DM. For example:
  
-* File CatiFrance1.fex
SET HOLDLIST=PRINTONLY
TABLE FILE CAR
BY SEATS
ON TABLE SAVE
END
-RUN
-SET &SEATS=&LINES;
-REPEAT #GETSEATS FOR &I FROM 1 TO &LINES;
-READ SAVE,&SEAT.&I
-#GETSEATS
-RUN
DEFINE FILE CAR
-REPEAT #DEFCOST FOR &I FROM 1 TO &LINES;
COST&SEAT.&I /D6=IF SEATS EQ &SEAT.&I THEN RCOST ELSE 0;
-#DEFCOST
END
					   
TABLE FILE CAR
SUM
-REPEAT #SHOCOST FOR &I FROM 1 TO &LINES;
COST&SEAT.&I 
-#SHOCOST
BY COUNTRY
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
	 GRID=OFF,
$
-REPEAT #VIZCOST FOR &I FROM 1 TO &LINES;
     GRAPHTYPE=DATA,
     COLUMN=COST&SEAT.&I ,
     GRAPHLOOK=BAR,
$
-#VIZCOST
ENDSTYLE
END


Bonne chance!


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Virtuoso
posted Hide Post
Cati,

Et puis, if you want to use ACROSS, you can, instead, simulate the GRAPHTYPE:
  
-* File CatiFrance2.fex
-SET &SCALE=200;
SET HOLDLIST=PRINTONLY

TABLE FILE CAR
SUM RCOST
ON TABLE SAVE
END
-RUN
-READ SAVE,&TCOST
-RUN
TABLE FILE CAR
SUM RCOST
COMPUTE PCOST/I4=RCOST / &TCOST * &SCALE; NOPRINT
COMPUTE ARCOST/A4=EDIT(PCOST); NOPRINT
COMPUTE BAR/A100='<IMG SRC="/ibi_html/vis/g000000.gif" WIDTH=' | ARCOST | ' HEIGHT=10>';
BY COUNTRY
BY SEATS
ON TABLE HOLD
END
TABLE FILE HOLD
SUM RETAIL BAR AS ''
BY COUNTRY 
ACROSS SEATS
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
	 GRID=OFF,
$
END

You can play with the value of &SCALE to get the right length.

A ton choix.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Gold member
posted Hide Post
Bonjour Dany,

Thank you for your answers.
It will try both and see which one is better in my case.

Catherine


7.7.02 (Html, Excel, Ahtml, Pdf,Graph,.....)
OS400 V5R3, V5R4
Windows 2000/2003/2007/2010
 
Posts: 68 | Location: France | Registered: February 27, 2008Report This Post
Virtuoso
posted Hide Post
Hi Cati,

D'accord. Please tell me.

A propos, one doesn't need the HOLD file:
  
-* File CatiFrance3.fex
-SET &SCALE=200;
SET HOLDLIST=PRINTONLY

TABLE FILE CAR
SUM RCOST
ON TABLE SAVE
END
-RUN
-READ SAVE,&TCOST
-RUN
TABLE FILE CAR
SUM RCOST
COMPUTE PCOST/I4=RCOST / &TCOST * &SCALE; NOPRINT
COMPUTE ARCOST/A4=EDIT(PCOST); NOPRINT
COMPUTE BAR/A100='<IMG SRC="/ibi_html/vis/g000000.gif" WIDTH=' | ARCOST | ' HEIGHT=10>';
BY COUNTRY
ACROSS SEATS
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
	 GRID=OFF,
$
END


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
Good One Cati and Danny: You Rock... I like that! Proportiional bars and everything...
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
One can also add some coloring:
  
-* File CatiFrance3.fex
-SET &SCALE=500;
SET HOLDLIST=PRINTONLY

TABLE FILE CAR
SUM RCOST
ON TABLE SAVE
END
-RUN
-READ SAVE,&TCOST
-RUN
TABLE FILE CAR
HEADING
"ACROSS and Horizontal Visualization"
SUM RCOST
COMPUTE PCOST/I4=RCOST / &TCOST * &SCALE; NOPRINT
COMPUTE ARCOST/A4=EDIT(PCOST); NOPRINT
COMPUTE COLOR/A11=IF RCOST LT 10000 THEN 'gff0000.gif' 
             ELSE IF RCOST GT 40000 THEN 'g0000ff.gif' 
			 ELSE 'g000000.gif'; NOPRINT
COMPUTE BAR/A100='<IMG SRC="/ibi_html/vis/' | COLOR | '" WIDTH=' | ARCOST | ' HEIGHT=10>'; AS ''
BY COUNTRY
ACROSS SEATS
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
	 GRID=OFF,
	 FONT=ARIAL,
	 SIZE=9,
$
END


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
this article will show you a do-it-yourself way to handle bars, limited to html output,tho.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Gold member
posted Hide Post
Finally, we used the solution posted by danny and it works fine.

Merci beaucoup à tous pour votre aide
Thanks a lot everybody for your help).
Catherine

You can see the result of this address : http://i30.tinypic.com/2ed8951.jpg

This message has been edited. Last edited by: Cati - France,


7.7.02 (Html, Excel, Ahtml, Pdf,Graph,.....)
OS400 V5R3, V5R4
Windows 2000/2003/2007/2010
 
Posts: 68 | Location: France | Registered: February 27, 2008Report 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] horizontal visualise with across

Copyright © 1996-2020 Information Builders