Skip to main content

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.

Example

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
)

Parameters

Name Type Description
modelJson any

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

serializer ModelSerializer

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

Properties

color Property

Declaration

color: ko.Observable<DevExpress.Dashboard.Model.Measure>

Property Value

Type
Observable<Measure>

legend Property

Declaration

legend: DevExpress.Dashboard.Model.MapLegend

Property Value

Type
MapLegend

weight Property

Declaration

weight: ko.Observable<DevExpress.Dashboard.Model.Measure>

Property Value

Type
Observable<Measure>

weightedLegend Property

Declaration

weightedLegend: DevExpress.Dashboard.Model.WeightedLegend

Property Value

Type
WeightedLegend