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     GRAPH file ?; linetypes solid dotted dashed
Page 1 2 

Read-Only Read-Only Topic
Go
Search
Notify
Tools
GRAPH file ?; linetypes solid dotted dashed
 Login/Join
 
Expert
posted
2.Anybody have a way to set a single grid line on? a horizontal baseline in mid-graph?
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
<JG>
posted
Susan the java api commands that you need are

To stop the frame displaying.

setFrameDisplay(false);

I'm assuming you mean showing the zero line when a graph has both +ve and -ve values the following remove standard axis lines.

setY1AxisLineDisplay(false);
setX1AxisLineDisplay(false);
setO1AxisLineDisplay(false);

The following displays the zero line and sets it's width.

setY1ZeroLineDisplay(true);
setLineWidth(getY1ZeroLine(),.5);
 
Report This Post
Expert
posted Hide Post
thanks jack, actually its the 1 line.
Is ZeroLine a special sitch?
Can you tell me how to turn on a line at a specific value?
and how to fix the y axis range?
i am making 50 graphs and i want them all to have the same yaxis -1 to 3.

I'll go turn my frame off right now. thanks.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
<JG>
posted
Susan, The best way to get your line at 1 is to generate a dummy series and change the graph type, The Zero line is a special case.<br /><br />I've put together an example of what I think your looking for. The issue is if you want a legend, because there's a bug in 5.3 where disabling the legend display for 1 series does not work (done by setting it's shape to null) (it's still in the 7.1 beta).
DEFINE FILE CAR<br />NSEATS/I5=IF COUNTRY EQ 'ENGLAND' THEN SEATS 
*(-1) ELSE SEATS;
ONELINE/I5=1;
ENDGRAPH FILE CAR
SUM NSEATS ONELINE AS ''
ACROSS MODEL
ON GRAPH PCHOLD FORMAT GIF
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID OFF
ON GRAPH SET GRAPHSTYLE *
setSeriesType(1,2);
setMarkerDisplay(false);
setSeriesFillColor(1, new Color(0,0,0));
setLineWidth(getSeries(1),.5);
setY1MinorGridDisplay(false);
setY1MinorGridStepAuto(false)
setY1MajorGridStep(1.0);
setY1ScaleMinAuto(false); setY1ScaleMaxAuto(false);
setScaleMin(getY1Axis(),-1);
setScaleMax(getY1Axis(),3);
setX1AxisLineDisplay(false);
setY1AxisLineDisplay(false);
setO1AxisLineDisplay(false);
setFrameDisplay(false);
setLegendDisplay(false);
setX1MajorGridDisplay(false);
setY1MajorGridDisplay(false);
setO1MajorGridDisplay(false);
-*setMarkerShape(1,0); \* bug should 
set the series 2 (java count 1 as java's 
1st element is always 0) marker shape 
to null , but it does not work
ENDSTYLE
END 

This message has been edited. Last edited by: <Mabel>,
 
Report This Post
Expert
posted Hide Post
ah. bless you! i see where you set the axis limits. i'll use those , and bag the single line
until 7.2, as i want no legend.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
<JG>
posted
Susan the line setLegendDisplay(false); turns the legend off altogether.
 
Report This Post
<JG>
posted
ALL the documentation for the java API is in
the devstudio/bin directory. JavaGraphAPI.pdf
 
Report This Post
<DocServices>
posted
Indeed, the material is in the Perspective for Java Programmer's Manual(DN2100945.0901).

Have a good day,
Jennifer
 
Report This Post
Expert
posted Hide Post
JG, I pulled down the manual, all 900 whopping pages!, and am still having trouble finding color for axis labels.
My xaxis is ordinal, and the rotate worked,
setO1LabelRotate(0); and you taught me how to do font sizes..working so well.
But color i can't figure out.
Can you help me once again? thanks.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
<JG>
posted
And it's not the best written book in the world.

What you need is

setFillColor(item(),new Color(255,102,0));
where item is the thing you want to change the color of, so for example

setFillColor(getY1Label(),new Color(255,102,0));
setFillColor(getO1Label(),new Color(255,102,0));
setFillColor(getLegendText(),new Color(255,102,0));

Changes the color of the x and y axis text or scale and the legend text. The numbers are the RGB codes for the desired color.
 
Report This Post
Gold member
posted Hide Post
I have similar requirement with API. across-total is displayig the graph total in y-axis. I want to display the label as "Total" for this group.

Is there any api to set label without hardcoding the index of "Total" as y-axis values are dynamic?
 
Posts: 77 | Registered: December 22, 2004Report This Post
<JG>
posted
Thangam, I cannot visualize what your graph looks like. Can you save it as a gif and post it so that I can see.
 
Report This Post
<JG>
posted
By the way the 5.3 documentation is DN4500605.0904
Not the number quoted by docservices which is rather old. And the new documentation is 1345 pages.
 
Report This Post
<DocServices>
posted
Sorry about that. JG is correct. There's a new version of Perspective for Java Programmer's Manual. The title was changed so it's now called "WebFOCUS Graphics."

The WebFOCUS Graphics manual is also available in HTMLHelp format, so you don't have to download the entire PDF file.

If you are an InfoResponse customer, you can see the HTMLHelp version on theTechnical Documentation Library

Regards,
Jennifer
 
Report This Post
Expert
posted Hide Post
JG, can you teach me how to do
ACROSS MYVAR1 NOPRINT ACROSS MYVAR2 AS ''
my xaxis is ordinal
so the labels don't plot in alpha order
and i need MYVAR1 to organise them.
Unfortunately, this doesn't seem to work in GRAPH FILE.
My workaround is to append myvar1 to myvar2
but thats so ugly.
Can you help me, once again??
tia.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Gold member
posted Hide Post
JG, Not able to attach image

My graph has status in x-axis and sku count in y-axis. x-axis I have active, non-active. For active-3 skus, for non-active-4 skus. Total shouws 7 skus. I am not able to display "Total" label in x-axis for 7 skus. status is not fixed as active, non-active. It will change.
 
Posts: 77 | Registered: December 22, 2004Report This Post
<JG>
posted
Problem is that GRAPH FILE does not parse like TABLE FILE and so computes, NOPRINT etc. do not work in the same way.
However you can force the sort
order by using ACROSS COLUMNS.
To do this in a dynamic fashion you need to create the COLUMNS component as an include.
try the following approach.
  SET HOLDLIST = PRINTONLY
DEFINE FILE CAR
NSEATS/I5=IF COUNTRY EQ 'ENGLAND' THEN SEATS *(-1) ELSE SEATS;
ONELINE/I5=1;<br />DNA/A56=' AND ';
DUMMY/A12 ='''' || 'DUMMY' || '''';
END
TABLE FILE CAR
SUM<br />COMPUTE AFIELD/A12= '''' || COUNTRY || ''''DNA
-* sort the output by your primary 
sort order followed by the actual 
column that you want using NOPRINT 
on BOTH BY TOTAL 
DEALER_COST  NOPRINT BY COUNTRY 
NOPRINT ON TABLE SAVE FORMAT ALPHA END -RUN-* set a variable EQ &LINES -SET &
VISIBLE=&LINES; GRAPH FILE CAR
SUM NSEATS FST.ONELINE AS ''ACROSS COUNTRY  AS '' COLUMNS<br />-INCLUDE SAVE
DUMMY ON GRAPH SET 
LOOKGRAPH VBA ON GRAPH 
SET GRAPHEDIT SERVER O
N GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF<br />ON 
GRAPH SET VZERO ON<br />
ON GRAPH SET GRID OFF<br />ON GRAPH PCHOLD FORMAT GIF<br />ON GRAPH SET 
GRAPHSTYLE *<br />-* you need the 
following API call to drop 
the dummy column 
I've dropped all the other API 
calls because you already know them setViewableGroups(&VISIBLE.EVAL); 
ENDSTYLE<br />END
Should do the trick for you

This message has been edited. Last edited by: <Mabel>,
 
Report This Post
<JG>
posted
If the 'total' is always the last bar (for instance 3) then
setGroupLabel(2 ,"Total");<br /><br />should
work. However if the number of bars is dynamic then you need to generate the
number as a variable by doing a dummy graph request as follows
  
DEFINE FILE CAR<br />
NSEATS/I5=IF COUNTRY EQ 
'ENGLAND' THEN SEATS *(-1) 
ELSE SEATS;
ONELINE/I5=1;
END GRAPH FILE CAR SUM NSEATS
-*ONELINE AS '' ACROSS MODEL AS ''
ON TABLE SAVE FORMAT GIF
END -RUN -SET &GROUPS=&RECORDS-1;

Your API call then becomes setGroupLabel(&GROUPS.EVAL ,"Total");

This message has been edited. Last edited by: <Mabel>,
 
Report This Post
Expert
posted Hide Post
ah. columns! (we need an icon for 'slapping palm on forehead..i couldahadaV8').
Thanks once again, JG.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
jg, can you tell me how to change the linetype of a linegraph from solid to dotted or dashed?
simplest thing in the world...
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
<JG>
posted
Susan, the API functionality to create a dotted line does not work, it is planned for future release. When ? who knows.

however I have found a better way to put in your reference line.

setReferenceLine(getY1Axis(),0, 1.0);
setLineWidth(getReferenceLine(getY1Axis(),0),1);
setFillColor(getReferenceLine(getY1Axis(),0), new Color(0,0,0));


The following lines should change the appearance of the line and even though they are documented I cannot get them to work, perhaps a hottrack needs to be raised

-*setLineBasicStrokeType(getReferenceLine(getY1Axis(),0),1);
-*setLineDash(getReferenceLine(getY1Axis(),0), vectDashFloat);
-*vectDashFloat is supposed to be a java float vector array
 
Report This Post
Expert
posted Hide Post
wow! setReferenceLine...how cool it that. i'll try it.
..
update:I tried it..copied pasted your code..i'm getting :
Possible Error on getReferenceLine(,0.0)
I'm in 525...do i need to be in higher version?

My whole system is being released this week...it so swell, basic lines are red blue green, user selects data set from dropdowns onlaunch page, and then several small line graphs come out, arranged in rows/columns in hmtlform (principle of "small multiples"),but not everyone in the co has access to a color printer so i of course have to produce them in line dot dash...
Have you read the works of dr. edward tufte?
www.edwardtufte.com .. on excellence in graphic presentation? he's the guru whose work i try to get wf to emulate.
I'll try your lineBasicStroke type...i didn't even see that in the doc, which, alas, seems to be arranged alphabetically instead of by concept.
thanks very much, again.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Platinum Member
posted Hide Post
Susannah

Judging from your presentations at SUMMIT and FUN, your company is very lucky to have you doing this work.

Have you tried implementing Tufte's Sparklines in WF? These seem to provide considerable bang for the buck in a small amount of space.

Wouldn't it be great if IBIers would visit Tufte's site to gain insight into why we might want more meaningful presentations of data than just the same old "pictures" every other BI product offers?

Suzy
 
Posts: 124 | Location: Lebanon, New Hampshire | Registered: April 24, 2003Report This Post
Member
posted Hide Post
Suzannah,

The new graph engine introduced in Release 5.3 has the ability to render a reference line. I think this may do what you want with regard to your single line requirement. Below is a sample of Graph API code to generate a reference line:

-* The numeric arguments for setReferenceLine() are:
-* the Reference Line Index (the first one is zero),
-* and the position of the line (in this case the position is on the Y Axis.
-* As you mentioned that your Y axes will run from-1 to 3 I set the line at 2)
setReferenceLine(getY1Axis(), 0,2);
setLineWidth(getReferenceLine(getY1Axis(),0),1);
setFillColor(getReferenceLine(getY1Axis(),0), new Color(150,150,150));
setDisplay(getReferenceLine(getY1Axis(),0),true);

Larry
 
Posts: 20 | Location: IBI Corporate HQ, NY | Registered: May 13, 2003Report This Post
Expert
posted Hide Post
hi suzy.."sparklines" no, i'm not familiar with the term. i've got all three books...i'll go find! maybe you can show me at Summit? Thanks for the kind words. Wouldn't Tufte make a great Summit keynote speaker? Lets suggest.

Larry, what about linetypes solid dotted dashed?
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
<JG>
posted
Susan,

Sorry I forgot that you were still on 5.2, As Larry said the new graph engine came in with 5.3.

so the original method is the only way for you at the moment.

You really need to get to 5.3 because the quality of even plain old gifs is so much sharper, not to mention the vector graphs for PDF which blow up to 20 feet wide with no loss of definition.
 
Report This Post
Platinum Member
posted Hide Post
Susannah

Here's the Edward Tufte Sparklines web reference:

http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg...OR&topic_id=1&topic=

Suzy
 
Posts: 124 | Location: Lebanon, New Hampshire | Registered: April 24, 2003Report This Post
Expert
posted Hide Post
wow!
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Platinum Member
posted Hide Post
try this for your columns.
the values in FISCAL_MONTH are Jan, Feb, Mar, ect.

ACROSS FISCAL_MONTH AS ''
COLUMNS Jan AND Feb AND Mar AND Apr AND May AND Jun AND Jul AND Aug AND Sep AND Oct AND Nov AND Dec
 
Posts: 189 | Location: pgh pa | Registered: October 06, 2004Report This Post
Expert
posted Hide Post
thanks, spence. we got that one, already.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
  Powered by Social Strata Page 1 2  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     GRAPH file ?; linetypes solid dotted dashed

Copyright © 1996-2020 Information Builders