dashboard-devexpress-dot-dashboardwin-dot-dashboarditemcontroleventargs-4b901772.md
Gets an underlying chart control.
Namespace : DevExpress.DashboardWin
Assembly : DevExpress.Dashboard.v25.2.Win.dll
NuGet Package : DevExpress.Win.Dashboard
public ChartControl ChartControl { get; }
Public ReadOnly Property ChartControl As ChartControl
| Type | Description |
|---|---|
| ChartControl |
A ChartControl object that is the chart control.
|
Use the ChartControl property to access a chart control corresponding to a ChartDashboardItem, PieDashboardItem or ScatterChartDashboardItem.
The following code snippets (auto-collected from DevExpress Examples) contain references to the ChartControl 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.
void Designer_DashboardItemControlUpdated(object sender, DashboardItemControlEventArgs e) {
if(e.ChartControl != null)
UpdateChartScaleBreaks(designer.Dashboard.Items[e.DashboardItemName], e.ChartControl.Diagram);
winforms-dashboard-access-api-of-underlying-controls/CS/Dashboard_ControlAccess/Form1.cs#L35
if (e.DashboardItemName == "chartDashboardItem1") {
ChartControl chartControl = e.ChartControl;
((XYDiagram)chartControl.Diagram).Panes[0].BackColor = Color.Orange;
how-to-display-the-total-value-above-each-pie-chart/CS/TotalsInChartsExample/Form1.cs#L20
var viewer = (DashboardViewer)sender;
var chart = e.ChartControl;
dashboard-constant-lines/CS/ConstantLineExtension.Win/ConstantLineModule.cs#L64
ChartDashboardItem chartItem = dashboardControl.Dashboard.Items[e.DashboardItemName] as ChartDashboardItem;
if (e.ChartControl != null && chartItem != null) {
AddConstantLinesToDiagram(e.ChartControl.Diagram as XYDiagram, chartItem);
Private Sub Designer_DashboardItemControlUpdated(ByVal sender As Object, ByVal e As DashboardItemControlEventArgs)
If e.ChartControl IsNot Nothing Then
UpdateChartScaleBreaks(designer.Dashboard.Items(e.DashboardItemName), e.ChartControl.Diagram)
winforms-dashboard-access-api-of-underlying-controls/VB/Dashboard_ControlAccess/Form1.vb#L36
If e.DashboardItemName = "chartDashboardItem1" Then
Dim chartControl As ChartControl = e.ChartControl
CType(chartControl.Diagram, XYDiagram).Panes(0).BackColor = Color.Orange
how-to-display-the-total-value-above-each-pie-chart/VB/TotalsInChartsExample/Form1.vb#L20
Dim viewer = DirectCast(sender, DashboardViewer)
Dim chart = e.ChartControl
See Also
DashboardItemControlEventArgs Class