OneColorGradient Method
Applies To
ChartFillFormat object.
Description
Sets the specified fill to a one-color gradient.
Syntax
expression.OneColorGradient(Style, Variant, Degree)
expression Required. An expression that returns a ChartFillFormat object.
Style Required Long. The gradient style for the specified fill. Can be one of the following MsoGradientStyle constants: msoGradientDiagonalDown, msoGradientDiagonalUp, msoGradientFromCenter, msoGradientFromCorner, msoGradientHorizontal, or msoGradientVertical.
Variant Required Long. The gradient variant for the specified fill. Can be a value from 1 through 4, corresponding to the four variants listed on the Gradient tab in the Fill Effects dialog box. If Style is msoGradientFromCenter, the Variant argument can only be 1 or 2.
Degree Required Single. The gradient degree for the specified fill. Can be a value from 0.0 (dark) through 1.0 (light).
Example
This example sets the chart's fill format.
With myChart.ChartArea.Fill
If .Type = msoFillGradient Then
If .GradientColorType = msoGradientOneColor Then
.OneColorGradient Style:=msoGradientFromCorner, _
Variant:=1, Degree:=0.3
End If
End If
End With