GrapeCity.Xaml.SpreadSheet.Data
SetSparkline(Int32,Int32,CellRange,DataOrientation,SparklineType,CellRange,DataOrientation,SparklineSetting) Method
Example 


GrapeCity.Xaml.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 Integer, _
   ByVal column As 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 Integer
Dim column As 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)

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 creates a sparkline.
GrapeCity.Xaml.SpreadSheet.Data.CellRange cellr = new GrapeCity.Xaml.SpreadSheet.Data.CellRange(0, 0, 1, 5);
GrapeCity.Xaml.SpreadSheet.Data.CellRange cellr2 = new GrapeCity.Xaml.SpreadSheet.Data.CellRange(1, 0, 1, 5);
GrapeCity.Xaml.SpreadSheet.Data.SparklineSetting ex = new GrapeCity.Xaml.SpreadSheet.Data.SparklineSetting();
ex.AxisColor = Windows.UI.Colors.Azure;
ex.LineWeight = 1;
ex.ShowMarkers = true;
ex.MarkersColor = Windows.UI.Colors.CadetBlue;
ex.ShowFirst = true;
ex.ShowHigh = true;
//ex.ShowLow = true;
ex.ShowLast = true;
ex.ShowNegative = true;
ex.FirstMarkerColor = Windows.UI.Colors.Crimson;
ex.HighMarkerColor = Windows.UI.Colors.DarkGoldenrod;
ex.LastMarkerColor = Windows.UI.Colors.DarkGreen;
//ex.LowMarkerColor = Windows.UI.Colors.DarkOrange;
ex.NegativeColor = Windows.UI.Colors.GreenYellow;
gcSpreadSheet1.Sheets[0].Cells[0, 0].Value = 2;
gcSpreadSheet1.Sheets[0].Cells[0, 1].Value = 5;
gcSpreadSheet1.Sheets[0].Cells[0, 2].Value = 4;
gcSpreadSheet1.Sheets[0].Cells[0, 3].Value = -1;
gcSpreadSheet1.Sheets[0].Cells[0, 4].Value = 3;
gcSpreadSheet1.Sheets[0].Cells[1, 0].Value = new DateTime(2011, 1, 11);
gcSpreadSheet1.Sheets[0].Cells[1, 1].Value = new DateTime(2011, 1, 08);
gcSpreadSheet1.Sheets[0].Cells[1, 2].Value = new DateTime(2011, 1, 09);
gcSpreadSheet1.Sheets[0].Cells[1, 3].Value = new DateTime(2011, 1, 14);
gcSpreadSheet1.Sheets[0].Cells[1, 4].Value = new DateTime(2011, 1, 20);
gcSpreadSheet1.Sheets[0].SetSparkline(0, 5, cellr, GrapeCity.Xaml.SpreadSheet.Data.DataOrientation.Horizontal, GrapeCity.Xaml.SpreadSheet.Data.SparklineType.Line, ex);
//gcSpreadSheet1.Sheets[0].SetSparkline(0, 5, cellr, GrapeCity.Xaml.SpreadSheet.Data.DataOrientation.Horizontal, GrapeCity.Xaml.SpreadSheet.Data.SparklineType.Column, cellr2, GrapeCity.Xaml.SpreadSheet.Data.DataOrientation.Horizontal, ex);
Dim cellr As New GrapeCity.Xaml.SpreadSheet.Data.CellRange(0, 0, 1, 5)
Dim cellr2 As New GrapeCity.Xaml.SpreadSheet.Data.CellRange(1, 0, 1, 5)
Dim ex As New GrapeCity.Xaml.SpreadSheet.Data.SparklineSetting()
ex.AxisColor = Windows.UI.Colors.Azure
ex.LineWeight = 1
ex.ShowMarkers = True
ex.MarkersColor = Windows.UI.Colors.CadetBlue
ex.ShowFirst = True
ex.ShowHigh = True
'ex.ShowLow = True
ex.ShowLast = True
ex.ShowNegative = True
ex.FirstMarkerColor = Windows.UI.Colors.Crimson
ex.HighMarkerColor = Windows.UI.Colors.DarkGoldenrod
ex.LastMarkerColor = Windows.UI.Colors.DarkGreen
'ex.LowMarkerColor =  Windows.UI.Colors.DarkOrange
ex.NegativeColor = Windows.UI.Colors.GreenYellow
gcSpreadSheet1.Sheets(0).Cells(0, 0).Value = 2
gcSpreadSheet1.Sheets(0).Cells(0, 1).Value = 5
gcSpreadSheet1.Sheets(0).Cells(0, 2).Value = 4
gcSpreadSheet1.Sheets(0).Cells(0, 3).Value = -1
gcSpreadSheet1.Sheets(0).Cells(0, 4).Value = 3
gcSpreadSheet1.Sheets(0).Cells(1, 0).Value = New DateTime(2011, 1, 11)
gcSpreadSheet1.Sheets(0).Cells(1, 1).Value = New DateTime(2011, 1, 8)
gcSpreadSheet1.Sheets(0).Cells(1, 2).Value = New DateTime(2011, 1, 9)
gcSpreadSheet1.Sheets(0).Cells(1, 3).Value = New DateTime(2011, 1, 14)
gcSpreadSheet1.Sheets(0).Cells(1, 4).Value = New DateTime(2011, 1, 20)
gcSpreadSheet1.Sheets(0).SetSparkline(0, 5, cellr, GrapeCity.Xaml.SpreadSheet.Data.DataOrientation.Horizontal, GrapeCity.Xaml.SpreadSheet.Data.SparklineType.Line, ex)
'GcSpreadSheet1.Sheets(0).SetSparkline(0, 5, cellr, GrapeCity.Xaml.SpreadSheet.Data.DataOrientation.Horizontal, GrapeCity.Xaml.SpreadSheet.Data.SparklineType.Column, cellr2, GrapeCity.Xaml.SpreadSheet.Data.DataOrientation.Horizontal, ex)
See Also

Reference

Worksheet Class
Worksheet Members
Overload List