.NET Framework Developer Center >
.NET Development Forums
>
Chart Controls for .NET Framework
>
Multi level pie chart?
Multi level pie chart?
- Hi dear all,
Can anyone realize multi level pie chart (3 level) in .net (winform or wpf)?
Please refer to this link for sample> http://www.fusioncharts.com/pcdocs/Contents/Images/MLPie1.jpg
Pleeasee!
Betim Drenica, Software Engineer @ APPDEC (www.appdec.com)
Answers
- That's a manual op if I'm not mistaken. But look at Stacked Pie Charts (2 screenshots in the gallery)
I host my websamples on my local IIS for faster lookups (from the root of the website), but here's my path where you should start http://servername/websamples/content.aspx?Sample=Sample44&SampleSequenceID=166
I see this code:
/// <summary>
Does this help?
/// This method will create a ChartArea with a given name at a certain level
/// </summary>
private void CreateChartArea(int level, string AreaName, bool ShowBorder)
{
Chart1.ChartAreas.Add(AreaName);
Chart1.ChartAreas[AreaName].BackColor = Color.Transparent;
if (ShowBorder)
Chart1.ChartAreas[AreaName].BorderWidth = 1;
else
Chart1.ChartAreas[AreaName].BorderWidth = 0;
Chart1.ChartAreas[AreaName].InnerPlotPosition.Auto = false ;
Chart1.ChartAreas[AreaName].InnerPlotPosition.Height = 100;
Chart1.ChartAreas[AreaName].InnerPlotPosition.Width = 100;
Chart1.ChartAreas[AreaName].InnerPlotPosition.X = 0;
Chart1.ChartAreas[AreaName].InnerPlotPosition.Y = 0;
Chart1.ChartAreas[AreaName].Position.X = 2 + level * 15;
Chart1.ChartAreas[AreaName].Position.Y = 2 + level * 15;
Chart1.ChartAreas[AreaName].Position.Height = 96 - level * 30;
Chart1.ChartAreas[AreaName].Position.Width = 96 - level * 30;
}
Please don't forget (and feel free to remind me) to post if you got the answer you wanted, and select who really answered your post when you do so future visitors will know too! Remember, this is .NET 4.0 in a .NET 3.5 world, you're a pioneer right now.- Marked As Answer byAlex GorevMSFT, OwnerWednesday, November 18, 2009 11:58 PM
All Replies
- That's a manual op if I'm not mistaken. But look at Stacked Pie Charts (2 screenshots in the gallery)
I host my websamples on my local IIS for faster lookups (from the root of the website), but here's my path where you should start http://servername/websamples/content.aspx?Sample=Sample44&SampleSequenceID=166
I see this code:
/// <summary>
Does this help?
/// This method will create a ChartArea with a given name at a certain level
/// </summary>
private void CreateChartArea(int level, string AreaName, bool ShowBorder)
{
Chart1.ChartAreas.Add(AreaName);
Chart1.ChartAreas[AreaName].BackColor = Color.Transparent;
if (ShowBorder)
Chart1.ChartAreas[AreaName].BorderWidth = 1;
else
Chart1.ChartAreas[AreaName].BorderWidth = 0;
Chart1.ChartAreas[AreaName].InnerPlotPosition.Auto = false ;
Chart1.ChartAreas[AreaName].InnerPlotPosition.Height = 100;
Chart1.ChartAreas[AreaName].InnerPlotPosition.Width = 100;
Chart1.ChartAreas[AreaName].InnerPlotPosition.X = 0;
Chart1.ChartAreas[AreaName].InnerPlotPosition.Y = 0;
Chart1.ChartAreas[AreaName].Position.X = 2 + level * 15;
Chart1.ChartAreas[AreaName].Position.Y = 2 + level * 15;
Chart1.ChartAreas[AreaName].Position.Height = 96 - level * 30;
Chart1.ChartAreas[AreaName].Position.Width = 96 - level * 30;
}
Please don't forget (and feel free to remind me) to post if you got the answer you wanted, and select who really answered your post when you do so future visitors will know too! Remember, this is .NET 4.0 in a .NET 3.5 world, you're a pioneer right now.- Marked As Answer byAlex GorevMSFT, OwnerWednesday, November 18, 2009 11:58 PM


