Back to Devexpress

DashboardItemControlEventArgs.ChartControl Property

dashboard-devexpress-dot-dashboardwin-dot-dashboarditemcontroleventargs-4b901772.md

latest5.3 KB
Original Source

DashboardItemControlEventArgs.ChartControl Property

Gets an underlying chart control.

Namespace : DevExpress.DashboardWin

Assembly : DevExpress.Dashboard.v25.2.Win.dll

NuGet Package : DevExpress.Win.Dashboard

Declaration

csharp
public ChartControl ChartControl { get; }
vb
Public ReadOnly Property ChartControl As ChartControl

Property Value

TypeDescription
ChartControl

A ChartControl object that is the chart control.

|

Remarks

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.

winforms-dashboard-custom-properties/CS/WinForms-Dashboard-Custom-Properties/Modules/ChartScaleBreakModule.cs#L69

csharp
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

csharp
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

csharp
var viewer = (DashboardViewer)sender;
var chart = e.ChartControl;

dashboard-constant-lines/CS/ConstantLineExtension.Win/ConstantLineModule.cs#L64

csharp
ChartDashboardItem chartItem = dashboardControl.Dashboard.Items[e.DashboardItemName] as ChartDashboardItem;
if (e.ChartControl != null && chartItem != null) {
    AddConstantLinesToDiagram(e.ChartControl.Diagram as XYDiagram, chartItem);

winforms-dashboard-custom-properties/VB/WinForms-Dashboard-Custom-Properties/Modules/ChartScaleBreakModule.vb#L71

vb
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

vb
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

vb
Dim viewer = DirectCast(sender, DashboardViewer)
Dim chart = e.ChartControl

See Also

DashboardItemControlEventArgs Class

DashboardItemControlEventArgs Members

DevExpress.DashboardWin Namespace