Focal Point
GRAPH - Need to drill on 2 slices of PIE

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

March 25, 2005, 10:16 AM
Craig Kozlow
GRAPH - Need to drill on 2 slices of PIE
This seems so simple but I'm having trouble drilling on 2 (and ONLY 2) slices of a Pie Chart. I can drill on none or all of the slices, but the client wants to discern between 3 slices (GREEN, YELLOW, RED) and drill on the RED and YELLOW slices. Here's a kicker... there is NO ACROSS or BY values for the Chart! The Pie chart generate fine with SUM GREEN YELLOW RED (each slice being a percentage of 100%). STYLESHEETs want to see an ACROSSCOLUMN (or BY) for a drill to workcorrectly. I've tried COLUMN but that doesn't seem to work.

Short of creating some kind of dummy field(s) to "fool" the code, I'm wondering if anyone else has run into this... simply put I'm wondering why something like the following code doesn't work, as each of the slice data is indeed a COLUMN:

GRAPH FILE anyfile
SUM GREEN YELLOW RED
...
TYPE=DATA,COLUMN=N1,COLOR='GREEN',$
TYPE=DATA,COLUMN=N2,COLOR='YELLOW',FOCEXEC=any,$
TYPE=DATA,COLUMN=N3,COLOR='RED',FOCEXEC=anyfex,$
...
END


Thanks! Craig

P.S. Hello Carol (Boone)!
March 25, 2005, 12:13 PM
<JG>
What your doing works in the new 7.1 beta version but not in 5.3

In 5.3 and below you must have an across column
Try to reformat your data and you should be OK:




DEFINE FILE CAR
COLOUR/A6= IF COUNTRY EQ 'ENGLAND' THEN 'GREEN' ELSE IF COUNTRY EQ 'W GERMANY' THEN 'YELLOW' ELSE 'RED';
END
GRAPH FILE CAR
SUM
SEATS ACROSS COLOUR
ON TABLE SET HTMLCSS ON
ON GRAPH SET LOOKGRAPH PIE
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 GIF
ON GRAPH SET GRAPHSTYLE *
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setAxisAssignment(1,0);
setAxisAssignment(2,0);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setPlace(true);
ENDSTYLE
ON GRAPH SET STYLE *
PAGESIZE='Letter',
LEFTMARGIN=0.250000,
RIGHTMARGIN=0.250000,
TOPMARGIN=0.250000,
BOTTOMMARGIN=0.250000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
BACKCOLOR='NONE',
STYLE=NORMAL,
$
TYPE=DATA,COLUMN=N1,COLOR='GREEN',$
TYPE=DATA,COLUMN=N2,COLOR='RED',FOCEXEC=fex1,$
TYPE=DATA,COLUMN=N3,COLOR='YELLOW',FOCEXEC=fex2,$
ENDSTYLE
END

This message has been edited. Last edited by: <Mabel>,
March 25, 2005, 01:00 PM
Craig Kozlow
Thanks for the advice. I was trying to avoid a "fool the code" workaround and I'm glad to hear it works in 7. My only reservation about putting something like this in is I've done stuff like this throughout the years and sometimes, it mysteriously stops working with new release (remember SUFFIX=FOCUS (pre-MF 5.5) vs. SUFFIX=FOC (post-MF 5.5), all you old FOCUS hacks? <g>Wink. But, thanks for the info.... and I'll wait for 7

- Craig
March 27, 2005, 01:06 PM
<JG>
Best make sure that it's a real feature and not a bug in 7.1.

Works in Beta 2, but is not advertized as being an enhancement.

Download the Beta, test it and then raise a hottrack asking for confirmation that it will be maintained.
March 28, 2005, 12:45 PM
Carol Dobson
Hi Craig,

Saw the P.S. on your post. I'm now Carol Dobson!
Welcome to Focal Point, it's a great forum.

Carol