Pie Chart

YossiShenhav

New Member
Joined
Jul 3, 2002
Messages
2
Hello,



I want to create a pie chart, for multiple rows, but I get a chart for the first row only.

In the example file I attached, if you change the chart type to columns, you'll see data for Mexico and USA, but in pie chart type I only get to see data for Mexico.

Why is that? How can I view the data of USA as well? (What I want is to see two pies, one for Mexico and One for USA)

Thanks for any help

Yossi

Save the following script as an *.xls file

<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:eek:="urn:schemas-microsoft-com:eek:ffice:eek:ffice"
xmlns:x="urn:schemas-microsoft-com:eek:ffice:excel"
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1255">
<meta name=ProgId content=Excel.Sheet>
<meta name=Generator content="Microsoft Excel 10">
<link rel=File-List href="chart_files/filelist.xml">
<link rel=Edit-Time-Data href="chart_files/editdata.mso">
<link rel=OLE-Object-Data href="chart_files/oledata.mso">
<!--[if !mso]>
<style>
v:* {behavior:url(#default#VML);}
o:* {behavior:url(#default#VML);}
x:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:LastAuthor>yossi</o:LastAuthor>
<o:Created>2002-07-04T12:12:01Z</o:Created>
<o:LastSaved>2002-07-04T12:12:01Z</o:LastSaved>
<o:Version>10.3501</o:Version>
</o:DocumentProperties>
</xml><![endif]-->
<style>
<!--table
{mso-displayed-decimal-separator:".";
mso-displayed-thousand-separator:",";}
@page
{margin:1.0in .75in 1.0in .75in;
mso-header-margin:.5in;
mso-footer-margin:.5in;}
tr
{mso-height-source:auto;}
col
{mso-width-source:auto;}
br
{mso-data-placement:same-cell;}
.style0
{mso-number-format:General;
text-align:general;
vertical-align:bottom;
white-space:nowrap;
mso-rotate:0;
mso-background-source:auto;
mso-pattern:auto;
color:windowtext;
font-size:10.0pt;
font-weight:400;
font-style:normal;
text-decoration:none;
font-family:Arial;
mso-generic-font-family:auto;
mso-font-charset:177;
border:none;
mso-protection:locked visible;
mso-style-name:Normal;
mso-style-id:0;}
td
{mso-style-parent:style0;
padding:0px;
mso-ignore:padding;
color:windowtext;
font-size:10.0pt;
font-weight:400;
font-style:normal;
text-decoration:none;
font-family:Arial;
mso-generic-font-family:auto;
mso-font-charset:177;
mso-number-format:General;
text-align:general;
vertical-align:bottom;
border:none;
mso-background-source:auto;
mso-pattern:auto;
mso-protection:locked visible;
white-space:nowrap;
mso-rotate:0;}
.xl24
{mso-style-parent:style0;
text-align:left;
border-top:.5pt solid windowtext;
border-right:.5pt solid windowtext;
border-bottom:none;
border-left:.5pt solid windowtext;
background:silver;
mso-pattern:auto none;
white-space:normal;}
.xl25
{mso-style-parent:style0;
text-align:left;
border-top:.5pt solid windowtext;
border-right:none;
border-bottom:.5pt solid windowtext;
border-left:.5pt solid windowtext;
background:silver;
mso-pattern:auto none;
white-space:normal;}
.xl26
{mso-style-parent:style0;
text-align:left;
border-top:.5pt solid windowtext;
border-right:none;
border-bottom:.5pt solid windowtext;
border-left:none;
background:silver;
mso-pattern:auto none;
white-space:normal;}
.xl27
{mso-style-parent:style0;
text-align:left;
border-top:.5pt solid windowtext;
border-right:.5pt solid windowtext;
border-bottom:.5pt solid windowtext;
border-left:none;
background:silver;
mso-pattern:auto none;
white-space:normal;}
.xl28
{mso-style-parent:style0;
text-align:left;
border-top:none;
border-right:.5pt solid windowtext;
border-bottom:.5pt solid windowtext;
border-left:.5pt solid windowtext;
background:silver;
mso-pattern:auto none;
white-space:normal;}
.xl29
{mso-style-parent:style0;
text-align:left;
border:.5pt solid windowtext;
background:silver;
mso-pattern:auto none;
white-space:normal;}
.xl30
{mso-style-parent:style0;
text-align:right;
border:.5pt solid windowtext;
background:white;
mso-pattern:auto none;
white-space:normal;}
.xl31
{mso-style-parent:style0;
text-align:center;
border-top:.5pt solid windowtext;
border-right:none;
border-bottom:.5pt solid windowtext;
border-left:.5pt solid windowtext;
background:#CCCCFF;
mso-pattern:auto none;
white-space:normal;}
.xl32
{mso-style-parent:style0;
text-align:center;
border-top:.5pt solid windowtext;
border-right:none;
border-bottom:.5pt solid windowtext;
border-left:none;
background:#CCCCFF;
mso-pattern:auto none;
white-space:normal;}
.xl33
{mso-style-parent:style0;
text-align:center;
border-top:.5pt solid windowtext;
border-right:.5pt solid windowtext;
border-bottom:.5pt solid windowtext;
border-left:none;
background:#CCCCFF;
mso-pattern:auto none;
white-space:normal;}
-->
</style>
<!--[if gte mso 9]><xml>
<x:ExcelWorkbook>
<x:ExcelWorksheets>
<x:ExcelWorksheet>
<x:Name>sheet 1</x:Name>
<x:WorksheetOptions>
<x:Selected/>
<x:Panes>
<x:Pane>
<x:Number>3</x:Number>
<x:RangeSelection>$A$1:$G$1</x:RangeSelection>
</x:Pane>
</x:Panes>
<x:ProtectContents>False</x:ProtectContents>
<x:ProtectObjects>False</x:ProtectObjects>
<x:ProtectScenarios>False</x:ProtectScenarios>
</x:WorksheetOptions>
</x:ExcelWorksheet>
</x:ExcelWorksheets>
<x:WindowHeight>9120</x:WindowHeight>
<x:WindowWidth>10005</x:WindowWidth>
<x:WindowTopX>120</x:WindowTopX>
<x:WindowTopY>135</x:WindowTopY>
<x:ProtectStructure>False</x:ProtectStructure>
<x:ProtectWindows>False</x:ProtectWindows>
</x:ExcelWorkbook>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
</head>

<body link=blue vlink=purple>

<table x:str border=0 cellpadding=0 cellspacing=0 width=554 style='border-collapse:
collapse;table-layout:fixed;width:417pt'>
<col width=64 style='width:48pt'>
<col width=49 span=5 style='mso-width-source:userset;mso-width-alt:1792;
width:37pt'>
<col width=117 style='mso-width-source:userset;mso-width-alt:4278;width:88pt'>
<col width=64 span=2 style='width:48pt'>
<tr height=17 style='mso-height-source:userset;height:12.75pt'>
<td colspan=7 height=17 class=xl31 dir=LTR width=426 style='border-right:
.5pt solid black;height:12.75pt;width:321pt'>Unit Sales by Time over
Customers for Household,Deluxe Supermarket</td>
<td width=64 style='width:48pt'></td>
<td width=64 style='width:48pt'></td>
</tr>
<tr height=17 style='height:12.75pt'>
<td height=17 style='height:12.75pt' align=left valign=top><!--[if gte vml 1]><v:shapetype
id="_x0000_t201" coordsize="21600,21600" o:spt="201" path="m,l,21600r21600,l21600,xe">
<v:stroke joinstyle="miter"/>
<v:path shadowok="f" o:extrusionok="f" strokeok="f" fillok="f"
o:connecttype="rect"/>
<o:lock v:ext="edit" shapetype="t"/>
</v:shapetype><v:shape id="_x0000_s1025" type="#_x0000_t201" style='position:absolute;
direction:LTR;text-align:left;margin-left:0;margin-top:10.5pt;width:368.25pt;
height:235.5pt;z-index:1' fillcolor="window [78]" strokecolor="windowText [77]"
o:insetmode="auto">
<v:fill color2="windowText [77]"/>
<o:lock v:ext="edit" rotation="t" text="t"/>
<x:ClientData ObjectType="Chart">
<x:WebChart>
<x:Chart>
<x:Name>Chart 1</x:Name>
<x:Options>
<x:SizeWithWindow/>
</x:Options>
<x:PageSetup>
<x:ChartSize>FullPage</x:ChartSize>
</x:PageSetup>
<x:Font>
<x:FontName>Arial</x:FontName>
<x:Size>10</x:Size>
<x:AutoScale/>
</x:Font>
<x:Left>0</x:Left>
<x:Top>0</x:Top>
<x:Width>7380</x:Width>
<x:Height>4725</x:Height>
<x:ChartGrowth>
<x:HorzGrowth>1</x:HorzGrowth>
<x:VertGrowth>1</x:VertGrowth>
</x:ChartGrowth>
<x:PlotArea>
<x:Left>153.13499999999999</x:Left>
<x:Top>791.4375</x:Top>
<x:Width>4959.36</x:Width>
<x:Height>3778.8187499999999</x:Height>
<x:Border>
<x:ColorIndex>15</x:ColorIndex>
<x:LineStyle>Solid</x:LineStyle>
<x:Weight>Narrow</x:Weight>
</x:Border>
<x:Interior>
<x:ColorIndex>14</x:ColorIndex>
<x:BGColorIndex>Neutral</x:BGColorIndex>
</x:Interior>
<x:Font>
<x:FontName>Arial</x:FontName>
<x:Size>10</x:Size>
<x:AutoScale/>
</x:Font>
<x:Graph>
<x:Type>Pie</x:Type>
<x:SubType>Exploded</x:SubType>
<x:SubType>3D</x:SubType>
<x:VaryColors/>
<x:GapWidth>150</x:GapWidth>
<x:FirstSliceAngle>0</x:FirstSliceAngle>
<x:Series>
<x:Index>0</x:Index>
<x:Caption>
<x:DataSource>0</x:DataSource>
<x:Data>'sheet 1'!$A$26</x:Data>
</x:Caption>
<x:Name>Mexico</x:Name>
<x:Category>
<x:DataSource>0</x:DataSource>
<x:Data>'sheet 1'!$C$23:$F$24</x:Data>
</x:Category>
<x:Value>
<x:DataSource>0</x:DataSource>
<x:Data>'sheet 1'!$C$26:$F$26</x:Data>
</x:Value>
</x:Series>
<x:Series>
<x:Index>1</x:Index>
<x:Caption>
<x:DataSource>0</x:DataSource>
<x:Data>'sheet 1'!$A$27</x:Data>
</x:Caption>
<x:Name>USA</x:Name>
<x:Category>
<x:DataSource>0</x:DataSource>
<x:Data>'sheet 1'!$C$23:$F$24</x:Data>
</x:Category>
<x:Value>
<x:DataSource>0</x:DataSource>
<x:Data>'sheet 1'!$C$27:$F$27</x:Data>
</x:Value>
</x:Series>
<x:PlotVisible/>
</x:Graph>
</x:PlotArea>
<x:Legend>
<x:Placement>Right</x:Placement>
<x:Font>
<x:FontName>Arial</x:FontName>
<x:Size>10</x:Size>
<x:AutoScale/>
</x:Font>
</x:Legend>
</x:Chart>
</x:WebChart>
</x:ClientData>
</v:shape><![endif]--><![if !vml]><span style='mso-ignore:vglayout;
position:absolute;z-index:1;margin-left:0px;margin-top:14px;width:492px;
height:315px'><![endif]><![if !excel]>
image001.gif
<![endif]><![if !vml]></span><![endif]><span
style='mso-ignore:vglayout2'>
<table cellpadding=0 cellspacing=0>
<tr>
<td height=17 dir=LTR width=64 style='height:12.75pt;width:48pt'></td>
</tr>
</table>
</span></td>
<td colspan=8 style='mso-ignore:colspan'></td>
</tr>
<tr height=340 style='height:255.0pt;mso-xlrowspan:20'>
<td height=340 colspan=9 style='height:255.0pt;mso-ignore:colspan'></td>
</tr>
<tr height=17 style='height:12.75pt'>
<td height=17 class=xl24 width=64 style='height:12.75pt;width:48pt'> </td>
<td class=xl24 width=49 style='border-left:none;width:37pt'>1997</td>
<td class=xl25 width=49 style='border-left:none;width:37pt'>1998</td>
<td class=xl26 width=49 style='width:37pt'> </td>
<td class=xl26 width=49 style='width:37pt'> </td>
<td class=xl26 width=49 style='width:37pt'> </td>
<td class=xl27 width=117 style='width:88pt'> </td>
<td colspan=2 style='mso-ignore:colspan'></td>
</tr>
<tr height=17 style='height:12.75pt'>
<td height=17 class=xl28 width=64 style='height:12.75pt;width:48pt'> </td>
<td class=xl28 width=49 style='border-left:none;width:37pt'> </td>
<td class=xl29 width=49 style='border-top:none;border-left:none;width:37pt'>Q1</td>
<td class=xl29 width=49 style='border-top:none;border-left:none;width:37pt'>Q2</td>
<td class=xl29 width=49 style='border-top:none;border-left:none;width:37pt'>Q3</td>
<td class=xl29 width=49 style='border-top:none;border-left:none;width:37pt'>Q4</td>
<td class=xl29 width=117 style='border-top:none;border-left:none;width:88pt'>www</td>
<td colspan=2 style='mso-ignore:colspan'></td>
</tr>
<tr height=17 style='height:12.75pt'>
<td height=17 class=xl29 width=64 style='height:12.75pt;border-top:none;
width:48pt'>Canada</td>
<td class=xl30 width=49 style='border-top:none;border-left:none;width:37pt'>NA</td>
<td class=xl30 width=49 style='border-top:none;border-left:none;width:37pt'
x:num>1000</td>
<td class=xl30 width=49 style='border-top:none;border-left:none;width:37pt'
x:num>1077</td>
<td class=xl30 width=49 style='border-top:none;border-left:none;width:37pt'
x:num>1076</td>
<td class=xl30 width=49 style='border-top:none;border-left:none;width:37pt'
x:num>766</td>
<td class=xl30 width=117 style='border-top:none;border-left:none;width:88pt'>NA</td>
<td colspan=2 style='mso-ignore:colspan'></td>
</tr>
<tr height=17 style='height:12.75pt'>
<td height=17 class=xl29 width=64 style='height:12.75pt;border-top:none;
width:48pt'>Mexico</td>
<td class=xl30 width=49 style='border-top:none;border-left:none;width:37pt'>NA</td>
<td class=xl30 width=49 style='border-top:none;border-left:none;width:37pt'
x:num>2931</td>
<td class=xl30 width=49 style='border-top:none;border-left:none;width:37pt'
x:num>3016</td>
<td class=xl30 width=49 style='border-top:none;border-left:none;width:37pt'
x:num>3306</td>
<td class=xl30 width=49 style='border-top:none;border-left:none;width:37pt'
x:num>1908</td>
<td class=xl30 width=117 style='border-top:none;border-left:none;width:88pt'>NA</td>
<td colspan=2 style='mso-ignore:colspan'></td>
</tr>
<tr height=17 style='height:12.75pt'>
<td height=17 class=xl29 width=64 style='height:12.75pt;border-top:none;
width:48pt'>USA</td>
<td class=xl30 width=49 style='border-top:none;border-left:none;width:37pt'
x:num>7898</td>
<td class=xl30 width=49 style='border-top:none;border-left:none;width:37pt'
x:num>1760</td>
<td class=xl30 width=49 style='border-top:none;border-left:none;width:37pt'
x:num>2030</td>
<td class=xl30 width=49 style='border-top:none;border-left:none;width:37pt'
x:num>1858</td>
<td class=xl30 width=49 style='border-top:none;border-left:none;width:37pt'
x:num>1435</td>
<td class=xl30 width=117 style='border-top:none;border-left:none;width:88pt'
x:num="5.2653333333333299">5.265333333</td>
<td colspan=2 style='mso-ignore:colspan'></td>
</tr>
<![if supportMisalignedColumns]>
<tr height=0 style='display:none'>
<td width=64 style='width:48pt'></td>
<td width=49 style='width:37pt'></td>
<td width=49 style='width:37pt'></td>
<td width=49 style='width:37pt'></td>
<td width=49 style='width:37pt'></td>
<td width=49 style='width:37pt'></td>
<td width=117 style='width:88pt'></td>
<td width=64 style='width:48pt'></td>
<td width=64 style='width:48pt'></td>
</tr>
<![endif]>
</table>

</body>

</html>
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
I'm sorry, I wanted to atach a file but that didn't work.

My question is:
Suppose I have a table with three columns and two rows.
I want to create a pie chart that will hold data for both rows, however only the first row data apears.
If I change the type of the chart to columns (and do no other changes) I get to see both rows data.
What am I doing wrong?
The final result I expect to view is to pies, one for each row.

Thanks for any help,
Yossi
 
Upvote 0
I'm not sure my reply will show up since your attempt to attach a file has messed up the display of the discussion.

FWIW -- and not meaning to step on any toes of this message board -- I will neither download nor open a file. This is both for performance and for security reasons.

That said, a pie chart can contain only 1 pie (other than the pie-in-pie type). If you want two charts, one for each row, create two charts separately. Select the first row and create a chart. Then, select the 2nd row and create a chart.

You can adjust the display to make it appear as though the two pies are on one chart. To do so, change the location of the legends, make the plotareas and chartareas transparent, and adjust the chart borders.
 
Upvote 0
Two pie charts, right?

Then, when you highlight the data, just highlight the data you want in that chart.

If needed, you can use the Control key to select non-contiguous areas.
 
Upvote 0

Forum statistics

Threads
1,213,535
Messages
6,114,194
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top