Chart.BackColor Property

.NET Framework (current version)
 

Gets or sets the background color of the Chart object.

Namespace:   System.Windows.Forms.DataVisualization.Charting
Assembly:  System.Windows.Forms.DataVisualization (in System.Windows.Forms.DataVisualization.dll)

[BindableAttribute(true)]
[TypeConverterAttribute(typeof(ColorConverter))]
public override Color BackColor { get; set; }

Property Value

Type: System.Drawing.Color

A Color value used to draw the background color of the chart. The default color is System.Drawing.Color.White.

You can set this property to any valid ARGB (alpha, red, green, blue) value. Note that for the Chart object, the alpha component cannot be set to a value other than 255. This also means that, for the Chart object only, a Transparent value cannot be used.

The BackColor value will be the first color used if you are using gradient colors for the background.

The alpha value controls the opacity of a color. If you set this color to "transparent"—that is, if you use an alpha value of 0—no color will be assigned to the background of the title. As a result, the background will be transparent.

.NET Framework
Available since 4.0
Return to top
Show: