Spread WPF Documentation
GroupSparkline Method
Example 


GrapeCity.Windows.SpreadSheet.Data Namespace > Worksheet Class : GroupSparkline Method
The sparklines to group.
Groups the sparklines.
Syntax
'Declaration
 
Public Function GroupSparkline( _
   ByVal sparklines() As Sparkline _
) As SparklineGroup
'Usage
 
Dim instance As Worksheet
Dim sparklines() As Sparkline
Dim value As SparklineGroup
 
value = instance.GroupSparkline(sparklines)
public SparklineGroup GroupSparkline( 
   Sparkline[] sparklines
)

Parameters

sparklines
The sparklines to group.

Return Value

The group.
Example
This example uses the GroupSparkline method.
for (int i = 0; i < 2; i++)
 {
   for (int j = 1; j < 5; j++)
     {
         this.gcSpreadSheet1.Sheets[0].Cells[i, j].Value = i * 10 + j;
     }
  }

Sparkline sparkline1= gcSpreadSheet1.Sheets[0].SetSparkline(0, 0, new CellRange(0, 1, 1, 4), DataOrientation.Horizontal, SparklineType.Line, new SparklineSetting());
Sparkline sparkline2 = gcSpreadSheet1.Sheets[0].SetSparkline(1, 0, new CellRange(1, 0, 1, 4), DataOrientation.Horizontal, SparklineType.Column, new SparklineSetting());
SparklineGroup group= gcSpreadSheet1.Sheets[0].GroupSparkline(new Sparkline[] { sparkline1, sparkline2 });
//gcSpreadSheet1.Sheets[0].UngroupSparkline(group);
        For i As Integer = 0 To 1
            For j As Integer = 1 To 4
                Me.GcSpreadSheet1.Sheets(0).Cells(i, j).Value = i * 10 + j
            Next
        Next

Dim sparkline1 As Sparkline = GcSpreadSheet1.Sheets(0).SetSparkline(0, 0, New CellRange(0, 1, 1, 4), DataOrientation.Horizontal, SparklineType.Line, New SparklineSetting())
Dim sparkline2 As Sparkline = GcSpreadSheet1.Sheets(0).SetSparkline(1, 0, New CellRange(1, 0, 1, 4), DataOrientation.Horizontal, SparklineType.Column, New SparklineSetting())
Dim sparklinegroup As SparklineGroup =GcSpreadSheet1.Sheets(0).GroupSparkline(New Sparkline() {sparkline1, sparkline2})
'GcSpreadSheet1.Sheets(0).UngroupSparkline(SparklineGroup)
See Also

Reference

Worksheet Class
Worksheet Members