Focal Point
[CLOSED] Gauge Chart addition options (Box and label)

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

January 29, 2020, 12:23 PM
Dev
[CLOSED] Gauge Chart addition options (Box and label)
Hi,

I have a gauge chart and it is working good with basic option. below is my code.
Gauge is showing in 65, and 65 I am displaying in bottom right. here I need to box the value and to add a label on bottom of that. I dont see any option in 8105m version.

Any help please!!!

 
DEFINE FILE CAR
GAUGE_CHRT/D12.2 = 65;
END

-*Do not delete or modify the comments above
ENGINE INT CACHE SET ON
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE car
-* Created by Info Assist for Graph
SUM CAR.BODY.DEALER_COST NOPRINT
GAUGE_CHRT
WHERE RECORDLIMIT EQ 1
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 0
ON GRAPH SET LOOKGRAPH GAUGE1
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/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setPiesPerRow(1);
setDisplay(getGaugeTitle(),false);
setTextFormatPreset(getGaugeValue(),1);
setFillColor(getChartBackground(),new Color(0,0,0,0));
setTransparentBorderColor(getChartBackground(),true);
setScaleMinAuto(getY1Axis(),false);
setScaleMax(getY1Axis(),100.0);
setScaleMaxAuto(getY1Axis(),false);
setGaugeBandMax(getGaugeBand1(),&CUTOVER);
setFontSizeAbsolute(getGaugeValue(),true);
setAutofit(getGaugeValue(),false);
setPlaceResize(getGaugeValue(),0);
setBorderColor(getGaugeBand2(),new Color(0,128,0));
setGaugeBandMax(getGaugeBand2(),100.0);
setFontName(getGaugeValue(),"ARIAL");
setGaugeBandMin(getGaugeBand2(),65.0);
setGaugeColorCenterByQuality(false);
setGaugeStartAngle(120.0);
setGaugeBackgroundStyle(0);

-IF &WARR_EXCE.EVAL GT 65 THEN GOTO :Skip_green;
setFillColor(getGaugeValue(),new Color(255,0,0));
-GOTO :Skip;
-:Skip_green
setFillColor(getGaugeValue(),new Color(0,128,0));
-:Skip

setDisplay(getGaugeValue(),true);
setGaugeStopAngle(340.0);
setFontSizeInPoints(getGaugeValue(),12);
setTextFormatPreset(getY1Label(),1);
setFontName(getY1Label(),"ARIAL BLACK");
setFillColor(getY1Label(),new Color(0,0,0));
setFontSizeAbsolute(getY1Label(),true);
setAutofit(getY1Label(),false);
setFontSizeInPoints(getY1Label(),10);
setPlaceResize(getY1Label(),0);
setGaugeMajorAutoStep(true);
setGaugeRelativeInnerRadius(0.3);
setGaugeMinorAutoStep(true);
setBorderColor(getGaugeMajorTick(),new Color(255,255,255));
setBorderColor(getGaugeMinorTick(),new Color(192,192,192));
setGaugeBandMax(getGaugeBand5(),150.0);
setGaugeBandMin(getGaugeBand4(),120.0);
setGaugeBandMin(getGaugeBand3(),100.0);
setGaugeBandMin(getGaugeBand5(),140.0);
setGaugeBandMax(getGaugeBand4(),130.0);
setGaugeBandMax(getGaugeBand3(),110.0);
setDisplay(getGaugeBand4(),true);
setFillColor(getGaugeBand2(),new Color(0,128,0));
setDisplay(getGaugeBand5(),true);
setDisplay(getGaugeBand3(),true);
setGaugeRelativeThickness(0.03);
*END
*GRAPH_JS
gaugeProperties: {
    axisMinorTickLength: '10%'},
yaxis: {
-*   minorGrid: {
-*      lineStyle: {width: 2,color: 'brown',dash: '2 2'}
-*   },
      intervalMode: 'interval',
      intervalValue: 10
}
*END

ENDSTYLE
END
-RUN
 

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


8202, 8105M, 7.7.03
January 30, 2020, 02:51 PM
FP Mod Chuck
Dev

I don't see a way "Out of the Box" to do what you are asking, it may take some custom Java Script which I have no expertise with...


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats