Xceed Workbooks for .NET v3.0 Documentation
Xceed.Workbooks.NET Assembly / Xceed.Workbooks.NET Namespace / ChartCollection Class / Add Method / Add<T>(String,String) Method
The type of Chart that will be added to the ChartCollection.
The Address of the Cell corresponding to the top left corner of the new Chart.
The Address of the Cell corresponding to the bottom right corner of the new Chart.
Example


In This Topic
    Add<T>(String,String) Method
    In This Topic
    Adds a TwoCellAnchor Chart of type T to the ChartCollection.
    Syntax
    'Declaration
     
    
    Public Overloads Function Add(Of T As {New, Chart})( _
       ByVal topLeftCellAddress As String, _
       ByVal bottomRightCellAddress As String _
    ) As T
    'Usage
     
    
    Dim instance As ChartCollection
    Dim topLeftCellAddress As String
    Dim bottomRightCellAddress As String
    Dim value As T
     
    value = instance.Add(Of T)(topLeftCellAddress, bottomRightCellAddress)
    public T Add<T>( 
       string topLeftCellAddress,
       string bottomRightCellAddress
    )
    where T: new(), Chart

    Parameters

    topLeftCellAddress
    The Address of the Cell corresponding to the top left corner of the new Chart.
    bottomRightCellAddress
    The Address of the Cell corresponding to the bottom right corner of the new Chart.

    Type Parameters

    T
    The type of Chart that will be added to the ChartCollection.

    Return Value

    The Chart that has been added to the ChartCollection.
    Remarks
    Addresses are used to delimit the top left & bottom right corners of the new Chart.
    Example
    // Adds a LineChart with the generic Add method. The size of the Chart will be from Cell A1 to F6.
    var lineChart = worksheet.Charts.Add<LineChart>( “A1”, “F6” );
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also