Focal Point
[SOLVED] Side by Side Bar Graph

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9641082792

August 28, 2008, 08:02 AM
Rick Man
[SOLVED] Side by Side Bar Graph
I didn't know how to move a post from one Forum to another so here is what was posted on the other Forum.

This isn't what I need. This give 2 bar graphs side by side. I need one graph with 2 bars, one for each year, next to each other, like the Excel example shows. http://i35.tinypic.com/2a7zbbq.jpg Excel did it very easily, so I would think WebFOCUS could. I'm missing something.

Thanks,



Rick Man
Silver Member
Posted August 19, 2008 04:50 PM
How can I create a graph in WebFOCUS like the one I was able to create in Excel; i.e. where the years are side by side in ONE graph not in two separate graphs.
Thanks

http://i38.tinypic.com/2dbuet2.gif
http://i35.tinypic.com/2a7zbbq.jpg

7.6.2
Windows NT
Excel, HTML, PDF

Posts: 33 | Registered: March 31, 2008

PBrightwell
Guru
Posted August 20, 2008 09:01 AM Hide Post
Before your stylesheet add
ON GRAPH SET GRMERGE ON

Pat
WF 5.3.2 AIX, NT, AS/400, Focus AS/400, AIX, Oracle, JDE, DB2, Lotus Notes
Posts: 429 | Location: TX | Registered: September 25, 2007

Ignored post by PBrightwell posted August 20, 2008 09:01 AM Show Post

GinnyJakes
Virtuoso
Posted August 20, 2008 09:31 AM Hide Post
Rick,

Here is an example:


GRAPH FILE CENTURYSALES
SUM LINEPRICE
BY MONTH
ACROSS YEAR
ON GRAPH SET LOOKGRAPH BAR
ON GRAPH SET GRMERGE ON
END


BTW, you might want to post in the FOCUS/WebFOCUS forum as posts here might not get viewed for awhile.

Ginny
---------------------------------
Prod: WF 7.6.5 with 7.6.5 WFRS; AIX 5.2; WebSphere 6.1.0.15
Dev: WF 7.6.5 with 7.6.5 WFRS; AIX 5.2; WebSphere 6.1.0.15
Primarily self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable
Posts: 1148 | Location: BNSF: Fort Worth, TX | Registered: April 05, 2006

This message has been edited. Last edited by: Rick Man,


Reporting Server 7.6.10
Dev. Studio 7.6.8
Windows NT
Excel, HTML, PDF
September 03, 2008, 03:26 PM
Kerry
Hi Rick and all,

FYI, here is the topic that Rick is referring to:

https://forums.informationbuilders.com/eve/forums/a/tpc/...841011692#8841011692

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
September 03, 2008, 04:38 PM
GinnyJakes
GRAPH FILE CENTURYSALES
SUM LINEPRICE
BY MONTH
ACROSS YEAR
ON GRAPH SET LOOKGRAPH BAR
ON GRAPH SET GRMERGE ON
END

I re-tooled it a bit. Does this work better? Or am I still missing the boat?


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
September 03, 2008, 07:13 PM
susannah
quote:
GRAPH FILE CENTURYSALES

whoa...where is centurysales? its not in ibisamp. buy me a vowel?

answered my own question...its in ibidemo in devstu . aha.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
September 04, 2008, 09:07 AM
GinnyJakes
Susannah,

Since you are on Unix like I am, you can upload the directory to your backend Unix box. There is a program to reload the databases. A lot of the tutorials use centurysales and the file has lots of data in it. Great for testing.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
September 04, 2008, 01:57 PM
Rick Man
Thanks Kerry.
Thanks Ginny. I don't have any data in that file.
I opened a case with IBI, #42422997, and this is what they said:

Take this code:

GRAPH FILE FINANCE
SUM AMOUNT AS 'AMOUNT'
ACROSS YEAR AS 'YEAR'
BY ACCOUNT AS 'ACCOUNT'
HEADING
"FINANCE GRAPH1"
ON GRAPH SET LOOKGRAPH BAR
ON GRAPH SET GRMERGE ON
ON GRAPH PCHOLD FORMAT GIF
ON GRAPH SET GRAPHSTYLE *
setLegendPosition(2);
setFontName(getLegendText(),"ARIAL");
ENDSTYLE
END

And flip flop the ACROSS and BY fields:

GRAPH FILE FINANCE
SUM AMOUNT AS 'Amount'
ACROSS ACCOUNT AS 'Account'
BY YEAR AS 'Year'
HEADING
"FINANCE GRAPH2"
ON GRAPH SET LOOKGRAPH BAR
ON GRAPH SET GRMERGE ON
ON GRAPH PCHOLD FORMAT GIF
ON GRAPH SET GRAPHSTYLE *
setLegendPosition(2);
setFontName(getLegendText(),"ARIAL");
ENDSTYLE
END

It works.


Reporting Server 7.6.10
Dev. Studio 7.6.8
Windows NT
Excel, HTML, PDF
September 04, 2008, 02:15 PM
GinnyJakes
Which is exactly what I did if you compare my two sets of code.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google