ComponentOne 3D Chart for WinForms
3D Contour Styles / Contour Style Appearance Properties
In This Topic
    Contour Style Appearance Properties
    In This Topic

    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:

    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:

    To write code in Visual Basic

    Visual Basic
    Copy Code
    Dim cstyle As Chart3DContourStyle
    cstyle = C1Chart3D1.ChartGroups(0).Contour.Levels(2).Style
    

    To write code in C#

    C#
    Copy Code
    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 Chart3DContourStyle object. The following statements change the first zone color to green:

    To write code in Visual Basic

    Visual Basic
    Copy Code
    C1Chart3D1.ChartGroups(0).Contour.Levels(0).Style.FillColor = Color.Green
    

    To write code in C#

    C#
    Copy Code
    C1Chart3D1.ChartGroups[0].Contour.Levels[0].Style.FillColor = Color.Green;
    
    See Also