Version

Creating a Composite Chart Using the Chart Wizard (Part 2 of 2)

This section expands on the Creating a Composite Chart Using the Chart Wizard (Part 1 of 2) topic, and demonstrates the power and flexibility of composite charts by adding more layers, chart areas, and legends.

  1. Add another axis to the ChartArea .

Before adding another chart layer, it is necessary to add at least one more axis. This is required because most chart layers require an axis for labels, and chart layers cannot share a label axis.

Change to the Axes tab and add an "X2" style axis (axis3). This will add an axis oriented from the top of the chart.

Set the DataType to Numeric. Set the ItemLabels.ItemFormat to "DataValue" so that data values can be displayed on this axis. Set the ItemLabels.Orientation to "VerticalLeftFacing." Then change the Extent (on the "Key properties" tab) to 40 to allow more space for the chart.

The Chart Wizard's Composite Chart configuration path
  1. Add another data series.

Switch to the "Data Tab" and click the "Add New…​" button. This time, create an XY Series. The grid will appear set up for entering values with x- and y-coordinates. Enter some sample data and give the series a label in the "Key properties" tab.

The Chart Wizard's Composite Chart configuration path

To assign this series a color, change to the "PaintElements" tab in the lower right area of the chart wizard, add a new PaintElement to the Series' PEs collection, and set its Fill property to a color (in this example, Green is used).

The tab configuration area for the Data tab in the Chart Wizard
  1. Add another ChartLayer .

Change to the "Chart Layers" tab and click "Add New" to add a new Chart layer.

Set its ChartType to ScatterChart, then set its ChartArea to area1, its AxisX to "axis3," and its AxisY to "axis2." Switch to the Series tab and select the XY series (series3) as the series for this layer to consume. Now the second chart layer will appear.

The Chart Wizard's Composite Chart configuration path

By now you should be familiar enough with the Composite Chart Wizard to experiment on your own. You can add more chart layers, axes, legends, and chart areas freely to suit the needs of your application.