ISparkline.Color

Fore Syntax

Color: IGxColor;

Fore.NET Syntax

Color: Prognoz.Platform.Interop.Drawing.GxColor;

Description

The Color property determines a line color in sparkline.

Fore 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.

Fore.NET Example

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.

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    TSheet: TabSheet;
    Sparklines: ITabSparklines;
    Sparkline: ITabSparkline;
    ColorCls: GxColorClass = New GxColorClassClass();
Begin
    TSheet := TabSheetBoxNet1.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 := ColorCls.FromKnownColor(GxKnownColor.clRed);
    Sparkline.LineWidth := 0.5;
    Sparkline.NullValueBehavior := GxSparkNullValueBehavior.poDirectConnectionDotLine;
End Sub;

See also:

ISparkline