ActiveReports for .NET 3 Online Help Request technical support
3D Pie Chart
See Also
User Guide > Samples and Walkthroughs > Walkthroughs > Standard Edition Walkthroughs > Basic > Chart Walkthroughs > 3D Pie Chart

Glossary Item Box

Pie charts are useful in showing how the percentage of each data item contributes to the total.

This walkthrough illustrates how to create a three dimensional pie chart.

The walkthrough is split up into the following activities:

When you have finished this walkthrough, you will have a chart that looks similar to the following.

Creating a new Visual Studio project

To create a new Visual Studio project

  1. Open Visual Studio.
  2. From the File menu, select New > Project.

  3. Select the project type and click on Windows Application.
  4. Change the name of your project and click OK.

Adding an ActiveReport to a Visual Studio project

To add an ActiveReport to your project

  1. Open a new project in Visual Studio.
  2. From the Project menu, select Add New Item.
  3. Select ActiveReports 3.0 File and rename the file rpt3DPieChart.
  4. Click Open.

Adding a chart control to the report

To add a chart control to the report

  1. Resize the section in which you want to place the chart.
  2. Click the ChartControl icon in the ActiveReports toolbox and draw it onto the report.

Adding a series and data points to the chart

To add a series and data points to the chart

  1. With the chart control highlighted, click the Series (Collection) property in the Properties Window, then click the ellipsis button that appears to open the Series Collection Editor.
  2. Click Series1 to select it.
  3. Under Series Properties, change the ColorPalette property of the new series to Confetti.
  4. Change the Type property to Doughnut3D.
  5. Click the Points (Collection) property, then click the ellipsis button that appears. 
  6. Click Add to add a data point, set its LegendText property to Figs, and set its Y value to 19. Expand the Properties and set the ExplodeFactor to .5 to pull this slice out from the pie.
  7. Click Add to add another data point, set its LegendText property to Raspberries, and set its YValues property to 15.
  8. Click Add to add another data point, set its LegendText property to Blueberries, and set its YValues property to 37.
  9. Click Add to add another data point, set its LegendText property to Bananas, and set its YValues property to 21.
  10. Click OK to return to the Series Collection Editor.
  11. Remove Series2 and Series3.
  12. Click OK to return to the report design surface.

Setting the chart's properties

To set the chart's properties

  1. With the chart control highlighted, click the ChartAreas (Collection) property in the Properties Window, then click the ellipsis button that appears to open the ChartArea Collection Editor.
  2. Expand the Projection property and change the VerticalRotation property to 50. This allows you to see more of the top of the pie. 
  3. Click OK to return to the report design surface.
  4. With the chart control highlighted, click the Titles (Collection) property in the Properties Window, then click the ellipsis button that appears to open the Title Collection Editor.
  5. In the header properties, change the Text property to "3D Pie Chart."
  6. Expand the Font property and set the Size to 14 to make your title stand out more.
  7. Remove the footer title.
  8. Click OK to return to the report design surface.

Viewing the report

To view the report

  1. Add the ActiveReports viewer control to a Windows Form.
  2. Add the code needed to set the viewer document equal to the report document. See Using the ActiveReports Windows Form Viewer for help.
You can quickly view your report at design time by clicking the Preview tab at the bottom of the designer.

See Also

©2009. All Rights Reserved.