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 have a pretty good handle on hard-coding the Green/Yellow/Red "target" bands on the gauge graph. However, I am more interested in making these bands dynamic, based on data source fields.
For example, I want the needle to show yesterday's sales. The red band will start at zero (hardcoded) and then go to the sales for 1 year ago. The Green will start where the red stops and continue off the graph. I was also considering having yellow be some arbitrary amount between red and green.
The colour bands are controlled by the following commands:
The output I get makes no sense, as Band 1 is red when I hardcode a number, but shows green when the field name is used. Furthermore, the value it is displaying is garbage; it starts at zero and goes to around 10 before stopping. This is the same behaviour that the chart defaults to before you edit the band ranges (red, yellow, green barely showing in the bottom left of the gauge).
I've tried populating variables with the -SET command to make them equal the SALES_SDLY field, and then putting the variable in the setGaugeBandMax field. Same strange behaviour. I know the variable passes correctly, since I can hardcode the variable's value in the set command and it behaves how it should. Seems like the graph just doesn't want me to use a field to control the bands.
Please help,
Joey
WF7.1, Tomcat on Linux, Informix on AIX
Posts: 318 | Location: Los Angeles, CA | Registered: November 15, 2005
I'm surprized that you got anything at all using a fieldname in the API code.
Take a look at the following example based on GGSALES.
SET HOLDLIST=PRINTONLY DEFINE FILE GGSALES YEAR/I4=EDIT(EDIT(EDIT(DATE),'9999')); DOLLARSLY/I8=IF YEAR EQ 1996 THEN DOLLARS ELSE 0; BUDDOLLARSLY/I8=IF YEAR EQ 1996 THEN BUDDOLLARS ELSE 0; BUDDOLLARSTY/I8=IF YEAR EQ 1997 THEN BUDDOLLARS ELSE 0; END TABLE FILE GGSALES SUM DOLLARSLY BUDDOLLARSLY BUDDOLLARSTY BY REGION WHERE YEAR EQ 1996 OR 1997 ON TABLE HOLD AS H1 END -RUN
TABLE FILE H1 SUM AVE.DOLLARSLY NOPRINT COMPUTE YELLOWMIN/I9= C1 * .8; COMPUTE YELLOWMAX/I9= C1; COMPUTE GREENMIN/I9=C1 * 1.1; COMPUTE FULLD/D12.6=((AVE.BUDDOLLARSTY * 1.2)/1000000)+.5; NOPRINT COMPUTE FULL/I9=INT(FULLD)*1000000; ON TABLE HOLD AS VALUES FORMAT ALPHA END -RUN -READ VALUES &YELLOWMIN.A9. &YELLOWMAX.A9. &GREENMIN.A9. &FULL.A9. GRAPH FILE GGSALES HEADING CENTER "Regional Sales performance 1997 vs 1996" SUM DOLLARS ACROSS REGION WHERE YEAR EQ 1997 ON GRAPH SET LOOKGRAPH GAUGE1 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 SET GRAPHSTYLE *
Hello - I have searched through the forum for 'Guage' topics. Can guage settings (like band definitions and label locations) be managed through the gui (report painter / graph assistant) ?