Focal Point
Negative Values and VBRSTKPC

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

September 28, 2011, 06:15 AM
Tewy
Negative Values and VBRSTKPC
I am using VBRSTKPC to draw a graph, on occasion one of the values may be negative. The graph handles this as expected with the negative value showing below the 0% line and the positive bar not adding up to 100%.

The problem is the users want the % value displayed on the graph. The positive values show correctly but the negative values always show -100%, even though the bar size indicates -20%

I've repro'd with the Car file below, can someone see what I'm doing wrong.

TABLE FILE CAR
SUM
DEALER_COST
RETAIL_COST
COMPUTE MARGIN/D12.2=RETAIL_COST-DEALER_COST;
COMPUTE MARKUP/D12.2=IF CAR IN ('JAGUAR' 'AUDI' 'BMW') THEN (-0.25)*DEALER_COST ELSE 0;
COMPUTE COST/D12.2=DEALER_COST+MARKUP;
BY CAR
ON TABLE HOLD AS TESTDATA
END
GRAPH FILE TESTDATA
SUM
MARKUP
COST
MARGIN
ACROSS CAR 
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH SET GRWIDTH 0
ON GRAPH SET GRMERGE OFF
ON GRAPH SET GRMULTIGRAPH 1
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBRSTKPC
ON GRAPH SET GRAPHSTYLE *
setMarkerDisplay(true);
setConnectLineMarkers(true);
setConnectScatterMarkers(false);
setAxisAssignment(0,0);
-*
setO1MinorGridDisplay(false);
setO1MajorGridDisplay(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setFontSizeAbsolute(getO1Label(),true);
setPlaceResize(getO1Label(),0);
setFontSize(getO1Label(),6);
setTextRotation(getO1Label(0),0);
-*
setY1MajorGridDisplay(false);
setY1MinorGridDisplay(false);
setY1LabelDisplay(true);
setY1AxisSide(0);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"%");
setDisplay(getY1Title(),false);
-* 
setFontSizeAbsolute(getDataText(),true);
setFontName(getDataText(),"Arial");
setDataTextDisplay(true);
setDataTextPosition(4);
 -*
setPlace(true);
setStackedDataValueSum(false); 
ENDSTYLE
ON GRAPH SET STYLE *
TYPE=HEADING, $
ENDSTYLE
END
  



WF 7.6.11
Output: HTML, PDF, Excel
September 28, 2011, 12:39 PM
njsden
Interesting ... all the percentages over 0 add to exactly 100%, whereas the ones below 0 add to -100%.

For the purpose of illustration, what exact percentage values would you expect to see for MARKUP, COST and MARGIN on "AUDI", for instance?

This message has been edited. Last edited by: njsden,



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
September 28, 2011, 12:48 PM
njsden
"A Percent Bar chart is a bar version of a pie chart. The axis goes from 0 to 100".

One would assume that a "secondary" axis would go from -100 to 0 consistently with the above.

I cannot visualize how a scale of -20% to 100% would work Confused



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
September 28, 2011, 05:48 PM
Waz
This seems to be a bug, lodge it with techsupport.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

September 29, 2011, 03:01 AM
Tewy
Thanks for your responses, I'll raise the issue with IB.

njsden,

The graph is for OEE. The 100% mark is the total amount of time that was available in that week. The stacked series are the different losses that were incurred to production for different reasons, and these should add up to 100%, except that sometimes a gain in time can be made as work is done faster than anticipated, this is what is shown as negative.

I'm open to any suggestions for a better way to represent it.

Thanks


WF 7.6.11
Output: HTML, PDF, Excel