How can I set gauge scale from 50 to 100? I have data ranges from 50 to 100 and I don't want to show the scale from 0 - 50. Please give me your thoughts to set scale from 50.
Webfocus 7.6.9, WindowsThis message has been edited. Last edited by: Kerry,
June 10, 2010, 01:38 AM
Waz
It would be a good idea for you to check up on the manuals.
There have been many posts about charting and where the documentation is.
setY1ScaleMin({value});
setY1ScaleMax({value});
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
June 10, 2010, 02:28 AM
Praven
Thank you so much for posting the answer. I already tried that code but still scale is starting from 0. Below is my code with car file. Not sure why it is not starting from 10000 scale. Please share your thoughts. GRAPH FILE CAR SUM SALES AS ' ' ACROSS COUNTRY AS ' ' -*WHERE COUNTRY IN ('ENGLAND','ITALY','JAPAN','FRANCE') -*WHERE STATUS EQ 'New' ON GRAPH SET LOOKGRAPH GAUGE1 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 VAXIS 500 ON GRAPH SET HAXIS 900 ON GRAPH PCHOLD FORMAT PNG ON GRAPH SET GRAPHSTYLE * setReportParsingErrors(false); setSelectionEnableMove(false); setGaugeMajorAutoStep(false); setScaleFromZero(false); setY1ScaleMin(10000); setY1ScaleMax(90000); -*setY1MinorGrid(70); setGridStep(getY1MajorGrid(),10000.0); setDisplay(getGaugeBand1(),true); setDisplay(getGaugeBand2(),true); setBorderColor(getGaugeBand1(),new Color(255,255,255)); setBorderColor(getGaugeBand2(),new Color(0,0,255)); setBorderColor(getGaugeBand3(),new Color(0,0,0)); setBorderColor(getGaugeBand4(),new Color(0,0,255)); setBorderColor(getGaugeBand5(),new Color(255,255,255)); setPiesPerRow(4); setDisplay(getGaugeTitle(),true); setGaugeTitlePosition(1); setMarkerDisplay(true); setPieFeelerTextDisplay(1); setPieLabelDisplay(0); setTextFormatPreset(getPieSliceLabel(),1); setLegendDisplay(true); setFontSizeAbsolute(getY1Title(),true); setFontSizeAbsolute(getY1Label(),true); setPlace(true); setPlaceResize(getGaugeTitle(), 0); setFillColor(getChartBackground(),new Color(255,255,255)); setFillColor(getGaugeNeedle(),new Color(255,255,255)); setTransparentFillColor(getGaugeArea(),false); setGaugeIgnoreBackgroundStyle(true); setGradientNumPins(getChartBackground(), 2); setGradientPinPosition(getChartBackground(), 0.0,0); setGradientPinPosition(getChartBackground(), 1.0,1); setFillType(getChartBackground(), 1); setGaugeBackgroundStyle(7); setGradientPinLeftColor(getChartBackground(),new Color(255,255,255), 0); setGradientPinRightColor(getChartBackground(),new Color(255,255,255), 0); setFontName(getY1Label(),"Calibiri"); setFontSizeAbsolute(getY1Label(), true); setFontSizeInPoints(getY1Label(), 4); setFillColor(getGaugeValue(),new Color(192,192,192)); ENDSTYLE END -EXIT
June 10, 2010, 07:13 PM
Waz
Looks like this is a bug, as it works in 7.1.6, but does not in 7.6.9.
Thank you so much for your answer. You are the expert . Meagher I have one more issue in this gauge graphs. As the band width colors are not working as expected. For the same car file when I divided the bands into 5 and with different colors these band colors are not coming properly. ((255 0 0) red (0 255 0) Green (255 255 0) Yellow). Thank you so much for your time
GRAPH FILE CAR SUM SALES AS ' ' ACROSS COUNTRY AS ' ' ON GRAPH SET LOOKGRAPH GAUGE1 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 VAXIS 250 ON GRAPH SET HAXIS 500 ON GRAPH PCHOLD FORMAT PNG ON GRAPH SET GRAPHSTYLE * setReportParsingErrors(false); setSelectionEnableMove(false); setGaugeMajorAutoStep(false); setScaleFromZero(false); setScaleMinAuto(getY1Axis(),false); setScaleMin(getY1Axis(),50000); setScaleMaxAuto(getY1Axis(),false); setScaleMax(getY1Axis(),90000); setGridStep(getY1MajorGrid(),10000.0); -*********************BAND COLORS*****************- setDisplay(getGaugeBand1(),true); setDisplay(getGaugeBand2(),true); setDisplay(getGaugeBand3(),true); setDisplay(getGaugeBand4(),true); setDisplay(getGaugeBand5(),true); setGaugeBandMin(getGaugeBand1(), 10000); setGaugeBandMax(getGaugeBand1(), 20000); setGaugeBandMin(getGaugeBand2(), 20000); setGaugeBandMax(getGaugeBand2(), 30000); setGaugeBandMin(getGaugeBand3(),30000.0); setGaugeBandMax(getGaugeBand3(),40000.0); setGaugeBandMin(getGaugeBand4(),40000.0); setGaugeBandMax(getGaugeBand4(),60000.0); setGaugeBandMin(getGaugeBand5(),60000.0); setGaugeBandMax(getGaugeBand5(),90000.0); setBorderColor(getGaugeBand1(),new Color(255,0,0)); setBorderColor(getGaugeBand2(),new Color(255,255,0)); setBorderColor(getGaugeBand3(),new Color(0,255,0)); setBorderColor(getGaugeBand4(),new Color(255,255,0)); setBorderColor(getGaugeBand5(),new Color(255,0,0)); -*********************END OF BAND COLORS*****************- setPiesPerRow(4); setDisplay(getGaugeTitle(),true); setGaugeTitlePosition(1); setMarkerDisplay(true); setPieFeelerTextDisplay(1); setPieLabelDisplay(0); setTextFormatPreset(getPieSliceLabel(),1); setLegendDisplay(true); setFontSizeAbsolute(getY1Title(),true); setFontSizeAbsolute(getY1Label(),true); setPlace(true); setPlaceResize(getGaugeTitle(), 0); setFillColor(getChartBackground(),new Color(255,255,255)); setFillColor(getGaugeNeedle(),new Color(255,255,255)); setTransparentFillColor(getGaugeArea(),false); setGaugeIgnoreBackgroundStyle(true); setGradientNumPins(getChartBackground(), 2); setGradientPinPosition(getChartBackground(), 0.0,0); setGradientPinPosition(getChartBackground(), 1.0,1); setFillType(getChartBackground(), 1); setGaugeBackgroundStyle(7); setGradientPinLeftColor(getChartBackground(),new Color(255,255,255), 0); setGradientPinRightColor(getChartBackground(),new Color(255,255,255), 0); setFontName(getY1Label(),"Calibiri"); setFontSizeAbsolute(getY1Label(), true); setFontSizeInPoints(getY1Label(), 4); setFillColor(getGaugeValue(),new Color(192,192,192)); ENDSTYLE END
This message has been edited. Last edited by: M Meagher,
June 16, 2010, 04:13 PM
M Meagher
No expert here. I just have a similar gauge application which shows the voltages of our UPS's at our remote field sites. Anything below 12.8 volts triggers an email message with the gauge graphs from the three remote sites. I could just send the voltage, but the gauges look cooler!
I just pasted Praven's code into a focexec, opened it in Advanced Graph Assistant (7.6.11) and made the changes he wanted.
June 16, 2010, 05:14 PM
Dan Satchell
quote:
No expert here
Mike, that's never been my view point of your skills.