DisplayTicks: Boolean;
DisplayTicks: Boolean;
The DisplayTicks property determines whether chart axis tick marks are displayed.
Available values:
True. Chart axis tick marks are displayed.
False. Default. Chart axis tick marks are not displayed.
To execute the example, on the form place the Button, ChartBox and UiErAnalyzer components (in the Fore.NET example use the ChartBoxNet and UiErAnalyzerNet components) named BUTTON1, BUTTON2, CHARTBOX1/CHARTBOXNET1 and UIERANALYZER1/UIERANALYZERNET1 respectively. In the ChartBox/ChartBoxNet component set the Source/UiSource property to UiErAnalyzer1/UiErAnalyzerNet1. In the Button1 component set the Text property to Hide Tick Marks value, in the Button2 component set the Show Tick Marks value. In the UiErAnalyzer/UiErAnalyzerNet component set the Active component to True. There should be an express report specified as the Object property for the UiErAnalyzer/UiErAnalyzerNet component.
Add links to the Chart, Drawing, Express, Forms, Forms.NET (for Fore.NET example) system assemblies.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Chart: IChart;
ChartAxisY: IChartAxis;
Begin
Chart := ChartBox1.Chart;
ChartAxisY := Chart.AxisY;
ChartAxisY.DisplayTicks:= False;
End Sub Button1OnClick;
Sub Button2OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Chart: IChart;
ChartAxisY: IChartAxis;
TickPen: IGxPen;
Begin
Chart := ChartBox1.Chart;
ChartAxisY := Chart.AxisY;
ChartAxisY.DisplayTicks := True;
ChartAxisY.TickPen := New GxPen.CreateSolid(GxColor.FromName("Green"),2.0);
End Sub Button2OnClick;
Imports Prognoz.Platform.Interop.Chart;
Imports Prognoz.Platform.Interop.Drawing;
…
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
Chart: IChart;
ChartAxisY: IChartAxis;
Begin
Chart := ChartBoxNet1.CtrlBox.Chart;
ChartAxisY := Chart.AxisY;
ChartAxisY.DisplayTicks := False;
End Sub;
Private Sub button2_Click(sender: System.Object; e: System.EventArgs);
Var
Chart: IChart;
ChartAxisY: IChartAxis;
TickPen: GxPen = New GxPenClass();
GxColorCls: GxColorClass = New GxColorClass();
Begin
Chart := ChartBoxNet1.CtrlBox.Chart;
ChartAxisY := Chart.AxisY;
ChartAxisY.DisplayTicks := True;
TickPen.CreateSolid(GxColorCls.FromName("Green"), 2.0);
ChartAxisY.TickPen := TickPen;
End Sub;
Clicking the Show Tick Marks button displays tick marks on the Y axis:
Clicking the Hide Tick Marks button hides tick marks on the Y axis:
See also: