Spread Windows Forms 8.0 Product Documentation
AddSquareSparkline Method
Example 


Data
Location of sparkline
Type of sparkline
Setting
If set to true [is column]
Adds the sparkline.
Syntax
'Declaration
 
Public Function AddSquareSparkline( _
   ByVal data As SheetCellRange, _
   ByVal location As CellRange, _
   ByVal type As SparklineType, _
   ByVal setting As ExcelSparklineSetting, _
   ByVal isColumn As Boolean _
) As ExcelSparklineGroup
'Usage
 
Dim instance As SheetView
Dim data As SheetCellRange
Dim location As CellRange
Dim type As SparklineType
Dim setting As ExcelSparklineSetting
Dim isColumn As Boolean
Dim value As ExcelSparklineGroup
 
value = instance.AddSquareSparkline(data, location, type, setting, isColumn)
public ExcelSparklineGroup AddSquareSparkline( 
   SheetCellRange data,
   CellRange location,
   SparklineType type,
   ExcelSparklineSetting setting,
   bool isColumn
)

Parameters

data
Data
location
Location of sparkline
type
Type of sparkline
setting
Setting
isColumn
If set to true [is column]
Remarks
The data parameter is the block of cells that contains the data for the graph. The location is the cell or cells where the sparkline graph is displayed. This isColumn parameter determines if the data is used from a row or column.
Example
This example creates a sparkline.
FarPoint.Win.Spread.SheetView sv = new FarPoint.Win.Spread.SheetView();
fpSpread1.Sheets[0] = sv;
sv.Cells[4, 0].Value = 2;
sv.Cells[4, 1].Value = 1;
sv.Cells[5, 0].Value = 5;
sv.Cells[5, 1].Value = 3;
FarPoint.Win.Spread.Chart.SheetCellRange newdata = new FarPoint.Win.Spread.Chart.SheetCellRange(sv, 4, 0, 2, 2);
FarPoint.Win.Spread.Model.CellRange newlocation = new FarPoint.Win.Spread.Model.CellRange(6, 0, 1, 2);
FarPoint.Win.Spread.ExcelSparklineSetting ex2 = new FarPoint.Win.Spread.ExcelSparklineSetting();
fpSpread1.Sheets[0].AddSquareSparkline(newdata, newlocation, FarPoint.Win.Spread.SparklineType.Column, ex2, true); )
Dim sv As New FarPoint.Win.Spread.SheetView()
FpSpread1.Sheets(0) = sv
sv.Cells(4, 0).Value = 2
sv.Cells(4, 1).Value = 1
sv.Cells(5, 0).Value = 5
sv.Cells(5, 1).Value = 3
Dim newdata = New FarPoint.Win.Spread.Chart.SheetCellRange(sv, 4, 0, 2, 2)
Dim newlocation = New FarPoint.Win.Spread.Model.CellRange(6, 0, 1, 2)
Dim ex2 As New FarPoint.Win.Spread.ExcelSparklineSetting()
FpSpread1.Sheets(0).AddSquareSparkline(newdata, newlocation, FarPoint.Win.Spread.SparklineType.Column, ex2, True)
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

Reference

SheetView Class
SheetView Members

 

 


Copyright © GrapeCity, inc. All rights reserved.