[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Collapse]Chart Control
   [Expand]Getting Started
   [Expand]Charting Basics
   [Expand]Series Views
   [Expand]Chart Elements
   [Collapse]Providing Data
     Create a Series Manually
     Manually Add Points to a Series
     Specify Series Data Members
     Generate Series from a Data Source
     Integration with a Data Grid, Vertical Grid, Tree List or List Box via ControlRowSource
     Pivot Charting (Integration with a Pivot Grid Control)
     Series Scale Types
     Series Colorizer
     Drill Down
     Performance
   [Expand]Data Representation
   [Expand]Appearance Customization
   [Expand]End-User Features
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Expand]Examples
   [Expand]Additional Resources
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Drill Down

The Drill Down functionality allows you to reveal additional details when the Chart Control summarizes its data source. For example, a series point of a chart that displays annual sales grouped by category can be expanded to a chart that displays sale dynamics by product.

Note that the Chart Control uses the Breadcrumbs element to display detail levels through which end-users can navigate. Refer to the Breadcrumbs topic for more information about this element.

Demo: Drill Down

Expanded How to: Configure the Drill Down

The Chart Control utilizes the Nested Series Templates to display detail data. Each series template can store up to three direct child templates that specify detail data representation. All series templates use ChartControl.DataSource, but detailed templates obtain filtered data. The following list enumerates all child template types and explains data received by a detailed template.

Important

The Drill Down only supports series generated by series templates.

Note

Drill Down to Argument

The Chart uses the SeriesTemplate.ArgumentDrillTemplate template to reveal detail data when an end-user clicks an argument axis label. Detail data contains all data items that include an argument field value equaling the clicked argument value.

The following code demonstrates how to configure this template.

Note

A complete sample project is available on GitHub at How to: Create a Drill-Down Chart.

The code snippet above uses the following properties.

Symbol Description
ChartControl.SeriesTemplate Returns the series template the chart uses to generate its series.
SeriesTemplate.ArgumentDrillTemplate Gets or sets the series template that the Chart Control uses to generate detailed series when the Control should display a data slice filtered by an argument.

Drill Down to Series

The SeriesTemplate.SeriesDrillTemplate template specifies how the Chart Control displays detail data when end-users click a series generated by the master template. Detail data contains all data items that include a series field value equaling the selected series identifier.

The following code demonstrates how to configure this template.

Note

A complete sample project is available on GitHub at How to: Create a Drill-Down Chart.

The example uses the properties outlined below.

Symbol Description
ChartControl.SeriesTemplate Returns the series template the chart uses to generate its series.
SeriesTemplate.SeriesDrillTemplate Gets or sets the series template that the Chart Control uses to generate detailed series when the Control should display a data slice filtered by a series identifier.

Drill Down to Series Point

The SeriesTemplate.SeriesPointDrillTemplate template specifies how series that display detail data when an end-user selects a series point to expand look. Detail data contains data items that the Chart Control summarizes or aggregates into the selected series point.

The following code demonstrates how to configure this template.

Note

A complete sample project is available on GitHub at How to: Create a Drill-Down Chart.

The code snippet above uses the following properties.

Symbol Description
ChartControl.SeriesTemplate Returns the series template the chart uses to generate its series.
SeriesTemplate.SeriesPointDrillTemplate Gets or sets the series template that the Chart Control uses to generate detailed series when the Control should display a data slice filtered by a series point.

Note that any Drill Template can contain other nested templates.

The following code demonstrates how to configure the chart control to display the second nested data level.

Expanded How to: Manage Drill Down State at Runtime

The chart control provides methods that allow you to drill down/drill up to a specific detail level. Also, the chart diagram stores Drill Down Options that manage how charts behave on a click of its elements.

The following table contains the chart control's methods that manage the Drill Down State.

Method Description
XYDiagram.DrillDownOptions Returns mouse actions and hotkey settings for the Drill Down feature.
DrillDownOptions.UseMouse Gets or sets the value that specifies whether an end user can use the mouse to select the point or series to show detail information.
DrillDownOptions.UseKeyboard Gets or sets the value that specifies whether an end user can use the keyboard to drill down in the chart.
ChartControl.DrillDownToArgument Drills down to the passed argument if the actual series template has the DevExpress.XtraCharts.SeriesTemplate.ArgumentDrillTemplate specified.
ChartControl.DrillDownToSeries Drills down to a series with the passed series ID if the actual series template has the DevExpress.XtraCharts.SeriesTemplate.SeriesDrillTemplate specified.
ChartControl.DrillDownToSeriesPoint Drills down to the passed series point if the actual series template has the DevExpress.XtraCharts.SeriesTemplate.SeriesPointDrillTemplate specified.
ChartControl.DrillUp Drills up if the actual series template is not root (SeriesTemplate) template.
BarButtonItem (see BarButtonItem).ItemClick (see BarItem.ItemClick) Occurs when the current item is clicked.
Important

The DrillDownTo... methods do not change the drill down state if:

  • the actual series template does not have the corresponding nested template specified;
  • the data source does not contain a value passed as a method's parameter as an argument field value/series field value/data object.

Expanded How to: Handle And Prevent Drill Down State Change

The Chart Control provides the ChartControl.DrillDownStateChanging event that allows you to check the data level and prevent revealing or concealing the detail level, and the ChartControl.DrillDownStateChanged event that allows you to customize the chart's diagram with respect to the current data level.

The following table contains classes and members that allow you to manage the drill down state change.

Symbol Description
ChartControl.DrillDownStateChanging Occurs before the Chart Control's drill down state is changed.
DrillDownStateChangingEventArgs Provides data for the DevExpress.XtraCharts.ChartControl.DrillDownStateChanging (DevExpress.XtraCharts.Web.WebChartControl.DrillDownStateChanging, or DevExpress.Web.Mvc.ChartControlSettings.DrillDownStateChanging) event.
ChartControl.DrillDownStateChanged Occurs when the Chart Control's drill down state is changed.
DrillDownStateChangedEventArgs Provides data for the DevExpress.XtraCharts.ChartControl.DrillDownStateChanged (DevExpress.XtraCharts.Web.WebChartControl.DrillDownStateChanged, or DevExpress.Web.Mvc.ChartControlSettings.DrillDownStateChanged) event.

Is this topic helpful?​​​​​​​