Spread for Winforms provides a feature of creating sparklines wherein we can create a small graph in a cell that uses data from a range of cells. The data for the sparkline is limited to one column or row of values within the same SpreadSheet. We can set the SparklineType to column, line, or winloss etc. Here in this blog we will explain an approach to create custom winloss SparklineType from an external datasource wherein the data is fetched from some other sheet of FpSpread.
STEP 1 - Create Custom Class Inherited from ExcelSparkLine
First of all we need to create a CustomExcelSparkline class inheriting from ExcelSparkline class which takes SheetView as datasource as given below:-
STEP 2 - Use Custom class to Create winloss SparklineType
Now we will use this CustomExcelSparkline to create winloss SparklineType which takes data from some other sheet of Spread on which it is drawn:-
winloss SpreadSparkline Download sample for detailed implementation : DownloadSample_CS DownloadSample_VB