Hi A.,
Here is an car example
DEFINE FILE CAR
NSALES/D12.2 = IF CAR EQ 'BMW' THEN
(SALES * (-1.0) )
ELSE SALES;
END
GRAPH FILE CAR
SUM NSALES AS 'Sales for'
ACROSS CAR
WHERE ( CAR EQ 'BMW' );
ON GRAPH SET BARNUMB OFF
ON GRAPH SET GRAPHEDIT OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH SET VAXIS 400
ON GRAPH SET HAXIS 400
-*ON GRAPH HOLD AS TEST FORMAT HTMTABLE
ON GRAPH SET GRAPHSTYLE *
setGraphType(110);
setLegendDisplay(true);
setGaugeBackgroundStyle(5);
setFillColor(getGaugeNeedle(), new Color(0,255,0));
setFillColor(getGaugeLabel(), new Color(35,136,120));
setFontStyle(getGaugeLabel(), 2);
-* The two lines below control the font size of the numbers in the Gauge
setFontSizeAbsolute(getGaugeLabel(), true);
setFontSizeInPoints(getGaugeLabel(),8);
setFillColor(getGaugeTitle(), new Color(170,106,197));
setFontStyle(getGaugeTitle(), 2);
-* The two lines below control the font size of the Gauge title
setFontSizeAbsolute(getGaugeTitle(), true);
setFontSizeInPoints(getGaugeTitle(),18);
-* The line below supresses the Gauge Title if the argument is false
setDisplay(getGaugeTitle(),true);
setBorderColor(getGaugeMinorTick(), new Color(255,255,255));
setBorderColor(getGaugeMajorTick(), new Color(0,0,0));
setGaugeRelativeInnerRadius(.8);
setGaugeRelativeThickness(.1);
setDisplay(getGaugeBand1(),false);
setDisplay(getGaugeBand2(),true);
setDisplay(getGaugeBand3(),true);
setDisplay(getGaugeBand4(),false);
setDisplay(getGaugeBand5(),false);
setFillColor(getGaugeBand2(), new Color(205,205,74));
setBorderColor(getGaugeBand2(), new Color(255,255,255));
setFillColor(getGaugeBand3(), new Color(175,175,175));
setBorderColor(getGaugeBand3(), new Color(175,175,175));
setGaugeBandMin(getGaugeBand1(), 5000);
setGaugeBandMax(getGaugeBand1(), 20000);
setGaugeBandMin(getGaugeBand2(), 20000);
setGaugeBandMax(getGaugeBand2(), 40000);
setGaugeBandMin(getGaugeBand3(), 40000);
setGaugeBandMax(getGaugeBand3(), 60000);
setGaugeBandMin(getGaugeBand4(), 60000);
setGaugeBandMax(getGaugeBand4(), 90000);
setGaugeBandMin(getGaugeBand5(), 90000);
setGaugeBandMax(getGaugeBand5(), 100000);
setFillColor(getGaugeBand5(), new Color(0,0,255));
-* The four lines below control the Maximum value on the Scale
-* and how often major tick marks are displayed
setScaleMaxAuto(getY1Axis(), false);
setScaleMax(getY1Axis(),100000.0);
setGaugeMajorAutoStep(false);
setY1MajorGridStep(5000);
-* The next two lines control the low end of the scale
setScaleMinAuto(getY1Axis(), false);
setScaleMin(getY1Axis(),-1000);
-* The line below allows the scale to begin somewhere other than Zero
setY1MustIncludeZero(false);
-*setFillColor(getGaugeBackground(),new Color(0,0,255));
setGaugeStartAngle(350);
setGaugeStopAngle(359);
setDisplay(getAnnotationBox(0), true);
setTextString(getAnnotation(0), "Just a note");
-*setTextJustVert(getAnnotation(1), 1);
setTextJustHoriz(getAnnotation(0), 1);
setFontSize(getAnnotation(0), 12);
setFontStyle(getAnnotation(0), 3);
setRect(getAnnotation(0), new Rectangle(-3500, -5500,7000, 1500));
setBorderType(getAnnotationBox(0), 3);
setTopInset(getAnnotationBox(0), 150);
setLeftInset(getAnnotationBox(0), 150);
setBottomInset(getAnnotationBox(0), 150);
setGaugeStartAngle(350);
setGaugeStopAngle(359);
setDisplay(getAnnotationBox(0), true);
setTextString(getAnnotation(0), "Just a note");
setTextJustHoriz(getAnnotation(0), 1);
setFontSize(getAnnotation(0), 12);
setFontStyle(getAnnotation(0), 3);
setRect(getAnnotation(0), new Rectangle(-3500, -5500,7000, 1500));
setBorderType(getAnnotationBox(0), 3);
setTopInset(getAnnotationBox(0), 150);
setLeftInset(getAnnotationBox(0), 150);
setBottomInset(getAnnotationBox(0), 150);
setRightInset(getAnnotationBox(0), 150);
setFillColor(getAnnotationBox(0), new Color(253,146,59));
setCornerArcWidth(getAnnotationBox(0),700);
setCornerArcHeight(getAnnotationBox(0),700);
-* Remove annoying box around Gauge
setDisplay(getFrame(), false);
setGaugeTitlePosition(2);
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-