Not sure if you have encountered this before. I have done a gauge graph, and everything seems to be working fine, excpet that for some absurd reason "5" is being displayed as "1".
If I have the axis values as 45, 50, 55, 60, 65...then it comes up like 41, 10, 11, 60, 61..
Any help/pointers?????
August 21, 2007, 12:48 AM
Piipster
Can you reproduce this with the car file and show us your code?
ttfn, kp
Access to most releases from R52x, on multiple platforms.
August 21, 2007, 01:24 AM
<hellonitiv>
It would be extremely difficult to put it using the CAR tale, as I have done a lot of processing on the database side for this.
I just checked the problem all over again, and it seesm there is a difference in the way -READ is treating decimals.
I have defined some variables in my table using the following code snippet.
TABLE FILE DSHDATA SUM AVE.UTILIZATION_VALUE NOPRINT COMPUTE GPHMIN1/A6 = GRAPHMIN; COMPUTE REDMIN1/A6 = REDMIN; COMPUTE AMBMIN1/A6 = AMBERMIN; COMPUTE GRNMIN1/A6 = GREENMIN; COMPUTE GRNMAX1/A6 = GREENMAX; COMPUTE GPHMAX1/A6 = GRAPHMAX; COMPUTE PROJL1/A6 = PROJECTION_VALL; COMPUTE PROJU1/A6 = PROJECTION_VALU; COMPUTE DWKTXT1/A21 = WEEK_OUT_TXT; COMPUTE DAMBMN1/A7 = AMBERMINDISP; COMPUTE DGRNMN1/A7 = GREENMINDISP; WHERE WEEK_OUT_NUMBER EQ 1 ON TABLE HOLD AS VALUES FORMAT ALPHA END -RUN
Then when I display the data in the graph, I am using the following syntax:
SET HAXIS=210, VAXIS=210 GRAPH FILE DSHDATA SUM UTILIZATION_VALUE ACROSS WEEK_OUT_TXT WHERE WEEK_OUT_NUMBER EQ 1 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 PCHOLD FORMAT PNG ON GRAPH SET GRAPHSTYLE * setDisplay(getGaugeTitle(),false);
setGaugeBandMin(getGaugeBand1(), &REDMIN1 ); setGaugeBandMax(getGaugeBand1(), &AMBMIN1 ); setGaugeBandMin(getGaugeBand2(), &AMBMIN1 ); setGaugeBandMax(getGaugeBand2(), &GRNMIN1 ); setGaugeBandMin(getGaugeBand3(), &GRNMIN1 ); setGaugeBandMax(getGaugeBand3(), &GRNMAX1 ); setGaugeBandMin(getGaugeBand4(), &PROJL1 ); setGaugeBandMax(getGaugeBand4(), &PROJU1 ); setY1ScaleMin( &REDMIN1 ); setY1ScaleMax( &GRNMAX1 ); setFillColor(getGaugeBand1(), new Color(255,0,0)); setFillColor(getGaugeBand2(), new Color(250,200,0)); setFillColor(getGaugeBand3(), new Color(0,255,0)); setFillColor(getGaugeBand4(), new Color(20,20,255)); setFillColor(getGaugeNeedle(), new Color(120,120,120)); setDisplay(getGaugeBand5(),false);
When I execute the same fex by hardcoding the values (that I received using the TYPE statement), the values didplayed are proper ("5" is being displayed)
But if I go along with the mormal mode (without hardcoding; by using the variables from READ, all "5" seem to ge converted to "1" at display time).
I hope I was able to explain the scenario properly. Please suggest if I might be missing out on something
August 21, 2007, 09:19 AM
Prarie
Looks like it is rounding up...Is there any reason these are alpha instead of numeric?
In Focus since 1993. WebFOCUS 7.7.03 Win 2003
August 21, 2007, 10:46 AM
Tony A
By mimicing your data and then running your graph against it I get no problems with the values on the bands. Although the max and mix settings didn't appear to work.
OK it's only a single row reproduction and I had to guess the AVE value but it should give an idea!
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
August 21, 2007, 04:16 PM
Ved
Not sure if I expected this... Just check out this car example, same issue is coming up. I used the same format, but with hardcoding of the values. But in my graph also the fives are coming up as ones.
SET HAXIS=210, VAXIS=210 GRAPH FILE CAR SUM COMPUTE ANY_VALUE1/D6.1 = 88.3; AS '' ACROSS COUNTRY WHERE COUNTRY EQ 'ENGLAND' 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 PCHOLD FORMAT PNG ON GRAPH SET GRAPHSTYLE * setDisplay(getGaugeTitle(),false);
setGaugeBandMin(getGaugeBand1(), &REDMIN1.EVAL ); setGaugeBandMax(getGaugeBand1(), &AMBMIN1.EVAL ); setGaugeBandMin(getGaugeBand2(), &AMBMIN1.EVAL ); setGaugeBandMax(getGaugeBand2(), &GRNMIN1.EVAL ); setGaugeBandMin(getGaugeBand3(), &GRNMIN1.EVAL ); setGaugeBandMax(getGaugeBand3(), &GRNMAX1.EVAL ); setGaugeBandMin(getGaugeBand4(), &PROJL1.EVAL ); setGaugeBandMax(getGaugeBand4(), &PROJU1.EVAL ); setY1ScaleMin( &REDMIN1.EVAL ); setY1ScaleMax( &GRNMAX1.EVAL ); setFillColor(getGaugeBand1(), new Color(255,0,0)); setFillColor(getGaugeBand2(), new Color(250,200,0)); setFillColor(getGaugeBand3(), new Color(0,255,0)); setFillColor(getGaugeBand4(), new Color(20,20,255)); setFillColor(getGaugeNeedle(), new Color(120,120,120)); setDisplay(getGaugeBand5(),false);
Anyone got any leads on this??? I am not finding any way out of this...
Its got something to do with the way Webfocus treats the values when displaying in graphs. Even though it is being shown as ones, it still understands and presents as if it were fives.
Simple reason being that 81 is coming right in the middle of 80 and 90, and so on...
Please help!!!
Web Focus 7.1.6 Hosted on Unix Box
August 22, 2007, 12:38 PM
N.Selph
I copied in your code and ran it. The numbers looked correct (I saw displayed a 75,80,85,90,95,97.5).