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 waterfall graph for which negative bars are coloured in red and positive bars in green. The user wants the data text displayed on the graph, but without the minus sign for the negative numbers.
I can get this to work in HTML format on screen, but as soon as I hold the graph the minus sign is back. (I've tried jpeg, png and svg). This is one of several graphs in a compound pdf.
Does anyone know how to get this to work?
Example Graph
TABLE FILE CAR
SUM
DEALER_COST
RETAIL_COST
COMPUTE MGN/D12.2=RETAIL_COST-DEALER_COST;
COMPUTE MKU/D12.2=(-0.25)*DEALER_COST;
COMPUTE COST/D12.2=DEALER_COST+MKU;
BY CAR
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS TESTDATA FORMAT ALPHA
END
GRAPH FILE TESTDATA
SUM
MKU AS ''
BY CAR AS ''
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET GRAPHSTYLE *
setFontSizeAbsolute(getDataText(),true);
setFontName(getDataText(),"Arial");
setCustomDataText(getDataText(0),false);
setDisplay(getDataText(),true);
setDataTextFormat(-1);
setDataTextFormatPattern("##;##");
setPlaceResize(getDataText(),0);
setFontSize(getDataText(),6);
setFontStyle(getDataText(),0);
setFillColor(getDataText(),new Color(0,0,0));
setPlacePosition(getDataText(),1);
ENDSTYLE
END
This message has been edited. Last edited by: Kerry,
WF 7.6.11 Output: HTML, PDF, Excel
Posts: 123 | Location: UK | Registered: October 09, 2003
Waz, when I hold the graph using that format, it reverts to a negative sign again in the picture.
Doug, if I calculate the ABS value the graph won't display properly, it is negative number and needs to be plotted as such. The user (don't you just love them) just wants to display the value without the negative sign but plot it as a negative number.
Thanks for the suggestions.
WF 7.6.11 Output: HTML, PDF, Excel
Posts: 123 | Location: UK | Registered: October 09, 2003
TABLE FILE CAR SUM DEALER_COST RETAIL_COST COMPUTE MGN/D12.2=RETAIL_COST-DEALER_COST; COMPUTE MKU/D12.2=(-0.25)*DEALER_COST; COMPUTE COST/D12.2=DEALER_COST+MKU; BY CAR ON TABLE SET HOLDLIST PRINTONLY ON TABLE HOLD AS TESTDATA FORMAT ALPHA END GRAPH FILE TESTDATA SUM MKU AS '' BY CAR AS '' ON GRAPH SET LOOKGRAPH VBAR ON GRAPH SET GRAPHSTYLE * setFontSizeAbsolute(getDataText(),true); setFontName(getDataText(),"Arial"); setCustomDataText(getDataText(0),false); setDisplay(getDataText(),true); setDataTextFormat(-1); setDataTextFormatPattern("(##);##"); setPlaceResize(getDataText(),0); setFontSize(getDataText(),6); setFontStyle(getDataText(),0); setFillColor(getDataText(),new Color(0,0,0)); setPlacePosition(getDataText(),1); ENDSTYLE END
WF 7.7.02 on Windows 7 Teradata HTML,PDF,EXCEL,AHTML
I modified your example a bit (when you have both positive and negative values, the positive values are shown between brackets). I changed
setDataTextFormatPattern("(##);##"); in
setDataTextFormatPattern(" ##;##");
... plus now the graph has green and red bars, depending on the values.
TABLE FILE CAR
SUM
DEALER_COST
RETAIL_COST
COMPUTE MGN/D12.2=RETAIL_COST-DEALER_COST;
COMPUTE FCTR/D5.2 = IF COUNTRY IN ('JAPAN','ENGLAND') THEN -1 ELSE 1;
COMPUTE MKU/D12.2=FCTR*DEALER_COST;
COMPUTE COST/D12.2=DEALER_COST+MKU;
BY CAR
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS TESTDATA FORMAT ALPHA
END
GRAPH FILE TESTDATA
SUM
MKU AS ''
BY CAR AS ''
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET GRAPHSTYLE *
setDepthRadius(0);
setFontSizeAbsolute(getDataText(),true);
setFontName(getDataText(),"Arial");
setCustomDataText(getDataText(0),false);
setDisplay(getDataText(),true);
setDataTextFormat(-1);
setDataTextFormatPattern(" ##;##");
setPlaceResize(getDataText(),0);
setFontSize(getDataText(),9);
setFontStyle(getDataText(),0);
setFillColor(getDataText(),new Color(0,0,0));
setPlacePosition(getDataText(),1);
ENDSTYLE
ON TABLE SET STYLE *
TYPE=DATA, COLOR=RED, WHEN=MKU LT 0 ,$
TYPE=DATA, COLOR=LIME, WHEN=MKU GE 0 ,$
END