ActiveReports 11
3D Pie Chart
ActiveReports 11 > ActiveReports User Guide > Samples and Walkthroughs > Walkthroughs > Section Report Walkthroughs > Chart > 3D Pie Chart

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 complete this walkthrough you get a layout that looks similar to the following at design time and at run time.

To add an ActiveReport to the Visual Studio project

  1. Create a new Visual Studio project.
  2. From the Project menu, select Add New Item.
  3. In the Add New Item dialog that appears, select ActiveReports 11 Section Report (code-based) and in the Name field, rename the file as 3DPieChart.
  4. Click the Add button to open a new section report in the designer.

See Adding an ActiveReport to a Project for information on adding different report layouts.

To add the Chart control to the report

  1. From the toolbox, drag the Chart data region to the body of the report.
  2. If the chart wizard appears, click Cancel.
    Tip: If you do not want the chart wizard to appear each time you add a chart, clear the Auto Run Wizard checkbox. You can still access the wizard via the command verbs (see below).
  3. In the Properties window, set the following properties.
    Property Name Property Value
    Location 0, 0in
    Size 6.5, 3.5in
  4. In the Report Explorer, select Detail1 and go to the properties window to set the Height property to 3.5.
  5. On the design surface, select the grey area outside the report and in the Properties window, set the PrintWidth property to 6.5.

To add a series and data points to the Chart

 

  1. With the chart control selected, go to the Properties window and click the Series (Collection) property , then click the ellipsis button (...) that appears.
  2. In the Series Collection Editor that appears, Series1 is selected by default. There, under Series1 properties, change the following.  
    Property Name Property Value
    ColorPalette Confetti
    Type Doughnut3D
     
  3. Click the Points (Collection) property, then click the ellipsis button that appears.
  4. In the DataPoint Collection that appears, click the Add button to add a data point.
  5. In the DataPoint Collection Editor that appears, go to the Properties window to set the following properties. 
    Property Name Property Value
    LegendText Figs
    YValues 19
    Properties>ExplodeFactor 0.5
  6. Click the Add button to add another data point.
  7. In the DataPoint Collection Editor that appears, go to the Properties window to set the following properties.
    Property Name Property Value
    LegendText Raspberries
    YValues 15
  8. Click the Add button to add another data point.
  9. In the DataPoint Collection Editor that appears, go to the Properties window to set the following properties.
    Property Name Property Value
    LegendText Blueberries
    YValues 37
  10. Click the Add button to add another data point.
  11. In the DataPoint Collection Editor that appears, go to the Properties window to set the following properties.
    Property Name Property Value
    LegendText Bananas
    YValues 21
  12. Click OK to save the data points and return to the Series Collection Editor.
  13. In the Series Collection Editor under Members, select Series2 and Series3 and click the Remove button.
  14. Click OK to save the changes and return to the report design surface.

To configure the appearance of the Chart

  1. With the chart control selected, go to the Properties window and click the ChartAreas (Collection) property and then click the ellipsis button that appears.
  2. In the ChartArea Collection Editor that appears, expand the Projection property node and set 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, go to the Properties window and click the Titles (Collection) property and then click the ellipsis button that appears.
  5. In the Title Collection Editor that appears, under header properties, set the following properties.
    Property Name Property Value
    Text 3D Pie Chart
    Font Size 14
  6. Under Members, select the footer and click the Remove button.
  7. Click OK to return to the report design surface.

To view the report

OR

See Also

Concepts