MakeBlackAndWhite;
MakeBlackAndWhite();
The MakeBlackAndWhite method allows to display the chart in black and white.
To execute this example you need to add links to the Chart, Report and Tab system assemblies. This unit is to be connected to the regular report a sheet of which contains only a chart. The ChangeBlackAndWhite is specified as the handler of clicking a hyperlink 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 performing the ChangeBlackAndWhite procedure the chart is displayed in black and white format.
This example assumes that there is the Chart object of the IChart type. The chart must be a pie chart type with secondary pie or bar chart. If required, the chart can be transformed into the desired type by running 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 this button displays only the secondary chart in black and white.
See also: