Name: String;
Name: String;
The Name property determines trend line name in legend.
Executing the example requires that the repository contains an express report with the EXPRESS identifier containing a bubble chart.
Add links to the Drawing, Express, Metabase, Visualizators system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Express: IEaxAnalyzer;
BC: IVZBubbleChart;
TL: IVZBubbleChartTrendLine;
Pen: IGxPenBase;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get express report
Express := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
// Get bubble chart
BC := Express.BubbleChart.BubbleChart;
// Get trend line
TL := BC.TrendLine;
// Make trend line visible
TL.Visible := True;
// Display trend line in legend
TL.ShowInLegend := True;
// Set exponential type to trend line
TL.Type := BubbleChartTrendLineType.Exponential;
// Redefine name of trend line in legend
TL.Name := "Trend 2018";
// Create a pen for trend line
Pen := New GxPen.CreateSolid(GxColor.FromName("Red"));
// Set dashed line type
Pen.DashStyle := GxDashStyle.Dash;
// Set a new pen color
Pen.Color := New GxColor.CreateRGB(120, 0, 120);
// Set pen width
Pen.Width := 3;
// Set a new pen as trend line pen
TL.Pen := Pen;
// Refresh bubble chart and save report
Express.BubbleChart.Refresh;
(Express As IMetabaseObject).Save;
End Sub UserProc;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Visualizators;
Imports Prognoz.Platform.Interop.Drawing;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Express: IEaxAnalyzer;
BC: IVZBubbleChart;
TL: IVZBubbleChartTrendLine;
Pen: GxPen = New GxPenClass();
GxColorCls: GxColorClass = New GxColorClassClass();
vGxColor: GxColorClass_2 = New GxColorClass_2();
Begin
// Get repository
MB := Params.Metabase;
// Get express report
Express := MB.ItemById["EXPRESS"].Edit() As IEaxAnalyzer;
// Get bubble chart
BC := Express.BubbleChart.BubbleChart;
//Get trend line
TL := BC.TrendLine;
// Make trend line visible
TL.Visible := True;
// Display trend line in legend
TL.ShowInLegend := True;
// Set exponential type to trend line
TL.Type := BubbleChartTrendLineType.bcttExponential;
// Redefine name of trend line in legend
TL.Name := "Trend 2018";
// Create a pen for trend line
Pen.CreateSolid(GxColor.FromName("Red"),1);
// Set dashed line type
Pen.DashStyle := GxDashStyle.gdsDash;
// Set a new pen color
vGxColor.CreateRGB(120, 0, 120);
Pen.Color := vGxColor;
// Set pen width
Pen.Width := 3;
// Set a new pen as trend line pen
TL.Pen := Pen;
// Refresh bubble chart and save report
Express.BubbleChart.Refresh();
(Express As IMetabaseObject).Save();
End Sub;
After executing the example trend line with the specified parameters will be added to bubble chart in express report.
For example:
See also: