GradientDegree property (Excel Graph)

Returns the gradient degree of the specified one-color shaded fill as a floating-point value from 0.0 (dark) through 1.0 (light). Read-only Single.

Syntax

expression.GradientDegree

expression Required. An expression that returns one of the objects in the Applies To list.

Remarks

This property is read-only. Use the OneColorGradient method to set the gradient degree for the fill.

Example

This example sets the chart's fill format so that its gradient degree is at least 0.3.

With myChart.ChartArea.Fill 
 If .Type = msoFillGradient Then 
 If .GradientColorType = msoGradientOneColor Then 
 If .GradientDegree < 0.3 Then 
 .OneColorGradient .GradientStyle, _ 
 .GradientVariant, 0.3 
 End If 
 End If 
 End If 
End With 

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.