IChartSeries.DefaultSerie

Syntax

DefaultSerie: IChartSerieBase;

Description

The DefaultSerie property determines default data series settings.

Comments

The default series settings are used by all new created chart series and the series that do not have any settings.

Example

Executing the example requires that the repository contains a regular report with REPORT identifier. The chart is created on report active sheet.

Add links to the Chart, Drawing, Metabase, Report, Tab system assemblies.

Sub UserProc;
Var
    Mb: IMetabase;
    Rep: IPrxReport;
    Tab: ITabSheet;
    Chart: IChart;
    Serie: IChartSerieBase;
    Shadow: IChartShadow;
Begin
    Mb := MetabaseClass.Active;
    Rep := Mb.ItemById(
"REPORT").Edit As IPrxReport;
    Tab := (Rep.ActiveSheet 
As IPrxTable).TabSheet;
    Chart := Tab.Objects.Item(
0As IChart;
    Tab.BeginUpdate;
    
//Set up default series
    Serie := Chart.Series.DefaultSerie;
    Serie.DefaultLabel.Position := ChartLabelPosition.AutoPlacement;
    Serie.Is3DBorder := 
True;
    Serie.DisplayShadow := 
True;
    Shadow := Serie.Shadow;
    Shadow.Color := GxColor.FromKnownColor(GxKnownColor.DarkGray);
    Shadow.Direction := 
New GxPointF.Create(0.5,0.5);
    Tab.EndUpdate;
    
//Save report
    (Rep As IMetabaseObject).Save;
End Sub UserProc;

On executing the example the default chart series settings will be modified: series labels will be placed automatically, 3D style of series borders will be used and the shadow will be displayed for series. All chart series for which settings are not defined will use the specified settings.

See also:

IChartSeries