ComponentOne 3D Chart for WinForms
3D Labels / Customizing 3D Chart Labels
In This Topic
    Customizing 3D Chart Labels
    In This Topic

    The Chart3DLabels object has a DefaultStyle that controls attributes of all labels (font, colors, border). Each of the labels also has its own individual Style inherited from this Default style. Setting attributes of the individual style overrides the attributes of the DefaultStyle.

    For instance, in the following code the background color of the default style can be set to gray:

    To write code in Visual Basic

    Visual Basic
    Copy Code
    C1Chart3D1.ChartLabels.DefaultStyle.BackColor = Drawing.Color.Gray
    

    To write code in C#

    C#
    Copy Code
    C1Chart3D1.ChartLabels.DefaultStyle.BackColor = Drawing.Color.Gray;
    

    All existing labels will have a gray background (if not deliberately set otherwise), and all new labels created will also adopt a gray background.

    See Also