Back to Devexpress

BubbleMapItem Class

dashboard-js-devexpress-dot-dashboard-dot-model-5759d03b.md

latest9.4 KB
Original Source

BubbleMapItem Class

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

Declaration

ts
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.

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.

javascript
// 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();
}

Inherited Members

area

colorScheme

coloringOptions

componentName

customProperties

customShapefile

dataItems

dataMember

dataSource

disposed

enableClustering

filterString

formatRules

hiddenDimensions

hiddenMeasures

interactivityOptions

isDisposed

isMasterFilterCrossDataSource

itemType

latitude

lockNavigation

longitude

name

parentContainer

shapeTitleAttributeName

showCaption

tooltipDimensions

tooltipMeasures

viewport

visibleDataFilterString

dispose

getInfo

getUniqueNamePrefix

Inheritance

SerializableModel TypedSerializableModel DashboardItem DataDashboardItem MapItem GeoPointMapItemBase BubbleMapItem

See Also

Geo Point Maps

constructor

For internal use.

Declaration

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

Parameters

NameTypeDescription
modelJsonany

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

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

Property Value

Type
Observable<Measure>

legend Property

Declaration

ts
legend: DevExpress.Dashboard.Model.MapLegend

Property Value

Type
MapLegend

weight Property

Declaration

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

Property Value

Type
Observable<Measure>

weightedLegend Property

Declaration

ts
weightedLegend: DevExpress.Dashboard.Model.WeightedLegend

Property Value

Type
WeightedLegend