The requested page is not available for the requested platform. You are viewing the content for Default platform.
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.

PieMapItem Class

A Pie Map dashboard item that allows you to place pies on the map using geographical coordinates.

Declaration

export class PieMapItem extends GeoPointMapItemBase

Remarks

The Pie Map dashboard item allows you to place pies on the map using geographical coordinates. Each pie visualizes the contribution of each value to the total.

wdd-dashboard-items-pie-map

The following documentation is available: Web Dashboard - Creating Geo Point Maps.

Examples

  • The following example shows how to create the Pie Map 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 createPieMapItem() { 
    // Create data items for the PieMap dashboard item.
    var pieMapEnergyType = new Model.Dimension();
    pieMapEnergyType.dataMember("EnergyType");
    var pieMapImport = new Model.Measure();
    pieMapImport.dataMember("Import");
    var pieMapLatitude = new Model.Dimension();
    pieMapLatitude.dataMember("Latitude");
    var pieMapLongitude = new Model.Dimension();
    pieMapLongitude.dataMember("Longitude");
    var pieMapProduction = new Model.Measure();
    pieMapProduction.dataMember("Production");


    // Create the PieMap dashboard item and bind it to data.
    var pieMapItem = new Model.PieMapItem();    
    pieMapItem.name('pieMap');
    pieMapItem.dataSource(excelDataSource.componentName());

    pieMapItem.latitude(pieMapLatitude);
    pieMapItem.longitude(pieMapLongitude);
    pieMapItem.area("Europe");

    pieMapItem.argument(pieMapEnergyType);
    pieMapItem.values.push(pieMapProduction);

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

Inheritance

See Also

constructor

Initializes a new instance of the PieMapItem class.

Declaration

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

Optional Parameters

Type Name Default Description
any modelJson null

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

DxDesigner.Analytics.Utils.ModelSerializer serializer null

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

Properties

argument Property

Declaration

argument: KnockoutObservable<Dimension>

Property Value

Type Description
KnockoutObservable<Dimension>

isWeighted Property

Declaration

isWeighted: KnockoutObservable<boolean>

Property Value

Type Description
KnockoutObservable<boolean>

legend Property

Declaration

legend: MapLegend

Property Value

Type Description
MapLegend

values Property

Declaration

values: KnockoutObservableArray<Measure>

Property Value

Type Description
KnockoutObservableArray<Measure>

weightedLegend Property

Declaration

weightedLegend: WeightedLegend

Property Value

Type Description
WeightedLegend

Methods

getInfo Method

For internal use.

Declaration

getInfo(): DxDesigner.Analytics.Utils.ISerializationsInfo

Returns

Type Description
DxDesigner.Analytics.Utils.ISerializationsInfo