[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.IChart.AddChartInPixel

AddChartInPixel Method

AddChartInPixel(ChartType, double, double, double, double)

Creates a chart at the specified location in this chart using pixel-based coordinates.

The new chart is positioned relative to the upper-left corner of the chart area, and the returned IShape represents the created chart shape.

Declaration
IShape AddChartInPixel(ChartType chartType, double left, double top, double width, double height)
Function AddChartInPixel(chartType As ChartType, left As Double, top As Double, width As Double, height As Double) As IShape
Parameters
Type Name Description
ChartType chartType

The type of chart to create.

double left

The distance from the left edge of the new chart to the left edge of the chart area, in pixels.

double top

The distance from the top edge of the new chart to the top edge of the chart area, in pixels.

double width

The width of the new chart, in pixels.

double height

The height of the new chart, in pixels.

Returns
Type Description
IShape

The IShape object that represents the new chart.

Examples
IChart chart = worksheet.Shapes.AddChart(ChartType.ColumnClustered, 20, 20, 300, 200).Chart;
IShape insetChart = chart.AddChartInPixel(ChartType.Line, 40, 30, 160, 100);