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 similar graph and I am working to get a legend like this. It should show 3 colors with text like "ITALY Amount", "JAPAN Amount", "W GERMANY Amount" beside each color. Please suggest.
-SET &SEL1 = 'ITALY';
-SET &SEL2 = 'JAPAN';
-SET &SEL3 = 'W GERMANY';
GRAPH FILE CAR
SUM
SALES
BY COUNTRY AS '' NOPRINT
BY CAR AS ''
WHERE SALES GT 0;
WHERE COUNTRY EQ '&SEL1' OR '&SEL2' OR '&SEL3';
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET LOOKGRAPH VBAR2AX
ON GRAPH SET GRMERGE ON
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBISouthWestern.txt");
setLegendDisplay(true);
ENDSTYLE
ON GRAPH SET STYLE *
PAGESIZE='Letter',$
DEFMACRO=COND0001,MACTYPE=RULE,WHEN=COUNTRY EQ '&SEL1',$
DEFMACRO=COND0002,MACTYPE=RULE,WHEN=COUNTRY EQ '&SEL2',$
DEFMACRO=COND0003,MACTYPE=RULE,WHEN=COUNTRY EQ '&SEL3',$
TYPE=DATA,COLOR='RED',MACRO=COND0001,$
TYPE=DATA,COLOR='GREEN',MACRO=COND0002,$
TYPE=DATA,COLOR='YELLOW',MACRO=COND0003,$
ENDSTYLE
END
This message has been edited. Last edited by: <Kathryn Henning>,
DEFINE FILE CAR
MYCOUNTRY/A50=IF COUNTRY EQ 'ITALY' THEN 'ITALY Amount' ELSE IF COUNTRY EQ 'JAPAN' THEN 'JAPAN Amount' ELSE IF COUNTRY EQ 'W GERMANY' THEN 'W GERMANY Amount';
END
GRAPH FILE CAR
SUM CAR.BODY.SALES
BY MYCOUNTRY
ACROSS CAR.COMP.CAR
WHERE COUNTRY EQ 'ITALY' OR 'JAPAN' OR 'W GERMANY';
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET ARGRAPHENGIN JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBRSTK1
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setFillColor(getSeries(0), new Color(255,0,0));
setFillColor(getSeries(1), new Color(0,255,0));
setFillColor(getSeries(2), new Color(255,255,0));
*END
ENDSTYLE
END
-RUN
Originally posted by nick z: Hi, You could try something like this:
DEFINE FILE CAR
MYCOUNTRY/A50=IF COUNTRY EQ 'ITALY' THEN 'ITALY Amount' ELSE IF COUNTRY EQ 'JAPAN' THEN 'JAPAN Amount' ELSE IF COUNTRY EQ 'W GERMANY' THEN 'W GERMANY Amount';
END
GRAPH FILE CAR
SUM CAR.BODY.SALES
BY MYCOUNTRY
ACROSS CAR.COMP.CAR
WHERE COUNTRY EQ 'ITALY' OR 'JAPAN' OR 'W GERMANY';
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET ARGRAPHENGIN JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBRSTK1
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setFillColor(getSeries(0), new Color(255,0,0));
setFillColor(getSeries(1), new Color(0,255,0));
setFillColor(getSeries(2), new Color(255,255,0));
*END
ENDSTYLE
END
-RUN
Thanks.
thanks nick...this worked.. meanwhile I got it to work using compound pdf and displaying that legend using a dummy report but this is efficient.