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] Stacked Vertical Bar Graphs

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Stacked Vertical Bar Graphs
 Login/Join
 
Member
posted
Hello,
I am new using webfocus for graphing. I usually use excel templates but now that we have Office 2007 and they decided to turn off macros for single file web pages I need to learn how to chart in webfocus. I am trying to do what I think would be a simple chart.

I have platforms (i.e. Servers, Workstations, etc) and I want to stack the cost of replacing them by year. So the data I have is

The output of my report looks like this
PLTCODE_N 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017
Servers $9,238,900 $6,816,000 $6,583,500 $5,445,000 $3,223,000 $3,078,900 $6,816,000 $6,583,500 $5,445,000 $3,223,000
Workstations $0 $0 $184,806 $0 $0 $0 $184,806 $0 $0 $0

and for the life of me I can't create a stack bar chart. The closest I can get is it using the platforms as the series and stacking the years. If I try to reverse it is says that the platform is not numeric and it can't be graphed. Would anyone have a code example of how to do this. Thanks

This message has been edited. Last edited by: Kerry,
 
Posts: 9 | Registered: October 07, 2003Report This Post
Virtuoso
posted Hide Post
What Version of WebFocus are you on?


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Virtuoso
posted Hide Post
If your are on a later version...I would suggest using Advanced Graph Assistant. Else here is an example with the car file

GRAPH FILE CAR
SUM DEALER_COST
SALES
ACROSS CARS
ON GRAPH SET LOOKGRAPH VBRSTK1
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB ON
ON GRAPH SET 3D ON
ON GRAPH SET VZERO OFF
ON GRAPH SET GRID ON
ON GRAPH SET GRAPHSTYLE *
setDataTextDisplay (true);
setFillMissingData(0);
setNumMissingDataSegments(1);
setStackedDataValueSum(false);
setDataTextPosition(4);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendMarkerPosition(4);
setFontSizeAbsolute(getLegendText(),true);
setFontSize(getLegendText(),8);
setFontStyle(getLegendText(),2);
setLegendDisplay(true);

setTextJustHoriz(getO1Title(),1);
setFontSizeAbsolute(getO1Title(),true);
setFontSize(getO1Title(),12);
setTextRotation(getO1Title(),0);
setTextWrap(getO1Title(),false);
setTextJustHoriz(getO1Label(),0);
setFontSizeAbsolute(getO1Label(),true);
setFontSize(getO1Label(),12);
setTextRotation(getO1Label(),3);
setTextWrap(getO1Label(),false);
setPlaceResize(getO1Title(),0);
setPlaceRotate(getO1Title(),0);
setPlaceAlign(getO1Title(),0);
setPlaceWordWrap(getO1Title(),0);
setPlaceResize(getO1Label(),0);
setPlaceRotate(getO1Label(),0);
setPlaceAlign(getO1Label(),0);
setPlaceWordWrap(getO1Label(),0);
setPlace(true);

setFontSizeAbsolute(getTitle(),true);
ENDSTYLE
ON GRAPH SET STYLE *
TYPE=DATA,
ACROSSCOLUMN=N1,
COLOR=RGB(51 102 255),
$
TYPE=DATA,
ACROSSCOLUMN=N2,
COLOR='RED',
$
TYPE=DATA,
ACROSSCOLUMN=N3,
COLOR='YELLOW',
$
TYPE=SUBHEAD,
SIZE=9,
STYLE=BOLD,
JUSTIFY=CENTER,


$
ENDSTYLE
END
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Member
posted Hide Post
Thanks this is what I am currently getting with advanced graph assist. I substitute my values in
SUM 2008
2009
2010
ACROSS PLTCODE_N

but what I need is to have 2008, 2009, 2010 across the bottom and the pltcode_n value associated with each year stacked in that column

If I switch the code to
SUM PLTCODE_N
ACROSS 2008
ACROSS 2009
ACROSS 2010

I get

0 NUMBER OF RECORDS IN TABLE= 29 LINES= 2
0 NUMBER OF RECORDS IN GRAPH= 2 PLOT POINTS= 2
VERTICAL AXIS IS NOT NUMERIC..CAN'T GRAPH

Thanks
 
Posts: 9 | Registered: October 07, 2003Report This Post
Member
posted Hide Post
WebFocus 7.6.1
Thanks
 
Posts: 9 | Registered: October 07, 2003Report This Post
<JG>
posted
You can create the template in Excel 2002 sp3 or 2003 and it will work OK being output to Excel 2007.

For WebFocus you need to change the matrix (Or you can code the API manually)

so that you have

severs workstions etc. BY year

simple process is

DEFINE FILE whaterver
servers/D12.2= IF product EQ 'SERVERS' THEN value else 0;
workstation/D12.2= IF product EQ 'workstation' THEN value else 0;
etc/D12.2= IF product EQ 'etc.' THEN value else 0;
END
TABLE FILE whatever
SUM servers workstation etc.
BY YEAR
ON TABLE HOLD
END
-RUN
GRAPH FILE HOLD
SUM servers workstation etc.
ACROSS YEAR
etc.
etc.
END
 
Report 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] Stacked Vertical Bar Graphs

Copyright © 1996-2020 Information Builders