Chinese German Japanese Korean French Italian Portuguese Spanish
A Site for .NET Smart Device Software Developers
 Feel free to browse the available .NET Smart Device controls & components for the .NET Compact Framework
 All controls have design time support for Visual Studio .NET, 2005 & 2008.
 All controls are written in fully managed code, are royalty free and support is all part of the purchase!
 Why create your own controls when it has been done for you here at a fraction of the cost?
Pie Charting Example

Different to setting up other chart types, each series applied to the chart holds only one value. This facilitates the different colors required for each pie piece.


Example Code C#:


private void LoadPieChart()
{
  chart1.ClearAll();

  Series s = new Series("Val 1", SeriesType.Pie);
  s.AddXY(1);
  chart1.AddSeries(s);

  Series s = new Series("Val 2 ", SeriesType.Pie);
  s.AddXY(2);
  chart1.AddSeries(s);

  Series s = new Series("Val 3 ", SeriesType.Pie);
  s.AddXY(3);
  chart1.AddSeries(s);

  Series s = new Series("Val 4 ", SeriesType.Pie);
  s.AddXY(4);
  chart1.AddSeries(s);

  chart1.Refresh();
}


Example Code VB:


Private Sub LoadPieChart()

  chart1.ClearAll();
  Dim s As New Series("Val 1", SeriesType.Pie)

  s.AddXY(1);
  chart1.AddSeries(s);

  Dim s As New Series("Val 2 ", SeriesType.Pie)

  s.AddXY(2);
  chart1.AddSeries(s);

  Dim s As New Series("Val 3 ", SeriesType.Pie)

  s.AddXY(3);
  chart1.AddSeries(s);

  Dim s As New Series("Val 4 ", SeriesType.Pie)

  s.AddXY(4);
  chart1.AddSeries(s);

  chart1.Refresh();

End Sub



TOP
Contact Us
©2004-2007 PocketPC Controls.com