Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]ASP.NET WebForms Controls
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Collapse]API Reference
  [Expand]DevExpress.Data.Linq
  [Expand]DevExpress.Web
  [Expand]DevExpress.Web.ASPxGauges
  [Expand]DevExpress.Web.ASPxGauges.Base
  [Expand]DevExpress.Web.ASPxGauges.Scripts
  [Expand]DevExpress.Web.ASPxHtmlEditor
  [Expand]DevExpress.Web.ASPxHtmlEditor.Localization
  [Expand]DevExpress.Web.ASPxHtmlEditor.Scripts
  [Expand]DevExpress.Web.ASPxPivotGrid
  [Expand]DevExpress.Web.ASPxPivotGrid.Data
  [Expand]DevExpress.Web.ASPxPivotGrid.HtmlControls
  [Expand]DevExpress.Web.ASPxPivotGrid.Scripts
  [Expand]DevExpress.Web.ASPxRichEdit
  [Expand]DevExpress.Web.ASPxRichEdit.Localization
  [Expand]DevExpress.Web.ASPxRichEdit.Scripts
  [Expand]DevExpress.Web.ASPxScheduler
  [Expand]DevExpress.Web.ASPxScheduler.Commands.Dialogs
  [Expand]DevExpress.Web.ASPxScheduler.Controls
  [Expand]DevExpress.Web.ASPxScheduler.Dialogs
  [Expand]DevExpress.Web.ASPxScheduler.Drawing
  [Expand]DevExpress.Web.ASPxScheduler.Localization
  [Expand]DevExpress.Web.ASPxScheduler.Reporting
  [Expand]DevExpress.Web.ASPxScheduler.Scripts
  [Expand]DevExpress.Web.ASPxSpellChecker
  [Expand]DevExpress.Web.ASPxSpellChecker.Localization
  [Expand]DevExpress.Web.ASPxSpellChecker.Scripts
  [Expand]DevExpress.Web.ASPxSpreadsheet
  [Expand]DevExpress.Web.ASPxSpreadsheet.Localization
  [Expand]DevExpress.Web.ASPxSpreadsheet.Scripts
  [Expand]DevExpress.Web.ASPxTreeList
  [Expand]DevExpress.Web.ASPxTreeList.Internal
  [Expand]DevExpress.Web.ASPxTreeList.Localization
  [Expand]DevExpress.Web.ASPxTreeList.Scripts
  [Expand]DevExpress.Web.Captcha
  [Expand]DevExpress.Web.Data
  [Expand]DevExpress.Web.Internal
  [Expand]DevExpress.Web.Localization
  [Expand]DevExpress.Web.Mvc
  [Expand]DevExpress.Web.Mvc.BinderSettings
  [Expand]DevExpress.Web.Mvc.Controllers
  [Expand]DevExpress.Web.MVC.Scripts
  [Expand]DevExpress.Web.Mvc.UI
  [Expand]DevExpress.Web.Office
  [Expand]DevExpress.Web.Office.Internal
  [Expand]DevExpress.Web.Rendering
  [Expand]DevExpress.Web.Scripts
  [Collapse]DevExpress.XtraCharts.Web
   [Expand]CallbackStateEventArgs Class
   [Expand]CallbackStateLoadEventArgs Class
    CallbackStateLoadEventHandler Delegate
   [Expand]CallbackStateSaveEventArgs Class
    CallbackStateSaveEventHandler Delegate
   [Expand]ChartClientSideEvents Class
    ChartImagePosition Enumeration
   [Expand]ChartToolTipController Class
   [Expand]CustomCallbackEventArgs Class
    CustomCallbackEventHandler Delegate
    RenderFormat Enumeration
    ToolTipOpenMode Enumeration
   [Collapse]WebChartControl Class
     WebChartControl Members
     WebChartControl Constructor
    [Expand]WebChartControl Properties
    [Collapse]WebChartControl Events
      AxisScaleChanged Event
      AxisVisualRangeChanged Event
      AxisWholeRangeChanged Event
      BoundDataChanged Event
      CallbackStateLoad Event
      CallbackStateSave Event
      CustomCallback Event
      CustomDrawAxisLabel Event
      CustomDrawCrosshair Event
      CustomDrawSeries Event
      CustomDrawSeriesPoint Event
      CustomizeAutoBindingSettings Event
      CustomizeLegend Event
      CustomizeResolveOverlappingMode Event
      CustomizeSimpleDiagramLayout Event
      CustomizeXAxisLabels Event
      CustomJSProperties Event
      CustomPaint Event
      EndLoading Event
      LegendItemChecked Event
      ObjectSelected Event
      PieSeriesPointExploded Event
      PivotChartingCustomizeLegend Event
      PivotChartingCustomizeResolveOverlappingMode Event
      PivotChartingCustomizeXAxisLabels Event
      PivotGridSeriesExcluded Event
      PivotGridSeriesPointsExcluded Event
      SelectedItemsChanged Event
      SmallChartTextShowing Event
    [Expand]WebChartControl Methods
  [Expand]DevExpress.XtraCharts.Web.Designer
  [Expand]DevExpress.XtraCharts.Web.Scripts
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

WebChartControl.ObjectSelected Event

Occurs when an end-user clicks on any chart element.

Namespace:DevExpress.XtraCharts.Web
Assembly:DevExpress.XtraCharts.v17.2.Web.dll

Expanded Syntax

Expanded Event Data

The event handler receives an argument of type HotTrackEventArgs containing data related to this event.

The following HotTrackEventArgs properties provide information specific to this event.
Property Description
AdditionalObject Provides access to an object related to the object being hit. The returned value depends on the DevExpress.XtraCharts.HotTrackEventArgs.Object type and hit point location.
Cancel Gets or sets whether the hot-tracking should be cancelled.
HitInfo Gets details on the chart elements located at the point where an end-user has clicked when hot-tracking or selecting a chart element at runtime.
Object Gets the chart element, for which the event was raised.

Expanded Remarks

An end-user is able to hover any chart element by the mouse pointer and click on it. So, this chart element becomes selected, and the ObjectSelected event is generated. Handle this event if you want to perform some specific actions when an end-user selects a chart's elements, or if you want to disable the selection of particular elements. Note that the currently selected element of the chart can be accessed via the ObjectSelected property.

Note

This event won't be fired, if it is processed on the client in the ASPxClientWebChartControl.ObjectSelected event handler, and the processOnServer property is set to false in that event handler.

Expanded Example

This example demonstrates how to implement custom hot-tracking and selection of the chart's elements at runtime.

Note

To enable runtime hot-tracking and selection, the DevExpress.XtraCharts.ChartControl.RuntimeSelection property should be set to true.

If you want to change the default hot-tracking and selection, you should handle the DevExpress.XtraCharts.ChartControl.ObjectHotTracked and DevExpress.XtraCharts.ChartControl.ObjectSelected events, implement your custom hot-tracking and selection approaches and set the Cancel property to true.

For example, the code below illustrates how to disable selection and hot-tracking of a chart's diagram.

Expanded See Also

How would you rate this topic?​​​​​​​