All docs
V18.2
19.1 (preview)
18.2
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

ScatterChartItem Class

A Scatter Chart dashboard item that visualizes relationships between numerical variables.

Declaration

export class ScatterChartItem extends DataDashboardItem

Remarks

The Scatter Chart dashboard item provides the capability to visualize relationships between numerical variables.

wdd-dashboard-items-scatter-chart

The following documentation is available: Web Dashboard - Creating a Scatter Chart.

Examples

The following example shows how to create the Scatter Chart dashboard item, bind it to data and add to the existing dashboard.

Create data items (measures and dimensions) and use the DataItem.dataMember property to bind them to the existing data source's columns. Then use the created measures and dimensions in the dashboard item to bind it to data.

After you add the created dashboard item to the Dashboard.items collection, call the Dashboard.rebuildLayout method to rebuild the dashboard layout and display changes.

// Use the line below for a modular approach:
// import * as Model from 'devexpress-dashboard/model'
// Use the line below for an approach with global namespaces:
// var Model = DevExpress.Dashboard.Model;

// ...
public createScatterChartItem() { 
    // Create data items for the Scatter Chart dashboard item.
    var scatterChartCategoryName = new Model.Dimension();
    scatterChartCategoryName.dataMember("CategoryName");
    var scatterChartProductName = new Model.Dimension();
    scatterChartProductName.dataMember("ProductName");
    var scatterChartUnitPrice = new Model.Measure();
    scatterChartUnitPrice.dataMember("UnitPrice");
    var scatterChartExtendedPrice = new Model.Measure();
    scatterChartExtendedPrice.dataMember("ExtendedPrice");
    var scatterChartQuantity = new Model.Measure();
    scatterChartQuantity.dataMember("Quantity");

    // Create the Scatter Chart dashboard item and bind it to data.
    var scatterChartItem = new Model.ScatterChartItem();
    scatterChartItem.name('scatterChart');
    scatterChartItem.dataSource(sqlDataSource.componentName());
    scatterChartItem.dataMember(sqlDataSource.queries()[0].name());

    scatterChartItem.arguments.push(scatterChartCategoryName, scatterChartProductName);
    scatterChartItem.weight(scatterChartUnitPrice);
    scatterChartItem.axisXMeasure(scatterChartQuantity);
    scatterChartItem.axisYMeasure(scatterChartExtendedPrice);

    scatterChartItem.interactivityOptions.isDrillDownEnabled(true);

    control.dashboard().items.push(scatterChartItem);
    // ...
    control.dashboard().rebuildLayout();
}

Inheritance

DataDashboardItem
ScatterChartItem

constructor

Initializes a new instance of the ScatterChartItem class.

Declaration

constructor(modelJson?: any, serializer?: DxDesigner.Analytics.Utils.ModelSerializer)

Parameters

Type Name Description
any modelJson

A JSON object used for a dashboard deserialization. Do not pass this parameter directly.

DxDesigner.Analytics.Utils.ModelSerializer serializer

An object used for a dashboard deserialization. Do not pass this parameter directly.

Properties

arguments Property

Declaration

arguments: KnockoutObservableArray<Dimension>

Property Value

Type Description
KnockoutObservableArray<Dimension>

axisX Property

Declaration

axisX: ChartAxisY

Property Value

Type Description
ChartAxisY

axisXMeasure Property

Declaration

axisXMeasure: KnockoutObservable<Measure>

Property Value

Type Description
KnockoutObservable<Measure>

axisY Property

Declaration

axisY: ChartAxisY

Property Value

Type Description
ChartAxisY

axisYMeasure Property

Declaration

axisYMeasure: KnockoutObservable<Measure>

Property Value

Type Description
KnockoutObservable<Measure>

interactivityOptions Property

Declaration

interactivityOptions: DashboardItemInteractivityOptions

Property Value

Type Description
DashboardItemInteractivityOptions

legend Property

Declaration

legend: ChartLegend

Property Value

Type Description
ChartLegend

pointLabelOptions Property

Declaration

pointLabelOptions: ScatterPointLabelOptions

Property Value

Type Description
ScatterPointLabelOptions

rotated Property

Declaration

rotated: KnockoutObservable<boolean>

Property Value

Type Description
KnockoutObservable<boolean>

weight Property

Declaration

weight: KnockoutObservable<Measure>

Property Value

Type Description
KnockoutObservable<Measure>

Methods

getInfo Method

For internal use.

Declaration

getInfo(): DxDesigner.Analytics.Utils.ISerializationsInfo

Returns

Type Description
DxDesigner.Analytics.Utils.ISerializationsInfo