Focal Point Banner


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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Graph Data Labels - Conditional Styling

Read-Only Read-Only Topic
Go
New
Search
Notify
Tools
[CLOSED] Graph Data Labels - Conditional Styling
 Login/Join
 
Platinum Member
posted
Hello

Is it possible to apply conditional styling for data labels in a bar graph?
I have conditional styling code which changes the color of the ENGLAND bar to RED. But I am not aware of a way to change color of data label based on same condition.
Basically data label for ENGLAND bar should be WHITE color and all other bar's data labels should be GREEN color.
Please suggest if there is a way.
GRAPH FILE CAR
SUM
	DEALER_COST/D12M AS ''
BY COUNTRY AS ''
ON GRAPH PCHOLD FORMAT PDF
ON GRAPH SET VZERO OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET UNITS INCHES
ON GRAPH SET HAXIS 8
ON GRAPH SET VAXIS 6
ON GRAPH SET GRMERGE ON
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, PAGESIZE=LETTER, ORIENTATION=LANDSCAPE, BACKCOLOR=RGB(255 255 255), $
DEFMACRO=COND0001, MACTYPE=RULE, COLOR=RED, WHEN=N1 EQ 'ENGLAND', $
TYPE=DATA, COLUMN=N2, MACRO=COND0001, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDisplay(getLegendArea(),false);
setDataTextPosition(4);
setDataTextDisplay(true);
setFontSizeAbsolute(getDataText(0),true);
setAutofit(getDataText(0),true);
setPlaceResize(getDataText(0),0);
setTextFormatPattern(getDataText(0),"$#,###");
*END
ENDSTYLE
END
  

Thank you.

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8206
All formats
 
Posts: 95 | Registered: September 13, 2017Report This Post
Platinum Member
posted Hide Post
 
Posts: 109 | Registered: February 02, 2016Report This Post
Platinum Member
posted Hide Post
quote:
Originally posted by pav:
Hello,
This link may be useful
http://forums.informationbuild...1057331/m/1417053196

Thanks for the link Pav. This did not work for me in PDF version on 8201.


WebFOCUS 8206
All formats
 
Posts: 95 | Registered: September 13, 2017Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Graph Data Labels - Conditional Styling

Copyright © 1996-2020 Information Builders