Sparklines: ITabSparklines;
Sparklines: Prognoz.Platform.Interop.Tab.ITabSparklines;
The Sparklines property returns collection of sparklines displayed in the table.
Sparklines are little charts which are shown in table cells and which contain data of only one data series. Sparklines can be built by data located both in columns and in rows.
On creating new sparklines using the Add method the direction of data, by which sparklines are built, is determined automatically. The direction depends on position of the range, in which sparklines will be built. For example, if four cells of a column are selected for building sparklines, the range containing four rows must be selected as a data range. If the specified ranges of sparkline position and source data are not equal (the number of rows or column, in which sparklines will be built is not equal to the number of columns or rows in the data range), an exception is generated.
Sparklines can also be built on compound range of data. Directions of data in separate parts of a compound range must be equal.
After a sparkline is created, it is possible to set individual parameters for each sparkline: color and width of chart lines, method of empty values processing, layout of the data used to built the chart and position of the sparkline.
To execute the example a form, a button named Button1 positioned on this form, the TabSheetBox component named TabSheetBox1, and a data source for TabSheetBox1 are required.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
TSheet: ITabSheet;
Sparklines: ITabSparklines;
Begin
TSheet := TabSheetBox1.Source.GetTabSheet;
Sparklines := TSheet.Sparklines;
Sparklines.Add(TSheet.ParseRange("A0:A5"), TSheet.ParseRange("B0:F5"));
End Sub Button1OnClick;
On pressing the button sparklines are added for the first cells of the A column. Sparklines are built by the data located by rows within the B0:F5 range.
The requirements and result of the Fore.NET Example execution match with those in the Fore Example. Use Fore.NET analogs instead of Fore components.
Imports Prognoz.Platform.Interop.Tab;
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
TSheet: ITabSheet;
Sparklines: ITabSparklines;
Begin
TSheet := TabSheetBoxNet1.Source.GetTabSheet();
Sparklines := TSheet.Sparklines;
Sparklines.Add(TSheet.ParseRange("A0:A5"), TSheet.ParseRange("B0:F5"));
End Sub;
See also: