BubbleMapItem Class

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

Declaration

export class BubbleMapItem extends GeoPointMapItemBase

Remarks

The Bubble Map dashboard item allows you to place bubbles on the map using geographical coordinates. Each bubble can represent data via its weight and color.

wdd-dashboard-items-bubble-map

See the Web Dashboard - Creating Geo Point Maps topic to learn more about the Bubble Map item.

Examples

The following example shows how to create the Bubble 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 createBubbleMapItem() { 
    // Create data items for the BubbleMap dashboard item.
    var bubbleMapImport = new Model.Measure();
    bubbleMapImport.dataMember("Import");
    var bubbleMapLatitude = new Model.Dimension();
    bubbleMapLatitude.dataMember("Latitude");
    var bubbleMapLongitude = new Model.Dimension();
    bubbleMapLongitude.dataMember("Longitude");
    var bubbleMapProduction = new Model.Measure();
    bubbleMapProduction.dataMember("Production");

    // Create the Bubble Map dashboard item and bind it to data.
    var bubbleMapItem = new Model.BubbleMapItem();    
    bubbleMapItem.name('bubbleMap');
    bubbleMapItem.dataSource(excelDataSource.componentName());

    bubbleMapItem.latitude(bubbleMapLatitude);
    bubbleMapItem.longitude(bubbleMapLongitude);
    bubbleMapItem.area("Europe");
    bubbleMapItem.weight(bubbleMapImport);
    bubbleMapItem.color(bubbleMapProduction);

    control.dashboard().items.push(bubbleMapItem);
    // ...
    control.dashboard().rebuildLayout();
}
See Also

constructor

For internal use.

Declaration

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

Optional Parameters

Name Type Default Description
modelJson any null

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

serializer ModelSerializer null

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

Properties

color Property

Declaration

color: ko.Observable<Measure>

Property Value

Type Description
ko.Observable<Measure>

legend Property

Declaration

legend: MapLegend

Property Value

Type Description
MapLegend

weight Property

Declaration

weight: ko.Observable<Measure>

Property Value

Type Description
ko.Observable<Measure>

weightedLegend Property

Declaration

weightedLegend: WeightedLegend

Property Value

Type Description
WeightedLegend

Methods

getInfo Method

For internal use.

Declaration

getInfo(): DevExpress.Analytics.Utils.ISerializationInfoArray

Returns

Type Description
ISerializationInfoArray

An array of objects that provide serialization info.