ChartHitInfoBase.AxisTitle Property
Gets an axis title which is located under the test point.
Namespace: DevExpress.XtraCharts
Assembly: DevExpress.XtraCharts.v24.2.dll
NuGet Package: DevExpress.Charts
#Declaration
#Property Value
Type | Description |
---|---|
Axis |
An Axis |
#Remarks
Use the AxisTitle property to access the axis title located under the test point if the ChartHitInfo.InAxis property returns true.
Note
The Axis
For more information, refer to Axis Titles.
#Example
This example demonstrates how you can determine whether an axis title is being hovered by the mouse pointer, and if so, display its type (AxisTitleX or AxisTitleY) in a tooltip.
using DevExpress.XtraCharts;
using System;
using System.Windows.Forms;
namespace AxisTitleHitTestSample {
public partial class SampleForm : Form {
public SampleForm() {
InitializeComponent();
}
private void OnMouseMove(object sender, MouseEventArgs e) {
ChartHitInfo hitInfo = chart.CalcHitInfo(e.X, e.Y);
if (hitInfo.AxisTitle != null)
tooltipController.ShowHint(
String.Format(
"The pointer is over the {0} object.",
hitInfo.AxisTitle.GetType().ToString()
)
);
else
tooltipController.HideHint();
}
}
}