[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.IChart.AddConnector

AddConnector Method

AddConnector(ConnectorType, double, double, double, double)

Creates a connector shape in the chart area and returns the IShape object that represents the new connector shape.

The connector is positioned by its start and end points relative to the upper-left corner of the chart area, in points.

Declaration
IShape AddConnector(ConnectorType type, double beginX, double beginY, double endX, double endY)
Function AddConnector(type As ConnectorType, beginX As Double, beginY As Double, endX As Double, endY As Double) As IShape
Parameters
Type Name Description
ConnectorType type

The type of connector shape to create.

double beginX

The horizontal position of the connector shape's starting point relative to the upper-left corner of the chart area, in points.

double beginY

The vertical position of the connector shape's starting point relative to the upper-left corner of the chart area, in points.

double endX

The horizontal position of the connector shape's ending point relative to the upper-left corner of the chart area, in points.

double endY

The vertical position of the connector shape's ending point relative to the upper-left corner of the chart area, in points.

Returns
Type Description
IShape

The IShape object that represents the new connector shape.

Examples
IChart chart = worksheet.Shapes.AddChart(ChartType.ColumnClustered, 20, 20, 300, 200).Chart;
IShape connector = chart.AddConnector(ConnectorType.Straight, 30, 40, 180, 120);
connector.Line.Weight = 2;