Focal Point
[CLOSED] Graph Data Labels - Conditional Styling

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5847087196

October 08, 2019, 09:27 AM
WebFOCUS_Dev
[CLOSED] Graph Data Labels - Conditional Styling
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
October 08, 2019, 09:43 AM
pav
Hello,
This link may be useful
http://forums.informationbuild...1057331/m/1417053196
October 08, 2019, 09:57 AM
WebFOCUS_Dev
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