Spread Windows Forms 12.0 Product Documentation
AddChart(CellRange,Type,Int32,Int32,Int32,Int32) Method
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SheetView Class > AddChart Method : AddChart(CellRange,Type,Int32,Int32,Int32,Int32) Method
The range of data used in the chart.
Type of the series.
Width of the chart.
Height of the chart.
The x-position.
The y-position.
Adds the chart control.
Syntax
'Declaration
 
Public Overloads Function AddChart( _
   ByVal cellRange As CellRange, _
   ByVal seriesType As Type, _
   ByVal width As Integer, _
   ByVal height As Integer, _
   ByVal x As Integer, _
   ByVal y As Integer _
) As SpreadChart
'Usage
 
Dim instance As SheetView
Dim cellRange As CellRange
Dim seriesType As Type
Dim width As Integer
Dim height As Integer
Dim x As Integer
Dim y As Integer
Dim value As SpreadChart
 
value = instance.AddChart(cellRange, seriesType, width, height, x, y)
public SpreadChart AddChart( 
   CellRange cellRange,
   Type seriesType,
   int width,
   int height,
   int x,
   int y
)

Parameters

cellRange
The range of data used in the chart.
seriesType
Type of the series.
width
Width of the chart.
height
Height of the chart.
x
The x-position.
y
The y-position.
Remarks
The cellRange parameter indicates the data that is used by the chart. The seriesType parameter indicates which type of chart will be added. The chartWidth and chartHeight parameters specify the size (width and height) of the chart. The absolute position is specified by the x and y parameters.
Example
This example adds a chart control to Spread.
FarPoint.Win.Spread.Model.CellRange range = new FarPoint.Win.Spread.Model.CellRange(0, 0, 7, 4);
fpSpread1.Sheets[0].AddChart(range, typeof(FarPoint.Win.Chart.BarSeries), 400, 300, 0, 0);
Dim range As New FarPoint.Win.Spread.Model.CellRange(0, 0, 7, 4)
fpSpread1.Sheets(0).AddChart(range, GetType(FarPoint.Win.Chart.BarSeries), 400, 300, 0, 0)
See Also

Reference

SheetView Class
SheetView Members
Overload List