By default, the chart defines an array of contour styles for each chart group. These contour styles are specified as a Chart3DContourStylesCollection of objects.
Each Chart3DContourStyle object in this collection defines two properties that specify the appearance of a particular contour line or zone in a chart:
• The FillColor property specifies the color of the zone associated with this contour style. The FillColor property can be accessed at design time in the Chart3DStyle Collection Editor of the ContourStyles node. The ContourStyles node can be accessed through the ChartGroups node in the Visual Studio Properties window.
• The LineStyle property is a LineStyle object, and specifies the width and color of the contour line associated with this contour style. By default, each line is one pixel wide and is a solid black line. The LineStyle property can be accessed at design time in the Chart3DStyle Collection Editor of the ContourStyles node. The ContourStyles node can be accessed through the ChartGroups node in the Visual Studio Properties window.
A total of one hundred contour styles are defined by default. To add additional contour styles, use the Add method.
To access the ContourStyle object associated with a particular contour line or zone, use the Style property of Chart3DContourLevel object. For example, the following retrieves the Chart3DContourStyle object for the third contour line:
Dim cstyle As Chart3DContourStyle
cstyle = C1Chart3D1.ChartGroups(0).Contour.Levels(2).Style
•C#
Chart3DContourStyle cstyle = C1Chart3D1.ChartGroups[0].Contour.Levels[2].Style;
Use this approach to change the attributes of individual zones or contour lines. For example, to change the color for a particular zone, change the FillColor property of the Chart3DContourStyleobject. The following statements change the first zone color to green:
C1Chart3D1.ChartGroups(0).Contour.Levels(0).Style.FillColor = Color.Green
•C#
C1Chart3D1.ChartGroups[0].Contour.Levels[0].Style.FillColor = Color.Green;