ISparkline.Color

Syntax

Color: IGxColor;

Description

The Color property determines a line color in sparkline.

Example

Executing the example requires a form with the Button1 button on it, the TabSheetBox component named TabSheetBox1 and a data source for TabSheetBox1.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    TSheet: ITabSheet;
    Sparklines: ITabSparklines;
    Sparkline: ITabSparkline;
Begin
    TSheet := TabSheetBox1.Source.GetTabSheet;
    Sparklines := TSheet.Sparklines;
    Sparklines.Add(TSheet.ParseRange("A0:A5"), TSheet.ParseRange("B0:F5"));
    Sparkline := Sparklines.Item(0);
    //Set up sparkline parameters
    Sparkline.Color := GxColor.FromKnownColor(GxKnownColor.Red);
    Sparkline.LineWidth := 0.5;
    Sparkline.NullValueBehavior := GxSparkNullValueBehavior.DirectConnectionDotLine;
End Sub Button1OnClick;

Clicking the button adds sparklines for the first cells of the A column. Sparklines are built by the data located by rows within the B0:F5 range. Custom formatting parameters are set for the first created sparkline.

See also:

ISparkline