Focal Point
Drwing Pie chart contains multi series

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

October 22, 2008, 06:21 AM
Qalqili
Drwing Pie chart contains multi series
Dear Developers

i got a requiremnt to draw a Pie chart with multi series, un fortunatley when i try to generate it the pie appear 3 times [each series has its own pie], is there any possibility to draw all series in the same single pie.

i put in x-axis field contains single month like [OCTOBER]. in y-Axis i put many series like S128 ,S256 ,S512 that represent number of users using the corsponding line speed.

when i run the procedure three PIE appear for october one for S128 , S265 and S512. i want it in single Pie each series have its own sector with in same Pie.


I appreciate your help and assistance


WF 7.7.0.3HF3 / WinXP- WF-Client & Apache / DevStd 7.7.0.3HF3 win XP.
October 22, 2008, 09:16 AM
GinnyJakes
Qalqili,

Please update your profile signature with your products, releases, and platforms. This would make it easier to help you.

Secondly, you might want to post your code between the code tags, the red ones on the right in the reply window.

Since I don't know what release you are on or what your code looks like, I can only surmise that you need to look up GRMERGE or 'merge' in graph. You can find information on this in this forum by using the search button or you can do a documentation search by clicking on the doc link in the upper righthand corner of this page.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
October 22, 2008, 10:20 AM
Qalqili
Hi Ginny

i am using WF.713. i try to search in documentaion but unfortantly i did not find the solution i search in this document.

Creating multible graph (merging multible graph)

and here it is the code that i use.

 GRAPH FILE SQLOUT
SUM S128 S256
ACROSS dt_date
ON GRAPH SET LOOKGRAPH PIEMULTI
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 *
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setAxisAssignment(1,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);
setTemplateFile("/images/tdg/template/IBITrueColors.txt");
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,
$
ENDSTYLE
END 



i appreciate your response


WF 7.7.0.3HF3 / WinXP- WF-Client & Apache / DevStd 7.7.0.3HF3 win XP.
October 24, 2008, 06:11 AM
<JG>
You are not trying to create a PIE chart that has multiple series
you are trying to create a PIE chart that has multiple groups.

You can not create a PIE chart that contains multiple groups in a single chart.

The only option that is available is to convert the multiple groups into a single group.

This requires that you process the data multiple times and reassign the measures to an
artifical group/series.

look at the following example.

FILEDEF CARH DISK CARH.FTM (APPEND
-RUN
DEFINE FILE CAR
COUNTRYX/A50= COUNTRY || ' Dealer Cost';
COUNTRYY/A50= COUNTRY || ' Retail Cost';
END
TABLE FILE CAR
SUM DEALER_COST
BY COUNTRYX AS 'COUNTRY'
ON TABLE SET ASNAMES ON
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS CARH FORMAT ALPHA
END
-RUN
TABLE FILE CAR
SUM RETAIL_COST
BY COUNTRYY
ON TABLE SAVE AS CARH
END
-RUN
-*INTERNAL_PROPERTIES$fieldDisplayMode=label;OBJECTID=GLOBAL
-*INTERNAL_PROPERTIES$enablePreview=true;OBJECTID=GLOBAL
-*INTERNAL_PROPERTIES$prefixDisplayMode=;OBJECTID=GLOBAL
-*INTERNAL_PROPERTIES$GlobalRecordLimit=500;OBJECTID=GLOBAL
-*INTERNAL_PROPERTIES$SampleData=false;OBJECTID=GLOBAL
GRAPH FILE CARH
-* Created by Advanced Graph Assistant
SUM CARH.CARH.DEALER_COST
BY CARH.CARH.COUNTRY
ON GRAPH PCHOLD AS HOLD FORMAT PNG
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET HAXIS 770
ON GRAPH SET VAXIS 405
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH PIESINGL
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 0
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBISouthWestern.txt");
setReportParsingErrors(false);
setSelectionEnableMove(false);
setPieDepth(10);
setPieFeelerTextDisplay(1);
setTransparentBorderColor(getChartBackground(),true);
setPlace(true);
ENDSTYLE
ON GRAPH SET STYLE *
ENDSTYLE
END
October 28, 2008, 06:37 AM
Qalqili
Dear JG

ThanX, very much for your effort and sample code . it works perfect. and this is my fina;l code

 ENGINE SQLMSS SET DEFAULT_CONNECTION SQL135
SQL SQLMSS PREPARE SQLOUT FOR
SELECT DATENAME(MONTH,dt_date)AS dt_date,Marked2Day,ActiveAbusers,S128,S256,S512,S1024,S2048,S4096,S8m,S10m,NewAccInUse,refillno,intUpgrade,ExpAb,TotAbExp FROM NesmaApps.dbo.Abuser_Reports
WHERE MONTH(CONVERT(CHAR,dt_date,111))=9 OR MONTH(CONVERT(CHAR,dt_date,111))=10;
END
FILEDEF CARH DISK CARH.FTM (APPEND
-RUN
DEFINE FILE SQLOUT
SeriesX/A50= dt_date || ' 128';
SeriesY/A50= dt_date || ' 256';
SeriesZ/A50= dt_date || ' 512';
SeriesF/A50= dt_date || ' 1024';
SeriesG/A50= dt_date || ' 2048';
SeriesH/A50= dt_date || ' 4096';
SeriesJ/A50= dt_date || ' 8Mb';
SeriesK/A50= dt_date || ' 10Mb';
END
TABLE FILE SQLOUT
SUM S128
BY SeriesX AS 'SS'
ON TABLE SET ASNAMES ON
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS CARH FORMAT ALPHA
END
-RUN
TABLE FILE SQLOUT
SUM S256
BY SeriesY
ON TABLE SAVE AS CARH
END
-RUN
TABLE FILE SQLOUT
SUM S512
BY SeriesZ
ON TABLE SAVE AS CARH
END
-RUN
TABLE FILE SQLOUT
SUM S1024
BY SeriesF
ON TABLE SAVE AS CARH
END
-RUN
TABLE FILE SQLOUT
SUM S2048
BY SeriesG
ON TABLE SAVE AS CARH
END
-RUN
TABLE FILE SQLOUT
SUM S4096
BY SeriesH
ON TABLE SAVE AS CARH
END
-RUN
TABLE FILE SQLOUT
SUM 8Mb
BY SeriesJ
ON TABLE SAVE AS CARH
END
-RUN
TABLE FILE SQLOUT
SUM 10Mb
BY SeriesK
ON TABLE SAVE AS CARH
END
-RUN
-*INTERNAL_PROPERTIES$fieldDisplayMode=label;OBJECTID=GLOBAL
-*INTERNAL_PROPERTIES$enablePreview=true;OBJECTID=GLOBAL
-*INTERNAL_PROPERTIES$prefixDisplayMode=;OBJECTID=GLOBAL
-*INTERNAL_PROPERTIES$GlobalRecordLimit=500;OBJECTID=GLOBAL
-*INTERNAL_PROPERTIES$SampleData=false;OBJECTID=GLOBAL
GRAPH FILE CARH
-* Created by Advanced Graph Assistant
SUM S128 AS ' '
BY HIGHEST SS
ON GRAPH SET LOOKGRAPH PIEMULTI
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 SET VAXIS 405.000
ON GRAPH SET HAXIS 770.000
ON GRAPH SET UNITS PIXELS
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET GRAPHSTYLE *
setReportParsingErrors(false);
setSelectionEnableMove(false);
setPieDepth(10);
setTransparentBorderColor(getChartBackground(),true);
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setSeriesType(0,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);
setTemplateFile("/images/tdg/template/IBIColorToWhite.txt");
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,
$
ENDSTYLE
END


Thanks again for your help.


WF 7.7.0.3HF3 / WinXP- WF-Client & Apache / DevStd 7.7.0.3HF3 win XP.