DashStyle: GxDashStyle;
DashStyle: Prognoz.Platform.Interop.Drawing.GxDashStyle;
The DashStyle property determines the style of line displaying.
One of the values of GxDashStyle that differs from GxDashStyle.None and GxDashStyle.Undefined can be set as value of this property. On an attempt to set the GxDashStyle.None or GxDashStyle.Undefined value, the style is automatically replaced with GxDashStyle.Solid.
Executing the example requires that the repository contains a form, on which the following components must be placed:
EaxDocumentViewerBox with the EaxDocumentViewerBox1 identifier.
UiErAnalyzer with the UiErAnalyzer1 identifier, which is a data source for EaxDocumentViewerBox1.
Executing the example also requires an express report with a bubble chart that is a data source for UiErAnalyzer1.
Sub UserProc;
Var
EaxAnalyzer: IEaxAnalyzer;
BC: IEaxBubbleChart;
BCVZ: IVZBubbleChart;
AxisX: IVZChartAxis;
Pen: IGxPenBase;
Begin
// Get a repository object
EaxAnalyzer := UiErAnalyzer1.ErAnalyzer;
// Get a bubble chart
BC := EaxAnalyzer.BubbleChart;
BCVZ := BC.BubbleChart;
// Get X axis
AxisX := BCVZ.AxisX;
// Create a new pen
Pen := New GxPen.CreateSolid(GxColor.FromName("Red"));
// Set dashed line type
Pen.DashStyle := GxDashStyle.Dash;
// Set a new pen as a main one
AxisX.Pen := Pen;
// Set a new pen color
Pen.Color := New GxColor.CreateRGB(120, 0, 120);
// Set pen width
Pen.Width := 5;
// Refresh bubble chart
BC.Refresh;
End Sub Userproc;
After executing the example the X axis of the bubble chart will look as a dashed line with changed color and width.
The requirements and result of the Fore.NET example execution match with those in the Fore example. Use Fore.NET analogs instead of Fore components.
Public Sub Userproc();
Var
EaxAnalyzer: IEaxAnalyzer;
BC: IEaxBubbleChart;
BCVZ: IVZBubbleChart;
AxisX: IVZChartAxis;
Pen: GxPen = New GxPenClass();
GxColorCls: GxColorClass = New GxColorClassClass();
vGxColor: GxColorClass_2 = New GxColorClass_2();
Begin
// Get a repository object
EaxAnalyzer := UiErAnalyzerNet1.AnalyzerUi.ErAnalyzer;
// Get a bubble chart
BC := EaxAnalyzer.BubbleChart;
BCVZ := BC.BubbleChart;
// Get X axis
AxisX := BCVZ.AxisX;
// Create a new pen
Pen.CreateSolid(GxColorCls.FromName("Red"), 1);
// Set dashed line type
Pen.DashStyle := GxDashStyle.gdsDash;
// Set a new pen as a main one
AxisX.Pen := Pen;
// Set a new pen color
vGxColor.CreateRGB(120, 0, 120);
Pen.Color := vGxColor;
// Set pen width
Pen.Width := 5;
// Refresh bubble chart
BC.Refresh();
End Sub Userproc;
See also: