IChart.MakeBlackAndWhite

Fore Syntax

MakeBlackAndWhite;

Fore.NET Syntax

MakeBlackAndWhite();

Description

The MakeBlackAndWhite method enables the user to display a chart in black and white format.

Fore Example

To execute the example, add links to the Chart, Report and Tab system assemblies. This unit is connected to the regular report, a sheet of which contains only a chart. The ChangeBlackAndWhite procedure is assigned as a handler of a hyperlink click in a report cell.

Sub ChangeBlackAndWhite;
Var
    Rep: IPrxReport;
    TabS: ITabSheet;
    pChart: IPrxChart;
    Chart: IChart;
Begin
    Rep := PrxReport.ActiveReport;
    TabS := (Rep.ActiveSheet As IPrxTable).TabSheet;
    pChart := TabS.Objects.Item(0).Extension As IPrxChart;
    Chart := pChart As IChart;
    Chart.MakeBlackAndWhite;
    TabS.Recalc;
End Sub ChangeBlackAndWhite;

After clicking the hyperlink executing the ChangeBlackAndWhite procedure the chart is displayed in black and white format.

Fore.NET Example

This example assumes that there is the Chart object of the IChart type. The chart must be a pie chart type with a secondary pie chart or histogram. If required, the chart can be transformed into the required type by executing the command: Chart.Type := 10 As ChartType.

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Chart;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    Chart : IChart;
Begin
    Chart := UiChartNet1.ChartUi.Chart;
    Chart.CircleInfoEx.ShowMode:= ChartSecondaryShowMode.cssmOnlySecondary;
    Chart.MakeBlackAndWhite();
End Sub;

Clicking the button displays only the secondary chart in black and white format.

See also:

IChart