Focal Point
[CLOSED] VZERO and missing data at end of Graph

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

March 15, 2012, 11:30 AM
Tewy
[CLOSED] VZERO and missing data at end of Graph
I'm creating a line graph that needs to show Jan - Dec of this year on it. As its only March there is only data for Jan and Feb, I'm using the COLUMNS command to force the display of the columns with missing data but am having a problem with VZERO.

As there is no data, I want the line to finish at Feb, if I use VZERO = OFF months Mar - Dec disappear, if I put VZERO on they display but with 0 value. If I change the column order so that Jan is first and Feb is last it will show all the other months with missing, so its only where the missing values are at the end of the graph, is there a setting I need somewhere to make this work?

To explain - If I put the columns in this order USA and SPAIN are missing

 
GRAPH FILE CAR
SUM
DEALER_COST
ACROSS COUNTRY COLUMNS
'ENGLAND' AND
'FRANCE' AND
'ITALY' AND
'JAPAN' AND
'W GERMANY' AND
'USA' AND
'SPAIN'
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET VZERO OFF
ON GRAPH SET GRAPHSTYLE *
setFillMissingData(0);
ENDSTYLE
END


If I put the columns in this order they are correctly displayed.
  
GRAPH FILE CAR
SUM
DEALER_COST
ACROSS COUNTRY COLUMNS
'ENGLAND' AND
'USA' AND
'SPAIN' AND
'FRANCE' AND
'ITALY' AND
'JAPAN' AND
'W GERMANY'
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET VZERO OFF
ON GRAPH SET GRAPHSTYLE *
setFillMissingData(0);
ENDSTYLE
END

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


WF 7.6.11
Output: HTML, PDF, Excel
March 15, 2012, 04:58 PM
Waz
One way is to set the values out of the range, and not show them

GRAPH FILE CAR
SUM
DEALER_COST
ACROSS COUNTRY COLUMNS
'ENGLAND' AND
'FRANCE' AND
'ITALY' AND
'JAPAN' AND
'W GERMANY' AND
'USA' AND
'SPAIN'
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET GRAPHSTYLE *
setY1ScaleMinAuto(false);
setY1ScaleMin(1.0);
setDisplayOffScale(getY1Axis(),false);
ENDSTYLE
END



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!

March 16, 2012, 05:43 AM
Tewy
Unfortunately that's not going to work for the particular graph I'm working with, as the values for Jan and Feb on my graph are 0.

This technique would not show those values either.

Is there some definition somewhere that explains why this won't work as I think it's supposed to, or is this a bug I need to raise with IB?


WF 7.6.11
Output: HTML, PDF, Excel
March 18, 2012, 04:49 PM
Waz
Another option is to determine the missing data, set it to an amount that will not be in the graph, and stop it from displaying.

e.g.
TABLE FILE CAR
SUM
COMPUTE DLR_COST/D7 MISSING ON = DEALER_COST ;
BY COUNTRY ROWS
'ENGLAND' OVER
'FRANCE' OVER
'ITALY' OVER
'JAPAN' OVER
'W GERMANY' OVER
'USA' OVER
'SPAIN'
ON TABLE HOLD AS EXTR FORMAT ALPHA
END

DEFINE FILE EXTR
DCOST/D16 = IF DLR_COST IS MISSING THEN -1 ELSE DLR_COST ;
END

GRAPH FILE EXTR
SUM
DCOST
ACROSS E01 COLUMNS
'ENGLAND' AND
'FRANCE' AND
'ITALY' AND
'JAPAN' AND
'W GERMANY' AND
'USA' AND
'SPAIN'
ON GRAPH SET LOOKGRAPH VLINE
-*ON GRAPH SET VZERO OFF
ON GRAPH SET GRAPHSTYLE *
setY1ScaleMinAuto(false);
setY1ScaleMin(0.0);
setDisplayOffScale(getY1Axis(),false);
ENDSTYLE
END



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!