Skip to content

BackgroundColor2 Property

Description

Gets/sets the second background color of the diagram.

Property Type

Read-write property

Syntax (Visual Basic)

Public Property BackgroundColor2() As ULong

Return Type

Returns the second background color of the diagram.

Remarks

If the diagram is using a gradient fill style, the fill will consist of two colors; this property represents the second color. If no gradient is used, then BackgroundColor is the only color used to color the background.

Note: Interlacing for the axis is on by default and will color alternating columns. You must also change its color or hide it if you want the entire diagram to use the same background color.

The diagram below shows a custom background color, gradient fill style, and interlacing turned off:

Gradient Diagram

Example

Dim Diagram As ChartDiagram2D  
Set Diagram = ChartControl.Content.Diagrams(0)  

Diagram.BackgroundColor = RGB(170, 125, 75)  
Diagram.BackgroundColor2 = RGB(0, 50, 75)  

Diagram.BackgroundFillStyle.FillMode = xtpChartFillGradient  
Diagram.BackgroundFillStyle.GradientAngle = xtpChartGradientBottomRightToTopLeft  
Diagram.AxisX.Interlaced = False

See Also

ChartRadarDiagram Object


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.