Focal Point
is it possible to change the bar color in the graph

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

February 27, 2006, 12:46 AM
Qalqili
is it possible to change the bar color in the graph
hi

i want to ask is it possible to change the bar color at the graph ,because i want some bar to be appear in specified color when it meet some Criteria {such as conditional style in the report}?if So how? Smiler-

thanX


WF 7.7.0.3HF3 / WinXP- WF-Client & Apache / DevStd 7.7.0.3HF3 win XP.
February 27, 2006, 08:18 AM
Pete
Hi Qalqili,

Yes , it is possible to do color coding in a graph

Basically you define macro , in which you set the conditions of your colors, and then use these macro's on your data


here is an example

DEFINE FILE CAR
SALES/D10=SALES/1000;
END
GRAPH FILE CAR
SUM SALES AS 'Sales for'
BY COUNTRY
ON GRAPH SET LOOKGRAPH BAR
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH SET GRAPHSTYLE *
setLegendDisplay(false);
setGaugeBackgroundStyle(7);
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setSeriesType(0,0);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setPlace(true);
ENDSTYLE
ON GRAPH SET STYLE *
PAGESIZE='Letter',
LEFTMARGIN=0.250000,
RIGHTMARGIN=0.250000,
TOPMARGIN=0.250000,
BOTTOMMARGIN=0.250000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
BACKCOLOR='NONE',
STYLE=NORMAL,
$
DEFMACRO=COND0001,
MACTYPE=RULE,
WHEN=SALES LT 80,
$
DEFMACRO=COND0002,
MACTYPE=RULE,
WHEN=SALES GT 80,
$
TYPE=DATA,
COLOR='SILVER',
$
TYPE=DATA,
COLOR='LIME',
MACRO=COND0002,
$
TYPE=DATA,
COLOR='RED',
MACRO=COND0001,
$

ENDSTYLE
END



hope it helps

P.


D: WF 7.6.2 P. : WF 7.6.2 on W2003
------------------------------------------------------------------
I see myself as an intelligent, sensitive human, with the soul of a clown which forces me to blow it at the most important moments.

-Jim Morrison-

February 28, 2006, 08:14 AM
Qalqili
ThanX a lot Pete


WF 7.7.0.3HF3 / WinXP- WF-Client & Apache / DevStd 7.7.0.3HF3 win XP.