FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > SheetView Class > AddChart Method : AddChart(CellRange,Type,Int32,Int32,Int32,Int32,ChartViewType,Boolean) Method |
true
the new chart has a default legend area; otherwise, there is no legend area.
'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, _ ByVal viewType As ChartViewType, _ ByVal showLegend As Boolean _ ) 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 viewType As ChartViewType Dim showLegend As Boolean Dim value As SpreadChart value = instance.AddChart(cellRange, seriesType, width, height, x, y, viewType, showLegend)
public SpreadChart AddChart( CellRange cellRange, Type seriesType, int width, int height, int x, int y, ChartViewType viewType, bool showLegend )
true
the new chart has a default legend area; otherwise, there is no legend area.FpSpread1.Sheets[0].RowCount = 10; FpSpread1.Sheets[0].ColumnCount = 10; FpSpread1.Sheets[0].Cells[0, 1].Value = "c1"; FpSpread1.Sheets[0].Cells[0, 2].Value = "c2"; FpSpread1.Sheets[0].Cells[0, 3].Value = "c3"; FpSpread1.Sheets[0].Cells[1, 0].Value = "s1"; FpSpread1.Sheets[0].Cells[2, 0].Value = "s2"; FpSpread1.Sheets[0].Cells[3, 0].Value = "s3"; FpSpread1.Sheets[0].Cells[4, 0].Value = "s4"; FpSpread1.Sheets[0].Cells[1, 1].Value = 1; FpSpread1.Sheets[0].Cells[2, 1].Value = 2; FpSpread1.Sheets[0].Cells[3, 1].Value = 3; FpSpread1.Sheets[0].Cells[4, 1].Value = 4; FpSpread1.Sheets[0].Cells[1, 2].Value = 7; FpSpread1.Sheets[0].Cells[2, 2].Value = 8; FpSpread1.Sheets[0].Cells[3, 2].Value = 9; FpSpread1.Sheets[0].Cells[4, 2].Value = 10; FpSpread1.Sheets[0].Cells[1, 3].Value = 13; FpSpread1.Sheets[0].Cells[2, 3].Value = 14; FpSpread1.Sheets[0].Cells[3, 3].Value = 15; FpSpread1.Sheets[0].Cells[4, 3].Value = 16; FarPoint.Web.Spread.Model.CellRange range = new FarPoint.Web.Spread.Model.CellRange(0, 0, 4, 4); FpSpread1.Sheets[0].AddChart(range, typeof(FarPoint.Web.Chart.ClusteredBarSeries), 200, 200, 0, 0, FarPoint.Web.Chart.ChartViewType.View3D, false);
FpSpread1.Sheets(0).RowCount = 10 FpSpread1.Sheets(0).ColumnCount = 10 FpSpread1.Sheets(0).Cells(1, 0).Value = "s1" FpSpread1.Sheets(0).Cells(2, 0).Value = "s2" FpSpread1.Sheets(0).Cells(3, 0).Value = "s3" FpSpread1.Sheets(0).Cells(4, 0).Value = "s4" FpSpread1.Sheets(0).Cells(0, 1).Value = "c1" FpSpread1.Sheets(0).Cells(1, 1).Value = 1 FpSpread1.Sheets(0).Cells(2, 1).Value = 2 FpSpread1.Sheets(0).Cells(3, 1).Value = 3 FpSpread1.Sheets(0).Cells(4, 1).Value = 4 FpSpread1.Sheets(0).Cells(0, 2).Value = "c2" FpSpread1.Sheets(0).Cells(1, 2).Value = 7 FpSpread1.Sheets(0).Cells(2, 2).Value = 8 FpSpread1.Sheets(0).Cells(3, 2).Value = 9 FpSpread1.Sheets(0).Cells(4, 2).Value = 10 FpSpread1.Sheets(0).Cells(0, 3).Value = "c3" FpSpread1.Sheets(0).Cells(1, 3).Value = 13 FpSpread1.Sheets(0).Cells(2, 3).Value = 14 FpSpread1.Sheets(0).Cells(3, 3).Value = 15 FpSpread1.Sheets(0).Cells(4, 3).Value = 16 Dim range As New FarPoint.Web.Spread.Model.CellRange(0, 0, 4, 4) FpSpread1.Sheets(0).AddChart(range, GetType(FarPoint.Web.Chart.ClusteredBarSeries), 200, 200, 0, 0, FarPoint.Web.Chart.ChartViewType.View3D, False)
Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6