SetTextured Method

Microsoft Office Web Components Visual Basic

expression.SetTextured(textureFile, TextureFormat, stackUnit, TexturePlacement)

expression    Required. An expression that returns a ChInterior object.

textureFile   Required Variant. The image used to fill the interior of the object. You can specify a URL that points to an image file or a ChartPresetTextureEnum constant.

TextureFormat   Optional ChartTextureFormatEnum . Determines how the picture is displayed within the specified ChInterior object.

stackUnit   Optional Double. Specifies how the picture is stacked and scaled when the TextureFormat argument is set to chStackScale.

TexturePlacement   Optional ChartTexturePlacementEnum . Affects where the picture is displayed within the specified ChInterior object. This setting only affects 3-D charts.

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_Fills()

    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 two-color gradient.
    serSeries1.Interior.SetTwoColorGradient chConstants.chGradientDiagonalDown, _
               chConstants.chGradientVariantCenter, "Blue", "Silver"

    ' Set the interior fill of the second series to a solid color.
    serSeries2.Interior.SetSolid "Purple"

    ' Set the interior fill of the plot area to a preset texture.
    ChartSpace1.Charts(0).PlotArea.Interior.SetTextured _
              chConstants.chTextureParchment, chConstants.chTile

End Sub