Visual Basic (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 |
Visual Basic (Usage) | Copy Code |
---|---|
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) |
C# | |
---|---|
public ExcelSparklineGroup AddSquareSparkline( SheetCellRange data, CellRange location, SparklineType type, ExcelSparklineSetting setting, bool isColumn ) |
Parameters
- data
- The data.
- location
- The location.
- type
- The type.
- setting
- The setting.
- isColumn
- if set to
true
[is column].
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.
This example creates a sparkline.
C# | Copy Code |
---|---|
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); ) |
Visual Basic | Copy Code |
---|---|
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) |
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2