ActiveReports 14
ActiveReports 14 User Guide / Concepts / Section Report Concepts / Section Report Toolbox / Chart / Chart Appearance / Chart Effects / Alpha Blending
In This Topic
    Alpha Blending
    In This Topic

    The Backdrop class in the Chart control has an Alpha property which employs GDI+, and is used to set the transparency level of each object's backdrop. GDI+ uses 32 bits overall and 8 bits per alpha, red, green, and blue channels respectively to indicate the transparency and color of an object. Like a color channel's levels of color, the alpha channel represents 256 levels of transparency.

    The default value of the Alpha property is 255, which represents a fully opaque color. For a fully transparent color, set this value to 0. To blend the color of the object's backdrop with the background color, use a setting between 0 and 255.

    In the Chart control, you can use the Color.FromArgb method provided by standard Color constructor of .NET Framework class library to set the alpha and color levels for a particular chart element.

    The following example shows how you can use the method to set the alpha and color values for the chart backdrop.

    To write code in Visual Basic.NET

    Visual Basic
    Copy Code
    Me.ChartControl1.Backdrop = New GrapeCity.ActiveReports.Chart.BackdropItem(Color.FromArgb(100, 0, 11, 220))
    

    To write code in C#

    C#
    Copy Code
    this.ChartControl1.Backdrop = new GrapeCity.ActiveReports.Chart.BackdropItem(System.Drawing.Color.FromArgb(100, 0, 11, 220));
    

    Changing the alpha level of a chart element reveals other items that are beneath the object. Because you can set the alpha level for any chart element that supports color, you can also create custom effects for any chart. For example, you can use alpha blending to combine background images with a semi-transparent chart backdrop to create a watermark look.

    See Also