[]
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.
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
| 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. |
| Type | Description |
|---|---|
| IShape | The IShape object that represents the new connector shape. |
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;