Spread Silverlight Documentation
SetSparkline(Int32,Int32,CellRange,DataOrientation,SparklineType,CellRange,DataOrientation,SparklineSetting) Method
Example 


GrapeCity.Windows.SpreadSheet.Data Namespace > Worksheet Class > SetSparkline Method : SetSparkline(Int32,Int32,CellRange,DataOrientation,SparklineType,CellRange,DataOrientation,SparklineSetting) Method
The row.
The column.
The data range.
The data orientation.
The sparkline type.
The date axis range.
The date axis range orientation.
The sparkline setting.
Sets the sparkline.
Syntax
'Declaration
 
Public Overloads Function SetSparkline( _
   ByVal row As System.Integer, _
   ByVal column As System.Integer, _
   ByVal dataRange As CellRange, _
   ByVal dataOrientation As DataOrientation, _
   ByVal type As SparklineType, _
   ByVal dateAxisRange As CellRange, _
   ByVal dateAxisRangeOrientation As DataOrientation, _
   ByVal setting As SparklineSetting _
) As Sparkline
'Usage
 
Dim instance As Worksheet
Dim row As System.Integer
Dim column As System.Integer
Dim dataRange As CellRange
Dim dataOrientation As DataOrientation
Dim type As SparklineType
Dim dateAxisRange As CellRange
Dim dateAxisRangeOrientation As DataOrientation
Dim setting As SparklineSetting
Dim value As Sparkline
 
value = instance.SetSparkline(row, column, dataRange, dataOrientation, type, dateAxisRange, dateAxisRangeOrientation, setting)
public Sparkline SetSparkline( 
   System.int row,
   System.int column,
   CellRange dataRange,
   DataOrientation dataOrientation,
   SparklineType type,
   CellRange dateAxisRange,
   DataOrientation dateAxisRangeOrientation,
   SparklineSetting setting
)

Parameters

row
The row.
column
The column.
dataRange
The data range.
dataOrientation
The data orientation.
type
The sparkline type.
dateAxisRange
The date axis range.
dateAxisRangeOrientation
The date axis range orientation.
setting
The sparkline setting.

Return Value

The sparkline.
Example
This example uses the SetSparkline method.
GrapeCity.Windows.SpreadSheet.Data.CellRange cellr = new GrapeCity.Windows.SpreadSheet.Data.CellRange(0, 0, 1, 3);
GrapeCity.Windows.SpreadSheet.Data.CellRange cellr2 = new GrapeCity.Windows.SpreadSheet.Data.CellRange(1, 0, 1, 3);
GrapeCity.Windows.SpreadSheet.Data.SparklineSetting ex = new GrapeCity.Windows.SpreadSheet.Data.SparklineSetting();
ex.DisplayXAxis = true;
ex.AxisColor = System.Windows.Media.Colors.CadetBlue;
gcSpreadSheet1.Sheets[0].Cells[0, 0].Value = Convert.ToDateTime("1/2/2011");
gcSpreadSheet1.Sheets[0].Cells[0, 1].Value = Convert.ToDateTime("1/3/2011");
gcSpreadSheet1.Sheets[0].Cells[0, 2].Value = Convert.ToDateTime("1/5/2011");
gcSpreadSheet1.Sheets[0].Cells[1, 0].Value = 2;
gcSpreadSheet1.Sheets[0].Cells[1, 1].Value = 11;
gcSpreadSheet1.Sheets[0].Cells[1, 2].Value = 4;
gcSpreadSheet1.Sheets[0].Cells[0, 0, 0, 2].Formatter = new GrapeCity.Windows.SpreadSheet.Data.GeneralFormatter("M/dd/yyyy");
gcSpreadSheet1.Sheets[0].SetSparkline(1, 4, cellr2, GrapeCity.Windows.SpreadSheet.Data.DataOrientation.Horizontal, GrapeCity.Windows.SpreadSheet.Data.SparklineType.Column, cellr, GrapeCity.Windows.SpreadSheet.Data.DataOrientation.Horizontal, ex);
gcSpreadSheet1.Invalidate(); 
Dim cellr As New GrapeCity.Windows.SpreadSheet.Data.CellRange(0, 0, 1, 3)
Dim cellr2 As New GrapeCity.Windows.SpreadSheet.Data.CellRange(1, 0, 1, 3)
Dim ex As New GrapeCity.Windows.SpreadSheet.Data.SparklineSetting()
ex.DisplayXAxis = True
ex.AxisColor = System.Windows.Media.Colors.CadetBlue
GcSpreadSheet1.Sheets(0).Cells(0, 0).Value = Convert.ToDateTime("1/2/2011")
GcSpreadSheet1.Sheets(0).Cells(0, 1).Value = Convert.ToDateTime("1/3/2011")
GcSpreadSheet1.Sheets(0).Cells(0, 2).Value = Convert.ToDateTime("1/5/2011")
GcSpreadSheet1.Sheets(0).Cells(1, 0).Value = 2
GcSpreadSheet1.Sheets(0).Cells(1, 1).Value = 11
GcSpreadSheet1.Sheets(0).Cells(1, 2).Value = 4
GcSpreadSheet1.Sheets(0).Cells(0, 0, 0, 2).Formatter = New GrapeCity.Windows.SpreadSheet.Data.GeneralFormatter("M/dd/yyyy")
GcSpreadSheet1.Sheets(0).SetSparkline(1, 4, cellr2, GrapeCity.Windows.SpreadSheet.Data.DataOrientation.Horizontal, GrapeCity.Windows.SpreadSheet.Data.SparklineType.Column, cellr, GrapeCity.Windows.SpreadSheet.Data.DataOrientation.Horizontal, ex)
GcSpreadSheet1.Invalidate()
See Also

Reference

Worksheet Class
Worksheet Members
Overload List