DisplayMinorGrid: Boolean;
DisplayMinorGrid: boolean;
The DisplayMinorGrid property determines whether minor gridlines are displayed.
Available values:
True. Minor gridlines are displayed.
False. Minor gridlines are not displayed.
Executing the example requires a form, the Button component with the Button1 identifier on this form, the ChartBox component with the ChartBox1 identifier and the UiErAnalyzer component with the UiErAnalyzer1 identifier. Specify the UiErAnalyzer1 data source for the ChartBox1 component.
The example is a handler of the OnClick event for the Button1 component.
Add a link to the Drawing system assembly.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Chart: IChart;
ChartAxis: IChartAxis;
MinorLinePen, MinorTickPen: IGxPen;
Begin
Chart := ChartBox1.Chart;
ChartAxis := Chart.AxisY;
ChartAxis.DisplayMinorGrid := True;
ChartAxis.MinorLinePen := New GxPen.CreateSolid(GxColor.FromName("Red"),0.1);
ChartAxis.MinorTick:= True;
ChartAxis.MinorTickPen := New GxPen.CreateSolid(GxColor.FromName("Green"),2.1);
End Sub Button1OnClick;
Clicking the button enables displaying of minor gridlines and grid tick marks with determined settings of color and line width.
The requirements and result of the Fore.NET example execution match with those of the Fore example. Use Fore.NET analogs instead of Fore components.
Imports Prognoz.Platform.Interop.Chart;
Imports Prognoz.Platform.Interop.Drawing;
…
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
Chart: IChart;
ChartAxis: IChartAxis;
MinorLinePen, MinorTickPen: GxPen = New GxPenClass();
GxColor: GxColorClass = New GxColorClassClass();
Begin
Chart:=ChartBoxNet1.CtrlBox.Chart;
ChartAxis:=Chart.AxisY;
ChartAxis.DisplayMinorGrid := True;
MinorLinePen := ChartAxis.MinorLinePen;
MinorLinePen.CreateSolid(GxColor.FromName("Red"),0.1);
ChartAxis.MinorTick:= True;
MinorTickPen := ChartAxis.MinorTickPen;
MinorTickPen.CreateSolid(GxColor.FromName("Green"),2.1);
End Sub;
See also: