Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Conditional Image Next to Each Bar in Graph
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Conditional Image Next to Each Bar in Graph
 Login/Join
 
Gold member
posted
Hey All,

I'm trying to think of a way to be able to put a traffic light next to a bar graph and wondering if there's a way to do it in FOCUS.

In the car file below, I'd like to place the "TREND" compute number next to each bar and make that a conditional image depending on whether the number is positive or negative.


GRAPH FILE CAR
SUM
	SALES
	COMPUTE TREND/D12 = (SALES - RETAIL_COST)/RETAIL_COST;
BY COUNTRY
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
-*ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 2
ON GRAPH SET LOOKGRAPH HBAR
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setPlace(true);
setCurveFitEquationDisplay(false);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
TYPE=HEADING, JUSTIFY=CENTER, FONT='ARIAL', STYLE=BOLD, SIZE=11, COLOR=RGB(75 75 75), $
TYPE=FOOTING, LINE=1, ITEM=1, COLOR=RGB(0 77 113),$
TYPE=FOOTING, LINE=1, ITEM=2, OBJECT=TEXT, FONT='ARIAL', SIZE=8, STYLE=NORMAL, $
*GRAPH_SCRIPT
setDataTextDisplay(true);
setDataTextPosition(4);
setDisplay(getDataText(0), true);
*GRAPH_JS_FINAL
"pieProperties": {
    "holeSize": "0%"
},
"blaProperties": {
    "seriesLayout": "stacked",
    "orientation": "horizontal"
},
"agnosticSettings": {
    "chartTypeFullName": "Bar_Stacked_Horizontal"
}
*END
ENDSTYLE
END
-RUN

-*IA_GRAPH_FINISH
 


Thanks in advance for your help and looking at this!!

This message has been edited. Last edited by: Brandon Andrathy,


WebFOCUS 8204
 
Posts: 84 | Registered: July 10, 2018Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Brandon

Thought I answered this the other day but I guess not. You will have to use Traffic Light conditions on the Trend field when I tried to trick WF by creating a DEFINE of an image and reference that the graph would not open in the GUI again and did not display the image when running it from the text editor.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 1749 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Gold member
posted Hide Post
Thanks Chuck, appreciate it! came up with another solution. This isn't typically a way for users to view data so went with another approach.


WebFOCUS 8204
 
Posts: 84 | Registered: July 10, 2018Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Conditional Image Next to Each Bar in Graph

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.