AmbientLightIntensity Property

Microsoft Office Web Components Visual Basic

expression.AmbientLightIntensity

expression    Required. An expression that returns a ChChart object.

Example

This example converts the first chart in Chartspace1 to a 3-D Bar chart and sets the lighting options for the chart.

Sub Format3DLightSources()

    Dim cht3DBar

    ' Set a variable to the first chart in Chartspace1.
    Set cht3DBar = ChartSpace1.Charts(0)

    ' Change the chart to a 3D Bar chart.
    cht3DBar.Type = chChartTypeBar3D

    ' Set the intensity of the ambient light.
    cht3DBar.AmbientLightIntensity = 0.7

    ' Set the inclination of the directional light source.
    cht3DBar.DirectionalLightInclination = 35

    ' Set the intensity of the directional light source.
    cht3DBar.DirectionalLightIntensity = 0.8

    ' Set the rotation of the directional light source.
    cht3DBar.DirectionalLightRotation = 120

End Sub