corelibraries-devexpress-dot-xtracharts-dot-hottrackeventargs-4b2f346f.md
Provides access to an object related to the object being hit. The returned value depends on the HotTrackEventArgs.Object type and hit point location.
Namespace : DevExpress.XtraCharts
Assembly : DevExpress.XtraCharts.v25.2.dll
NuGet Package : DevExpress.Charts
public object AdditionalObject { get; }
Public ReadOnly Property AdditionalObject As Object
| Type | Description |
|---|---|
| Object |
A Object value representing an additional object that relates to the one being hit.
|
Use the AdditionalObject property, to access AxisTitle, AxisLabelItem and SeriesPoint objects in the ChartControl.ObjectHotTracked event handler, when the hit point falls within a region that represents the corresponding object on a diagram.
In situations different from those described above (e.g. when a user clicks another object), the AdditionalObject property returns null ( Nothing in Visual Basic).
This example demonstrates how you can obtain an internal value of an AxisLabelItem (returned by the HotTrackEventArgs.AdditionalObject property) in the ChartControl.ObjectHotTracked event handler.
private void chartControl1_ObjectHotTracked(object sender, HotTrackEventArgs e) {
if (e.AdditionalObject is AxisLabelItem) {
MessageBox.Show(((AxisLabelItem)e.AdditionalObject).AxisValueInternal.ToString());
}
}
Private Sub chartControl1_ObjectHotTracked(ByVal sender As Object, _
ByVal e As HotTrackEventArgs) Handles chartControl1.ObjectHotTracked
If TypeOf e.AdditionalObject Is AxisLabelItem Then
MessageBox.Show((CType(e.AdditionalObject, AxisLabelItem)).AxisValueInternal.ToString())
End If
End Sub
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AdditionalObject property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
private void chartControl1_ObjectHotTracked(object sender, HotTrackEventArgs e){
SeriesPoint point = e.AdditionalObject as SeriesPoint;
if (point == null) {
Private Sub chartControl1_ObjectHotTracked(ByVal sender As Object, ByVal e As HotTrackEventArgs)
Dim point As SeriesPoint = TryCast(e.AdditionalObject, SeriesPoint)
If point Is Nothing Then
See Also