IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    Stacked Bar Graph with UNStacked Lines??
Go
New
Search
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Platinum Member
Posted
Logged a case today, but was hoping someone might have figured this one out...

We're building a stacked bar graph that also has some series that are plotted as lines. However, we want the lines to NOT be stacked. I can't figure out a way to tell WebFOCUS to do this -- it always wants to stack the lines even though it does appear to treat the bars and lines as their own stacks...

The only idea I have at the moment is to "adjust" the values of the series that are lines to be the difference between the current series and the previous series. Then it would essentially "counteract" the stacking and plot them where they should be. This sounds pretty painful, so I'm hoping someone else has a great idea that I haven't thought of yet.

Think it's possible to plot 2 different graphs (with transparent backgrounds) and stack the images on top of each other?



Production: 7.6.6 WF Server  <=>  7.6.6 WF Client  <=>  7.6.6 Dev Studio
Testing: <none>
Using MRE & BID.  Connected to MS SQL Server 2005
Output Types: HTML, Excel, PDF
 
Posts: 228 | Location: Wichita, KS | Registered: May 27, 2005Reply With QuoteEdit or Delete MessageReport This Post
Expert
Posted Hide Post
Trav,

The way that I do this is to use a dual axis stacked bar chart - setGraphType(20); and then assign the data ranges to either the left or right axis changing the plot type as required -
ON GRAPH SET GRAPHSTYLE *
-* Graphtype is Vertical Dual-Axis Stacked Bars
setGraphType(20);
setAxisAssignment(0,1);
setSeriesType(0,1);
setAxisAssignment(1,1);
setSeriesType(1,1);
setAxisAssignment(2,0);
setSeriesType(2,2);

An additional item that I use is a calculation of what data range is the highest, round that up to the next 100 and then set the max for each vertical axis to that value.

T


Old FOCUS coders never die, they just become functionally stable. (Tony A Wink)

Current Client: WebFOCUS 7.6.2 Win XP SP2/IIS 6/Tomcat 5.5 - MRE / BID MS SQL / Oracle - DevStudio 7.6.6 7.1.6
Local: WebFOCUS 7.6.6 7.1.6 on Win XP SP2/Apache/Tomcat 5.5 - Self Service
 
Posts: 2860 | Location: England U.K. (Freelance) | Registered: April 08, 2004Reply With QuoteEdit or Delete MessageReport This Post
Platinum Member
Posted Hide Post
Tony, I had tried that and unfortunately it still stacks the lines too. If I only have one line, then it works just fine, but as soon as you start adding more series plotted as lines, it starts stacking them. In my case I have 4 series that are plotted as stacked bars and 6+ series plotted as lines...

Unless I missed something in your method?



Production: 7.6.6 WF Server  <=>  7.6.6 WF Client  <=>  7.6.6 Dev Studio
Testing: <none>
Using MRE & BID.  Connected to MS SQL Server 2005
Output Types: HTML, Excel, PDF
 
Posts: 228 | Location: Wichita, KS | Registered: May 27, 2005Reply With QuoteEdit or Delete MessageReport This Post
Platinum Member
Posted Hide Post
Also, for what it's worth, my theory on adjusting the values to be the difference between series didn't work because it stacks negative values below zero and positives above zero...



Production: 7.6.6 WF Server  <=>  7.6.6 WF Client  <=>  7.6.6 Dev Studio
Testing: <none>
Using MRE & BID.  Connected to MS SQL Server 2005
Output Types: HTML, Excel, PDF
 
Posts: 228 | Location: Wichita, KS | Registered: May 27, 2005Reply With QuoteEdit or Delete MessageReport This Post
Master
Posted Hide Post
Trav,

I do not have WF 7.6 but I THINK I remember hearing this particular issue discussed at Summit 1 or 2 years ago and that it was going to be added to the abilities of the graph engine. Unfortunately I do not have a WF 7.6 install to experiment with to see if it IS in the product. May be the GRAPH gurus at IBI can answer this one.


Thanks!

Mickey

WebFOCUS 7.1.3 /// Windows 2003 Server /// Oracle Data Sources /// HTML, PDF, EXCEL Output
 
Posts: 933 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Reply With QuoteEdit or Delete MessageReport This Post
Expert
Posted Hide Post
Trav,

No, it was me who missed your requirements! Frowner

As you will see from my post I only have three data series, two bars and one line. Works fine with that, but not for your situation.

I think that you have already identified the only solution - by realignment of the data series values - the downside of this is the mouseover popups with the series values will be incorrect so it would be best to turn them off. Of course, your users are bound to want them back!!!

Instead of realigning the line series data, how about just have a clustered bar chart and messing with the width of the bars and the overlap? Might work ...

Good luck

T


Old FOCUS coders never die, they just become functionally stable. (Tony A Wink)

Current Client: WebFOCUS 7.6.2 Win XP SP2/IIS 6/Tomcat 5.5 - MRE / BID MS SQL / Oracle - DevStudio 7.6.6 7.1.6
Local: WebFOCUS 7.6.6 7.1.6 on Win XP SP2/Apache/Tomcat 5.5 - Self Service
 
Posts: 2860 | Location: England U.K. (Freelance) | Registered: April 08, 2004Reply With QuoteEdit or Delete MessageReport This Post
Platinum Member
Posted Hide Post
I messed with 7.6.1 but didn't have any luck there either.

I think I've basically realized that I'm going to have to have Excel do the graph. IBI will probably love that, but that's how it goes I guess...



Production: 7.6.6 WF Server  <=>  7.6.6 WF Client  <=>  7.6.6 Dev Studio
Testing: <none>
Using MRE & BID.  Connected to MS SQL Server 2005
Output Types: HTML, Excel, PDF
 
Posts: 228 | Location: Wichita, KS | Registered: May 27, 2005Reply With QuoteEdit or Delete MessageReport This Post
Platinum Member
Posted Hide Post
Oh, I wish they were always this simple...

setForceSeriesAbsolute(getSeries(0),true);


Got this back from techsupport on our open case. This is an UNDOCUMENTED function/property. I searched through the 1396 page graphics document and it is NOT there. DocServices, are you listening? Smiler

Apparently it IS in the new features document for 713 though. Frowner

Anyway, now that I know the function call, if I search on techsupport, I can find plenty of results and the answers that I need. Oddly enough though, until I knew the function name, I wasn't able to find anything with the various searches I tried. Almost too obvious now that I see the search results...

*frustrated but pleased*



Production: 7.6.6 WF Server  <=>  7.6.6 WF Client  <=>  7.6.6 Dev Studio
Testing: <none>
Using MRE & BID.  Connected to MS SQL Server 2005
Output Types: HTML, Excel, PDF
 
Posts: 228 | Location: Wichita, KS | Registered: May 27, 2005Reply With QuoteEdit or Delete MessageReport This Post
Expert
Posted Hide Post
Trav,

Thanks for feeding back on this very useful setting Smiler

T


Old FOCUS coders never die, they just become functionally stable. (Tony A Wink)

Current Client: WebFOCUS 7.6.2 Win XP SP2/IIS 6/Tomcat 5.5 - MRE / BID MS SQL / Oracle - DevStudio 7.6.6 7.1.6
Local: WebFOCUS 7.6.6 7.1.6 on Win XP SP2/Apache/Tomcat 5.5 - Self Service
 
Posts: 2860 | Location: England U.K. (Freelance) | Registered: April 08, 2004Reply With QuoteEdit or Delete MessageReport This Post
Platinum Member
Posted Hide Post
Thanks Trav for posting this issue AND for posting the solution. The only thing I'll add to this that the line needs to be added for each of the series used in the graph and that the "0" needs to be changed to match the associated series.

setForceSeriesAbsolute(getSeries(0),true);

Thanks again. I was going to go to Tech Support for the answer and found it here in the WebFOCUS World instead.

-Doug



Current Client: WebFOCUS 7.1.4 Client: Windows, Reporting Server: Unix, Data: Oracle, Teradata
Local Laptop: WebFOCUS 7.6.5 on Vista/Apache/Tomcat, Data: FOCUS, MS Access
 
Posts: 98 | Location: Live: Clemmons, NC, Work: HPHC, Wellesley, MA | Registered: February 23, 2005Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    Stacked Bar Graph with UNStacked Lines??

Copyright © 1996-2008 Information Builders, leaders in enterprise business intelligence.