-
Data Grids / Data Management
-
Data Grid
- Overview
-
Data Binding
-
Filtering
- Sorting
-
Editing
-
Grouping
-
Selection
- Focused Row
- Paging
-
Scrolling
-
Columns
-
Master-Detail
-
Data Summaries
-
Drag & Drop
-
Export to PDF
-
Export to Excel
- Appearance
-
Customization
- State Persistence
-
Adaptability
-
Keyboard Navigation
- Right-To-Left Support
-
Tree List
- Overview
-
Data Binding
-
Filtering
- Sorting
-
Editing
-
Selection
- Focused Row
- Paging
-
Columns
- Drag & Drop
- State Persistence
- Adaptability
-
Keyboard Navigation
-
Card View
-
Pivot Grid
- Overview
-
Data Binding
-
Field Management
-
Data Summaries
- Drill Down
- Filtering
-
Scrolling
-
Export to Excel
- Chart Integration
- Customization
- State Persistence
-
Filter Builder
-
-
Data Visualization
-
Charts
- Overview
-
Data Binding
-
Common Concepts
-
Axis
-
Aggregation
-
Tooltips
-
Selection
-
Customization
-
Zooming
-
Export
-
-
Area Charts
-
Bar Charts
- Bullet Charts
-
Doughnut Charts
-
Financial Charts
-
Funnel and Pyramid Charts
-
Line Charts
- Pareto Chart
-
Pie Charts
-
Point Charts
-
Polar and Radar Charts
-
Range Charts
- Sankey Chart
-
Sparkline Charts
-
Tree Map
-
Gauges
- Overview
-
Runtime update
-
Bar Gauge
-
Circular Gauge
-
Linear Gauge
-
Diagram
- Overview
-
Data Binding
-
Featured Shapes
-
Custom Shapes
-
Document Capabilities
-
User Interaction
- UI Customization
- Adaptability
-
-
Scheduling / Planning
-
Scheduler
- Overview
-
Data Binding
-
Views
-
Appointments
-
Timetable
- Editing
-
Grouping
- Virtual Scrolling
- Drag & Drop
-
Customization
- Adaptability
-
Gantt
- Overview
- Data Binding
-
Filtering
- Sorting
- Strip Lines
- Export to PDF
- Validation
-
Customization
-
-
Reporting
-
AI-powered Extensions
-
Interaction
-
Report Types
-
Data binding
-
Real-life Reports
-
Layout Features
-
Report Controls
-
Web-specific Features
-
-
Rich Text Editor
- Overview
- Load/Save
- Document Protection
-
Templates
- Autocorrect
-
Customization
- Simple View
-
Spreadsheet
- Overview
-
Open a Document
- Export And Printing
-
Features
-
UI Customization
-
Messaging
-
WYSIWYG Editor
-
Forms
-
Data Editors
- Overview
-
Common Concepts
-
Calendar
- Check Box
- Color Box
- Date Box
-
Date Range Box
-
Number Box
- Radio Group
-
Range Selector
- Range Slider
- Slider
- Switch
- Text Area
- Text Box
-
Drop-Downs
- Autocomplete
-
Drop Down Box
-
Select Box
-
Tag Box
-
Lookup
-
Buttons
-
File Upload / File Management
-
File Manager
- Overview
-
File System Types
-
Customization
-
File Uploader
-
-
Popup and Notifications
-
Navigation
- Overview
- Accordion
-
Context Menu
-
Menu
- Multi View
-
Drawer
-
Tab Panel
-
Tabs
-
Toolbar
-
Stepper
- Pagination
-
List
-
Tree View
- Right-to-Left Support
-
Layout
-
Tile View
- Splitter
-
Gallery
- Scroll View
-
-
Interactive Wrappers
-
Sortable
- Resizable
-
-
Progress Indicators
-
Maps
- Overview
-
Map
-
Vector Map
-
Data Binding
- Multiple Layers
-
Markers
- Legend
-
Zooming and Panning
-
Customization
-
-
Localization
Related Demos:
Your search did not match any results.
Vector Map - Pie Markers
This demo shows how to use markers of the «pie» type in the VectorMap. Values for pie markers are provided by the data field whose name is assigned to the dataField property.
Backend API
@(Html.DevExtreme().VectorMap()
.ID("vector-map")
.Layers(layers => {
layers.Add()
.DataSource(new JS("DevExpress.viz.map.sources.world"))
.HoverEnabled(false);
layers.Add()
.Name("pies")
.DataSource(d => d.StaticJson().Url(Url.Action("GetPieMarkers")))
.DataSourceOptions(dso => dso.Map("vectorMap_piesLayer_dataSource_map"))
.ElementType(VectorMapMarkerType.Pie)
.DataField("values")
.MinSize(20)
.MaxSize(40)
.SizeGroups(new double[] { 0, 8000, 10000, 50000 });
})
.Tooltip(t => t
.Enabled(true)
.CustomizeTooltip("vectorMap_customizeTooltip")
)
.Legends(l => l.Add()
.Source(s => s
.Layer("pies")
.Grouping("color")
)
.CustomizeText("vectorMap_piesLegend_customizeText")
)
.Bounds(new double[] { -180, 85, 180, -60 })
)
<script src="~/data/names.js"></script>
<script>
function vectorMap_piesLayer_dataSource_map(item) {
item.features=$.map(item.features,
function(data) {
var list = ["<span class='country'>" + data.country + "</span>", " "];
$.each(data.values, function(i, value) {
if (value > 0) {
list.push(names[i] + ": " + value + "%");
}
});
return {
type: "Feature",
geometry: {
type: "Point",
coordinates: data.coordinates
},
properties: {
tooltip: list.join("\n"),
values: data.values
}
};
}
);
return item;
}
function vectorMap_customizeTooltip(arg) {
if(arg.layer.type === "marker") {
return { text: arg.attribute("tooltip") };
}
}
function vectorMap_piesLegend_customizeText(arg) {
return names[arg.index];
}
</script>
using Microsoft.AspNetCore.Mvc;
using DevExtreme.NETCore.Demos.Models.SampleData;
namespace DevExtreme.NETCore.Demos.Controllers {
public class VectorMapController : Controller {
public ActionResult PieMarkers() {
return View();
}
[HttpGet]
public object GetPieMarkers() {
return SampleData.PieMarkersData;
}
}
}
var names = ["Christian", "Muslim", "Unaffiliated", "Buddhist", "Jewish"];
using System.Collections.Generic;
namespace DevExtreme.NETCore.Demos.Models.SampleData {
public partial class SampleData {
public static readonly IEnumerable<object> PieMarkersData = new[] {
new {
type = "FeatureCollection",
features = new[] {
new {
coordinates = new[] { 34.6, -5.1 },
values = new[] { 61.4, 35.2, 1.4, 0, 0 },
country = "Tanzania"
},
new {
coordinates = new[] { 18.8, 15 },
values = new[] { 40.6, 55.3, 2.5, 0, 0 },
country = "Chad"
},
new {
coordinates = new[] { 7.36, 9.97 },
values = new[] { 49.3, 48.8, 0.4, 0, 0 },
country = "Nigeria"
},
new {
coordinates = new[] { 135.61, -24.57 },
values = new[] { 67.3, 2.4, 24.2, 2.7, 0.5 },
country = "Australia"
},
new {
coordinates = new[] { 103.3, 34.85 },
values = new[] { 5.1, 1.8, 52.2, 18.2, 0 },
country = "China"
},
new {
coordinates = new[] { 139.5, 37 },
values = new[] { 1.6, 0.2, 57, 36.2, 0 },
country = "Japan"
},
new {
coordinates = new[] { 100.8, 15.9 },
values = new[] { 0.9, 5.5, 0.3, 93.2, 0 },
country = "Thailand"
},
new {
coordinates = new[] { 10.4, 51.4 },
values = new[] { 68.7, 5.8, 24.7, 0.3, 0.3 },
country = "Germany"
},
new {
coordinates = new[] { 100.8, 65.3 },
values = new[] { 73.3, 10, 16.2, 0.1, 0.2 },
country = "Russia"
},
new {
coordinates = new[] { -3.48, 40.36 },
values = new[] { 78.6, 2.1, 19, 0, 0.1 },
country = "Spain"
},
new {
coordinates = new[] { -78.01, 21.72 },
values = new[] { 59.2, 0, 23, 0, 0 },
country = "Cuba"
},
new {
coordinates = new[] { -63.7, -31.92 },
values = new[] { 85.2, 1, 12.2, 0.05, 0.5 },
country = "Argentina"
},
new {
coordinates = new[] { -110.53, 60.78 },
values = new[] { 69, 2.1, 23.7, 0.5, 0.3 },
country = "Canada"
},
new {
coordinates = new[] { -100.1, 40.14 },
values = new[] { 78.3, 0.9, 16.4, 1.2, 1.8 },
country = "United States"
},
new {
coordinates = new[] { 34.88, 31.16 },
values = new[] { 2, 18.6, 3.1, 0.3, 75.6 },
country = "Israel"
}
}
}
};
}
}
#vector-map {
height: 440px;
}
.country {
font-size: 15px;
font-weight: 500;
}