IChart.ChartAsImage

Fore Syntax

ChartAsImage: Boolean;

Fore.NET Syntax

ChartAsImage: boolean;

Description

The ChartAsImage property determines whether charts can be displayed in a regular report using the HighChart component.

Comments

The property is set to False by default.

If the property is set to True, charts and maps in the web application are shown as images.

If the property is set to False, the web application shows chart as HighChart.

The property is not available in the interface.

Fore Example

Executing the example requires a chart in the regular report with the REGULAR_REPORT identifier. Add links to the Report, Tab, Chart and Metabase system assemblies.

Sub UserProc;
Var
    Report: IPrxReport;
    Chart: IChart;
    Sheet: ITabSheet;
    MB: IMetabase;
Begin
    MB := MetabaseClass.Active;
    Report := MB.ItemById("REGULAR_REPORT").Edit As IPrxReport;
    Sheet := (Report.Sheets.Item(0As IPrxTable).TabSheet;
    Chart := Sheet.Objects.Item(0).Extension As IChart;
    Chart.ChartAsImage :=  False;
    (Report As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the HighChart chart is shown in the web application report.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;
Imports Prognoz.Platform.Interop.Chart;

Public Shared Sub Main(Params: StartParams);
Var
    Report: IPrxReport;
    Chart: IChart;
    Sheet: ITabSheet;
    MB: IMetabase;
Begin
    MB := Params.Metabase;     
    Report := MB.ItemById["REGULAR_REPORT"].Edit() As IPrxReport;
    Sheet := (Report.Sheets.Item[0] As IPrxTable).TabSheet;     
    Chart := Sheet.Objects.Item[0].Extension As IChart;
    Chart.ChartAsImage :=  False;
    (Report As IMetabaseObject).Save();
End Sub;

See also:

IChart