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,
This seems to be a bug, lodge it with techsupport.
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!
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.