dashboard-devexpress-dot-dashboardcommon-e8ed55d4.md
A Scatter Chart dashboard item that visualizes relationships between numerical variables.
Namespace : DevExpress.DashboardCommon
Assembly : DevExpress.Dashboard.v25.2.Core.dll
NuGet Package : DevExpress.Dashboard.Core
public class ScatterChartDashboardItem :
DataDashboardItem,
IChartModel
Public Class ScatterChartDashboardItem
Inherits DataDashboardItem
Implements IChartModel
The Scatter Chart dashboard item provides the capability to visualize relationships between numerical variables.
The following documentation is available.
The following code snippet shows how to bind a Scatter Chart dashboard item to data in code.
using System;
using DevExpress.DashboardCommon;
namespace Dashboard_CreateScatterChart {
public partial class Form1 : DevExpress.XtraEditors.XtraForm {
public Form1() {
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e) {
Dashboard dashboard = new Dashboard();
// Create an OLAP dashboard data source with the connection string
// stored in the app.config file.
DashboardOlapDataSource olapDataSource = new DashboardOlapDataSource();
olapDataSource.ConnectionName = "AdventureWorksString";
dashboard.DataSources.Add(olapDataSource);
// Create a scatter chart and binds it to data.
ScatterChartDashboardItem scatterChart = new ScatterChartDashboardItem();
scatterChart.DataSource = olapDataSource;
scatterChart.AxisXMeasure = new Measure("[Measures].[Sales Amount]");
scatterChart.AxisYMeasure = new Measure("[Measures].[Gross Profit Margin]");
scatterChart.Arguments.Add(new Dimension("[Product].[Category].[Category]"));
scatterChart.Weight = new Measure("[Measures].[Gross Profit]");
// Add the scatter chart to the dashboard and
// display the dashboard in the Dashboard Viewer.
dashboard.Items.Add(scatterChart);
dashboardViewer1.Dashboard = dashboard;
}
}
}
Imports System
Imports DevExpress.DashboardCommon
Namespace Dashboard_CreateScatterChart
Partial Public Class Form1
Inherits DevExpress.XtraEditors.XtraForm
Public Sub New()
InitializeComponent()
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
Dim dashboard As New Dashboard()
' Create an OLAP dashboard data source with the connection string
' stored in the app.config file.
Dim olapDataSource As New DashboardOlapDataSource()
olapDataSource.ConnectionName = "AdventureWorksString"
dashboard.DataSources.Add(olapDataSource)
' Create a scatter chart and binds it to data.
Dim scatterChart As New ScatterChartDashboardItem()
scatterChart.DataSource = olapDataSource
scatterChart.AxisXMeasure = New Measure("[Measures].[Sales Amount]")
scatterChart.AxisYMeasure = New Measure("[Measures].[Gross Profit Margin]")
scatterChart.Arguments.Add(New Dimension("[Product].[Category].[Category]"))
scatterChart.Weight = New Measure("[Measures].[Gross Profit]")
' Add the scatter chart to the dashboard and
' display the dashboard in the Dashboard Viewer.
dashboard.Items.Add(scatterChart)
dashboardViewer1.Dashboard = dashboard
End Sub
End Class
End Namespace
Object DashboardItem DataDashboardItem ScatterChartDashboardItem
See Also