Visual Basic (Declaration) | |
---|---|
Public Overloads Function AddChart( _ ByVal row As Integer, _ ByVal column As Integer, _ ByVal seriesType As Type, _ ByVal width As Integer, _ ByVal height As Integer, _ ByVal x As Integer, _ ByVal y As Integer, _ ByVal viewType As ChartViewType, _ ByVal showLegend As Boolean _ ) As SpreadChart |
Visual Basic (Usage) | ![]() |
---|---|
Dim instance As SheetView Dim row As Integer Dim column As Integer Dim seriesType As Type Dim width As Integer Dim height As Integer Dim x As Integer Dim y As Integer Dim viewType As ChartViewType Dim showLegend As Boolean Dim value As SpreadChart value = instance.AddChart(row, column, seriesType, width, height, x, y, viewType, showLegend) |
C# | |
---|---|
public SpreadChart AddChart( int row, int column, Type seriesType, int width, int height, int x, int y, ChartViewType viewType, bool showLegend ) |
Parameters
- row
- The row.
- column
- The column.
- seriesType
- Type of the series.
- width
- Width of the chart.
- height
- Height of the chart.
- x
- The x-position.
- y
- The y-position.
- viewType
- Type of the view.
- showLegend
- If set to
true
, the new chart will have a default legend area; otherwise, there is no legend area.
The row parameter represents the start row index and column represents the start column index. This method will auto detect a cell range based on these two indexes. 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. The ChartViewType parameter is the view type of the chart (2D or 3D). The showLegend parameter indicates whether to show a default legend area in the chart.
This example adds a chart control.
C# | ![]() |
---|---|
fpSpread1.Sheets[0].AddChart(0, 0, typeof(FarPoint.Win.Chart.BarSeries), 400, 400, 0, 0, FarPoint.Win.Chart.ChartViewType.View2D, true); |
Visual Basic | ![]() |
---|---|
FpSpread1.Sheets(0).AddChart(0, 0, GetType(FarPoint.Win.Chart.BarSeries), 400, 400, 0, 0, FarPoint.Win.Chart.ChartViewType.View2D, True) |
Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8