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.
I've looked in past graph requests here on the Forum but don't seem to find an example of what I'm looking to create.
To use the CAR file as an example, I'd like to create a simple line plot of retail cost, with the highest cost showing a green dot and the lowest cost showing a red dot.
It seems to me that this is 3 series:
1. the continuous line (RCOST) 2. the MAX.RCOST green marker and its place on the continuous line 3. the MIN.RCOST red marker and its place on the continuous line.
I had thought I might need to -WRITE out the values for #2 and #3 above, read them into amper vars, then shove them into the GRAPHSTYLE statements manually as I do a GRAPH FILE CAR for #1.
Can anyone give me some pointers? Am I making this too hard? Is this easier to do than I think it is?
Thanks. Suzy
Posts: 124 | Location: Lebanon, New Hampshire | Registered: April 24, 2003
TABLE FILE CAR SUM MAX.RCOST MIN.RCOST ON TABLE SAVE AS MAXMIN FORMAT ALPHA END -RUN -READ MAXMIN &MaxRcost.I7. &MinRcost.I7. -RUN GRAPH FILE CAR SUM RCOST COMPUTE IS_MAX/D12.2 MISSING ON = IF RCOST EQ &MaxRcost THEN RCOST ELSE MISSING; AS 'Max' COMPUTE IS_MIN/D12.2 MISSING ON = IF RCOST EQ &MinRcost THEN RCOST ELSE MISSING; AS 'Min' BY MODEL ON GRAPH SET 3D OFF ON GRAPH SET VZERO OFF ON GRAPH SET GRAPHSTYLE * setGraphType(41); setMarkerSize(0,0); ENDSTYLE END
EnjoyThis message has been edited. Last edited by: <Maryellen>,
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Of course, our SAS guy had this type of graphic nailed in less than a day, and it's taken me months, on and off, to even get close.
We envision the final report to have a short description in column 1, the sparkline for past 30 days in column 2, and today's value in column 3--for several rows of data.
One thing still has me stumped--I can't get rid of the extra white space at the beginning and end of the sparkline. Do you have any suggestions?
I really wish that WF allowed for multiple dynamic graphics in a request (without frames), but IBI CSS says that the product wasn't designed that way. SAS does this effortlessly, allowing the data to be passed directly in the IMG SRC tag. When we tried this technique with WF, two problems emerged:
1. need to "escape" each arg to WFServlet fex 2. second IMG SRC tag retained info from first one (buffer not cleared). This was reported as a bug.
I can sort of get it to work, some of the time, by figuring out what the EDATEMP directory is and explicitly referencing this in the path to the .png. But often, only some of the graphs show up. Might be a race to delete contents of EDATEMP, or perhaps a browser caching problem.
We'll probably need to set up a cron job to create daily sparklines, and then reference them using FILEDEF and DEFINE.
TABLE FILE CAR SUM MIN.RCOST MAX.RCOST ON TABLE SAVE AS MINMAX FORMAT ALPHA END -RUN -READ MINMAX &MinRcost.I7 &MaxRcost.I7 -RUN GRAPH FILE CAR SUM RCOST COMPUTE MINVAL/I7 MISSING ON = IF RCOST EQ &MinRcost THEN RCOST ELSE MISSING; COMPUTE MAXVAL/I7 MISSING ON = IF RCOST EQ &MaxRcost THEN RCOST ELSE MISSING; BY MODEL ON GRAPH SET LOOKGRAPH VLINE ON GRAPH SET BARNUMB OFF ON GRAPH SET 3D OFF ON GRAPH SET VZERO OFF ON GRAPH SET GRID OFF ON GRAPH SET VAXIS 14 ON GRAPH SET HAXIS 100 ON GRAPH SET GRAPHSTYLE * -*------------------------------------ SPARKLINE graph settings -* -*------------------------------------ Properties for entire graph setGraphType(41); // Vertical Absolute Line Plot setDepthRadius(0); // Turn off 2.5D setDepthAngle(0); // Turn off 2.5D setConnectLineMarkers(true); // Display line connecting markers setPlace(false); // Turn off graph layout manager setToolTipDisplay(false); // Turn off tool tips setFrameDisplay(false); // Turn off graph frame display setLegendDisplay(false); // Turn off legend -* -*------------------------------------ Properties for O1, Ordinal Axis setO1LabelDisplay(false); // Turn off Ordinal (Category) Axis Labels setO1MajorGridDisplay(false); // Turn off Ordinal (Category) Axis Major Grid lines setO1MinorGridDisplay(false); // Turn off Ordinal (Category) Axis Minor Grid lines setO1AxisLineDisplay(false); // Turn off Ordinal (Category) Axis display -* -*------------------------------------ Properties for Y1, Numeric Axis setY1LabelDisplay(false); // Turn off Numeric Axis Labels setY1MajorGridDisplay(false); // Turn off Numeric Axis Major Grid lines setY1MinorGridDisplay(false); // Turn off Numeric Axis Minor Grid Lines setY1AxisLineDisplay(false); // Turn off Numeric Axis display -* -*------------------------------------ Properties for series 0 (gray line) -*------------------------------------ series 1 (red dot) -*------------------------------------ series 2 (green dot) setFillColor(getSeries(0),new Color(153 153 153)); // Gray color for series 0 (all 204 or 153 or 102) setFillColor(getSeries(1),new Color(255 255 255)); // White color for series 1 (MINVAL) setFillColor(getSeries(2),new Color(255 255 255)); // White color for series 2 (MAXVAL) -* setBorderColor(getSeries(1),new Color(255 0 0)); // Red color for series 1 (MINVAL) setBorderColor(getSeries(2),new Color(0 0 255)); // Blue color for series 2 (MAXVAL) -* setMarkerShape(getSeries(0),0); // Turn off marker shape for series 0 setMarkerShape(getSeries(1),1); // Square for series 1 setMarkerShape(getSeries(2),1); // Square for series 2 -* setMarkerSize(getSeries(0),0); // Turn off merker size for series 0 setMarkerSize(getSeries(1),100); // Biggest marker size for series 1 setMarkerSize(getSeries(2),100); // Biggest marker size for series 2 -* setLineWidth(getSeries(0),0); // Smallest line width for series 0 -* ENDSTYLE END
Thanks again for your help. Suzy ---------------------------------------------------- WF 5.3.2, Sun unix, Apache, TomcatThis message has been edited. Last edited by: <Maryellen>,
Posts: 124 | Location: Lebanon, New Hampshire | Registered: April 24, 2003
This doesn't seem to work for me. From what I can gather, this has to do with grid lines--which I've basically turned off. Do you think that I would have to turn them on again and set them all to white?
The following property extended the line both left and right, but the little red and blue markers seem to disappear:
setPlace(true);
Thanks. Suzy
Posts: 124 | Location: Lebanon, New Hampshire | Registered: April 24, 2003
Using your demo code, if I comment out the frame display or set it to true, then I can see the effect of the ExtendToFrameEdge which basically moves the first and last ploting positions to the edge of the frame area.
The setPlace(true); makes no difference to the high/low markers.
I am on a different platform to yours, but as PfJ should be platfrom independant I am not sure what to suggest next.
If I think of anything, then I'll be sure to let you know.
Regards
T.
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Just realised that I am using a slightly larger (28 x 200) graph (the old eyes aren't what they used to be ). If I set the size back to yours (14 x 100) the the extension setting still works OK but the dots seem to be so small that they disappear - almost. A magnifying glass helped me spot the single pixel!!
Perhaps changing the marker size for series 1 and 2 might help?
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004