[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.IChart.AddConnectorInPixel

AddConnectorInPixel Method

AddConnectorInPixel(ConnectorType, double, double, double, double)

Creates a connector in the chart using pixel-based coordinates.

The connector's start and end points are measured from the upper-left corner of the chart area in pixels. This method returns the IShape object that represents the newly created connector.

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

The ConnectorType of the connector to create.

double beginX

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

double beginY

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

double endX

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

double endY

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

Returns
Type Description
IShape

The IShape object that represents the new connector.

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