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.
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, 2003
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>,
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, 2003
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.
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, 2003
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.
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 youThis message has been edited. Last edited by: <Mabel>,
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>,
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
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, 2003
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, 2003
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, 2003
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, 2003
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.