Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

SetPresetGradient Method

Office 2003

Fills the specified ChInterior object with a preset gradient style.

expression.SetPresetGradient(GradientStyle, gradientVarient, gradientPreset)

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

ChartGradientStyleEnum can be one of these ChartGradientStyleEnum constants.
chGradientDiagonalDown
chGradientDiagonalUp
chGradientFromCenter
chGradientFromCorner
chGradientHorizontal
chGradientVertical
ChartGradientVariantEnum can be one of these ChartGradientVariantEnum constants.
chGradientVariantCenter
chGradientVariantEdges
chGradientVariantEnd
chGradientVariantStart
ChartPresetGradientTypeEnum can be one of these ChartPresetGradientTypeEnum constants.
chGradientBrass
chGradientCalmWater
chGradientChrome
chGradientChromeII
chGradientDaybreak
chGradientDesert
chGradientEarlySunset
chGradientFire
chGradientFog
chGradientGold
chGradientGoldII
chGradientHorizon
chGradientLateSunset
chGradientMahogany
chGradientMoss
chGradientNightfall
chGradientOcean
chGradientParchment
chGradientPeacock
chGradientRainbow
chGradientRainbowII
chGradientSapphire
chGradientSilver
chGradientWheat

Example

This example sets the interior fill of the first two series and the plot area of the first chart in ChartSpace1.

Sub Format_Interior_Colors()

    Dim chConstants
    Dim serSeries1
    Dim serSeries2

    Set chConstants = ChartSpace1.Constants

    Set serSeries1 = ChartSpace1.Charts(0).SeriesCollection(0)
    Set serSeries2 = ChartSpace1.Charts(0).SeriesCollection(1)

    ' Set the interior fill of the first series to a one-color gradient.
    serSeries1.Interior.SetOneColorGradient chConstants.chGradientDiagonalDown, _
               chConstants.chGradientVariantCenter, 0.2, "Blue"

    ' Set the interior fill of the second series to a preset gradient.
    serSeries2.Interior.SetPresetGradient chConstants.chGradientFromCenter, _
               chConstants.chGradientVariantEnd, chConstants.chGradientDaybreak

    ' Set the interior fill of the plot area to a pattern.
    ChartSpace1.Charts(0).PlotArea.Interior.SetPatterned chConstants.chPattern10Percent, _
               "Yellow", "Blue"

End Sub

		


Applies to | ChInterior Object



Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.