February 27, 2006, 12:46 AM
Qalqiliis 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?
-
thanX
February 27, 2006, 08:18 AM
PeteHi 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.
February 28, 2006, 08:14 AM
QalqiliThanX a lot Pete