ChartSpaceTitle Property

Microsoft Office Web Components Object Model

ChartSpaceTitle Property

       

Returns a ChTitle object that represents the chart workspace title. Use this property to set the properties for the chart workspace title. Note that the ChartSpaceTitle property represents the title for the entire chart workspace. Use the Title property of the ChChart object to set the title for individual charts within the chart workspace. Returns Nothing if the chart workspace does not have a title. Read-only.

expression.ChartSpaceTitle

expression   Required. An expression that returns a ChartSpace object.

Example

This example sets the chart workspace title and positions the chart workspace legend on the left side of the workspace.

Sub SetLegend()
    Dim chConstants
    
    Set chConstants = ChartSpace1.Constants
    
    ' Enable the title for the chartspace.
    ChartSpace1.HasChartSpaceTitle = True
    
    ' Set the title for the chartspace.
    ChartSpace1.ChartSpaceTitle.Caption = "Monthly Sales Data"
    
    ' Enable the legend for the chartspace.
    ChartSpace1.HasChartSpaceLegend = True
    
    ' Position the legend fort he chartspace.
    ChartSpace1.ChartSpaceLegend.Position = chConstants.chLegendPositionLeft
End Sub