dashboard-js-devexpress-dot-dashboard-dot-model-0ce5f4dc.md
A Pie Map dashboard item that allows you to place pies on the map using geographical coordinates.
export class PieMapItem extends GeoPointMapItemBase
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.
The following documentation is available: Web Dashboard - Creating Geo Point Maps.
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();
}
SerializableModel TypedSerializableModel DashboardItem DataDashboardItem MapItem GeoPointMapItemBase PieMapItem
See Also
Initializes a new instance of the PieMapItem class.
constructor(
modelJson?: any,
serializer?: DevExpress.Analytics.Utils.ModelSerializer
)
| 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.
|
argument: ko.Observable<DevExpress.Dashboard.Model.Dimension>
| Type |
|---|
| Observable<Dimension> |
isWeighted: ko.Observable<boolean>
| Type |
|---|
| Observable<boolean> |
legend: DevExpress.Dashboard.Model.MapLegend
| Type |
|---|
| MapLegend |
values: ko.ObservableArray<DevExpress.Dashboard.Model.Measure>
| Type |
|---|
| ObservableArray<Measure> |
weightedLegend: DevExpress.Dashboard.Model.WeightedLegend
| Type |
|---|
| WeightedLegend |