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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Graph Help
 Login/Join
 
Virtuoso
posted
I have a Graph that I'm trying to duplicate from Crystal Reports to WebFocus. It has two horizontal bars and the bars are sectioned into different colors based on how many service calls each person received. Picture this as a graph and each part a different color

Primcall _______2________3_____5
SecondCall ___1_______________4______6

Then there is a legend at the left side with a color square and the name of the person.

O Amy Ray
O Stevie Nicks
O Robert Plant

Graph would be something like this.

GRAPH FILE XGRAPH
SUM PRIMCALL SECONDCALL
BY NAME AS ' '
END

Of course when you do this you get the 2 bars
with each name down the left of the bar.
Any thoughts on how to accomplish this. I would figure if you can do it in Crystal...it can be done in Webfocus.
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
<Grzegorz>
posted
Do you really need the GRAPH for this?

Look at the article:
GRAPHTYPE
 
Report This Post
Virtuoso
posted Hide Post
Well that is quite the article....I'm not sure it it can help me...but I'll review it.

Thanks.
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Virtuoso
posted Hide Post
Don't think that is what I needed, any other thoughts?
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Expert
posted Hide Post
Prairie, that's exactly what the GRAPHTYPE article was written to address. absolutely.
you'll just build a character string that is itself a TABLE.
the first cell is the first bar, of whatever width you need with a color as a background color and a text value right adjusted for the value itself, 2.
the 2nd cell is the next bar, of whatever width needed with a new color as a background color and a right-adjusted value,
and so on.
The 4th cell has a background color white and is empty, of a width needed to fill out the full area alloted for the entire table.
It works like a charm, i promise! i do it every day.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
<JG>
posted
Take a look at the following sample. I think it's what you are looking for



SET HOLDLIST=PRINTONLY
TABLE FILE CAR
SUM SEATS
ACROSS BODYTYPE NOPRINT
BY COUNTRY
WHERE COUNTRY EQ 'ENGLAND' OR 'ITALY';
ON TABLE HOLD AS XX FORMAT ALPHA
END
CHECK FILE XX HOLD
-RUN
-*
TABLEF FILE HOLD
PRINT ALIAS
WHERE FLDNO NE 1
ON TABLE HOLD AS FIELDS FORMAT ALPHA
END
-*
TABLE FILE CAR
BY BODYTYPE
WHERE COUNTRY EQ 'ENGLAND' OR 'ITALY';
ON TABLE HOLD AS ZZ FORMAT ALPHA
END
TABLEF FILE ZZ
PRINT
COMPUTE COUNTA/I5= LAST COUNTA +1; NOPRINT
COMPUTE COUNTER/I9= COUNTA -1; NOPRINT
COMPUTE NLABEL/A80='setSeriesLabel(' || EDIT(COUNTER) || ',"' || BODYTYPE || '");';
ON TABLE HOLD AS LEGEND FORMAT ALPHA
END
-RUN
GRAPH FILE XX
SUM
-INCLUDE FIELDS
BY COUNTRY
ON GRAPH SET LOOKGRAPH HBRSTK1
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH PCHOLD FORMAT GIF
ON GRAPH SET GRAPHSTYLE *
-INCLUDE LEGEND
ENDSTYLE
END

This message has been edited. Last edited by: <Mabel>,
 
Report This Post
Virtuoso
posted Hide Post
Thanks...that was what I was looking for...now
to make it work with my code.

Thanks...so much.

Suzannah..I am going to use your method for something else for sure.
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Virtuoso
posted Hide Post
This method worked great and I have a happy Graph now, but the user wants the Legend on the left.
I tried using LegendPosition, but it will not let me move it from the right...I guess cause it is an include file. Any thoughts on getting it to the left?

Thanks
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
<JG>
posted
Legend positioning is different in 5.3 and above.

What version of WF are you running
 
Report This Post
Virtuoso
posted Hide Post
Sorry forgot to throw that in, 5.3.2...which is driving me crazy.
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Gold member
posted Hide Post
for 5.3, I know I had a fun time playing with the graphs.. I still have a hard time believing this was an "upgrade" ... I think I'll end up just coding everything in API.

for the legend placement in 5.3 is:

setLegendPosition(-1);
setLegendRect(new Rectangle(-9000,-15000,12000,1500));

Leo
 
Posts: 96 | Location: Winnipeg, Manitoba, Canada | Registered: January 22, 2004Report This Post
Virtuoso
posted Hide Post
Won't recognize that and move.....
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
<JG>
posted
for 5.3 try

setLegendPosition(7);

From the 53 API manual (DN4500605.0904)

How to Set the Legend Position
setLegendPosition (value);
where:
value
Is one of the following:
� FREE FLOAT = -1;
� AUTO = 0;
� BOTTOM = 1;
� RIGHT = 2;
� LEFT = 3;
� TOP = 4;
� RIGHT TOP = 5;
� RIGHT BOTTOM = 6;
� LEFT TOP = 7;
� LEFT BOTTOM = 8;
� BOTTOM LEFT = 9;
� BOTTOM RIGHT = 10;
� TOP LEFT = 11;
� TOP RIGHT = 12;
 
Report This Post
Virtuoso
posted Hide Post
Nope... Frowner
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Virtuoso
posted Hide Post
Well I type in GRAPHENGINE = NEW...And it worked..
wonder why?

Thanks for you help.
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
<JG>
posted
You need to check the WebFocus administrator console,
Under Configuration/Client Settings/graph there is a setting for IBIF_GRAPHENGINE. If GRAPH32 is checked then your using the old engine.
Unless there are thechnical reasons on your site for having this then, I'd switch to GRAPH53 (new engine) as you then get the higher resolution gif and jpegs as well as the Adobe vector graphs for PDF where the quality is great.
 
Report This Post
Gold member
posted Hide Post
the SET GRAPHENGINE = NEW | OLD would dictate whether to use the new engine for 5.3 or keep using the old 5.2 engine for the graphs. If it was set to "OLD" then the old API coding would have worked. I converted most of my programs over and there was a few things different in the API as well. Therefore some of the old methods would not have worked and/or there were overidding methods like: setLegendPosition(n); when I was converting the programs over.
 
Posts: 96 | Location: Winnipeg, Manitoba, Canada | Registered: January 22, 2004Report This Post
Virtuoso
posted Hide Post
Well turns out it was set to GRAPH32. I have an inquiry into why. That could explain why a lot of what I'm trying to do...is not working. Thanks for the insight.
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders