Syncfusion.XlsIO.Base
Example 


Syncfusion.XlsIO Namespace > IWorksheet Interface : SparklineGroups Property

SparklineGroups Property

Gets the sparkline groups.
Syntax
'Declaration
 
ReadOnly Property SparklineGroups As ISparklineGroups
'Usage
 
Dim instance As IWorksheet
Dim value As ISparklineGroups
 
value = instance.SparklineGroups
ISparklineGroups SparklineGroups {get;}

Property Value

The sparkline groups.
Example
The following code illustrates how to get the Spark line groups from the sheet.
//A new Sparkline group is added to the sheet sparklinegroups
ISparklineGroup sparklineGroup = sheet.SparklineGroups.Add();
            
//Set the Sparkline group type as line
sparklineGroup.SparklineType = SparklineType.Line;
            
//Set to display the empty cell as line
sparklineGroup.DisplayEmptyCellsAs = SparklineEmptyCells.Line;
            
//Sparkline group style properties
sparklineGroup.ShowFirstPoint = true;
sparklineGroup.FirstPointColor = Color.Green;
sparklineGroup.ShowLastPoint = true;
sparklineGroup.LastPointColor = Color.DarkOrange;
sparklineGroup.ShowHighPoint = true;
sparklineGroup.HighPointColor = Color.DarkBlue;
sparklineGroup.ShowLowPoint = true;
sparklineGroup.LowPointColor = Color.DarkViolet;
sparklineGroup.ShowMarkers = true;
sparklineGroup.MarkersColor = Color.Black;
sparklineGroup.ShowNegativePoint = true;
sparklineGroup.NegativePointColor = Color.Red;
            
//set the line weight
sparklineGroup.LineWeight = 0.3;
//The sparklines are added to the sparklinegroup.
ISparklines sparklines = sparklineGroup.Add();
            
//Set the Sparkline Datarange 
IRange dataRange = sheet.Range["D6:G17"];
//Set the Sparkline Reference range
IRange referenceRange = sheet.Range["H6:H17"];
            
//Create a sparkline with the datarange and reference range
sparklines.Add(dataRange, referenceRange);
            
ISparklineGroups sparkline = sheet.SparklineGroups;
AssemblyVersion

Syncfusion.XlsIO.Base: 16.4460.0.40

See Also