IChartExternLegend.FontColor

Fore Syntax

FontColor: IGxColor;

Fore.NET Syntax

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

Description

The FontColor property determines a font color of external chart legend.

Fore Example

Executing the example requires a regular report with the Report identifier. The report includes the following objects: a chart and an external legend.

Sub Main;
Var
    mb: IMetabase;
    rep: IPrxReport;
    legend: IPrxChartLegend;
    chartlegend: IChartExternLegend;
    objects: ITabObjects;
    FColor: IGxColor;
Begin
    mb := MetabaseClass.Active;
    rep := mb.ItemById("OBJ42859").Edit As IPrxReport;
    objects := (rep.ActiveSheet As IprxTable).TabSheet.Objects;
    legend := (objects.Item(1)) As IPrxChartLegend;
    chartlegend := legend As IChartExternLegend;
    chartlegend.AddChart(objects.Item(2As ichart);
    FColor:= New GxColor.CreateARGB(210,120,130,240);
    chartlegend.FontColor:= FColor; 
    (rep As IMetabaseObject).Save;
End Sub Main;

After executing the example the font color of the chart external legend is changed to blue.

Fore.NET Example

Executing the example requires a regular report with the Report identifier. The report includes the following objects: a chart and an external legend.

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Chart;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;
Imports Prognoz.Platform.Interop.Drawing;
...
Public Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    rep: IPrxReport;
    legend: IPrxChartLegend;
    chartlegend: IChartExternLegend;
    objects: ITabObjects;
    FColor: GxColorClass_2;
Begin
    mb := Params.Metabase;
    rep := mb.ItemById["OBJ42859"].Edit() As IPrxReport;
    objects := (rep.ActiveSheet As IprxTable).TabSheet.Objects;
    legend := (objects.Item[1]) As IPrxChartLegend;
    chartlegend := legend As IChartExternLegend;
    chartlegend.AddChart(objects.Item[2As DxChart);
    FColor:= New GxColorClass_2();
    FColor.CreateRGB(120,130,140);
    chartlegend.FontColor:= FColor; 
    (rep As IMetabaseObject).Save();
End Sub;

After executing the example the font color of the chart external legend is changed to blue.

See also:

IChartExternLegend