Spread Windows Forms 8.0 Product Documentation > Developer's Guide > Customizing Row, Column, and Cell Appearance > Customizing the Appearance of a Cell > Using Sparklines > Working with Sparklines |
You can group, delete, cut, copy, and switch rows and columns with sparklines.
Grouping merges sparklines into a new group and removes them from the old groups. If the selected sparklines belong to different groups with different types, the new group will have the type of the last selected group. The new group will also have the empty cell, style, and axis settings of the last selected group.
Ungrouping selected sparkline groups separates them into different groups that contain only one sparkline. The data and location range of the original sparkline are used in the new groups. The settings of the original group are also used in the new groups.
If you delete a group, all sparklines in the group are also deleted. You can clear a sparkline in code with the ClearSparklines method in the Sheetview class.
You can use standard Windows shortcut keys to cut, copy, or paste sparklines.
If you copy a group of sparklines, they will become a new group when they are pasted to a new location. Copying a single sparkline from a group, will create a new group with a single sparkline.
You can switch the range of data used in the sparkline from row to column or column to row. Use the SwitchRowColumn method in the ExcelSparklineGroup class in code. The range of data should have the same number of rows and columns. Use the AddSquareSparkline method in the SheetView class to add a sparkline that can be switched.
This example shows how to use the GroupSparkline method or the UnGroupSparkline method.
C# |
Copy Code
|
---|---|
fpSpread1.Sheets[0].GroupSparkline(new FarPoint.Win.Spread.Model.CellRange[] { new FarPoint.Win.Spread.Model.CellRange(5, 0, 3, 1) }); // fpSpread1.Sheets[0].UnGroupSparkline(new FarPoint.Win.Spread.Model.CellRange[] { new FarPoint.Win.Spread.Model.CellRange(5, 0, 3, 1) }); |
VB |
Copy Code
|
---|---|
FpSpread1.Sheets(0).GroupSparkline(New FarPoint.Win.Spread.Model.CellRange() {New FarPoint.Win.Spread.Model.CellRange(5, 0, 3, 1)}) 'FpSpread1.Sheets(0).UnGroupSparkline(New FarPoint.Win.Spread.Model.CellRange() {New FarPoint.Win.Spread.Model.CellRange(5, 0, 3, 1)}) |