BubbleChartDataAdapter.MarkerType Property
Gets or sets a value specifying the appearance of bubble markers.
Namespace: DevExpress.XtraMap
Assembly: DevExpress.XtraMap.v25.1.dll
NuGet Package: DevExpress.Win.Map
Declaration
Property Value
| Type | Default | Description |
|---|---|---|
| MarkerType | Default | A MarkerType enumeration value. |
Available values:
| Name | Description |
|---|---|
| Default | The default marker type. |
| Square | A marker is drawn as a square.
|
| Diamond | A marker is drawn as a diamond.
|
| Triangle | A marker is drawn as a triangle.
|
| InvertedTriangle | A marker is drawn as an inverted triangle.
|
| Circle | A marker is drawn as a circle.
|
| Plus | A marker is drawn as a plus sign.
|
| Cross | A marker is drawn as a cross.
|
| Star5 | A marker is drawn as a five pointed star.
|
| Star6 | A marker is drawn as a six pointed star.
|
| Star8 | A marker is drawn as an eight pointed star.
|
| Pentagon | A marker is drawn as a pentagon.
|
| Hexagon | A marker is drawn as a hexagon.
|
Example
This example demonstrates how to generate bubble charts for a map control. Do the following:
- Create a VectorItemsLayer object and add it to the map control.
- Create a BubbleChartDataAdapter object and assign it to the VectorItemsLayer.Data property.
- Generate a data source with data for bubble charts and assign it to the DataSourceAdapterBase.DataSource property.
- Specify the mappings for bubble chart properties to corresponding columns in a datasource (a MapBubbleMappingInfo object that can be accessed using the BubbleChartDataAdapter.Mappings property).
- Specify the attribute mappings that are used to provide additional information about the map item to a map control.(an MapItemAttributeCollection object that can be accessed using the BubbleChartDataAdapter.Mappings property).
// Specify data for the bubble layer.
BubbleLayer.Data = CreateData();
private IMapDataAdapter CreateData() {
BubbleChartDataAdapter adapter = new BubbleChartDataAdapter() {
DataSource = LoadData(),
MeasureRules = CreateMeasureRules(),
ItemMaxSize = 60,
ItemMinSize = 10
};
#region #Mappings
// Map the properties of chart items to the appropriate fields in the data source.
adapter.Mappings.Latitude = "glat";
adapter.Mappings.Longitude = "glon";
adapter.Mappings.Value = "mag";
#endregion #Mappings
// Create attribute mappings to provide additional information about map items to the map.
adapter.AttributeMappings.Add(new MapItemAttributeMapping("Magnitude", "mag"));
adapter.AttributeMappings.Add(new MapItemAttributeMapping("Year", "yr"));
adapter.AttributeMappings.Add(new MapItemAttributeMapping("Month", "mon"));
adapter.AttributeMappings.Add(new MapItemAttributeMapping("Day", "day"));
adapter.AttributeMappings.Add(new MapItemAttributeMapping("Depth", "dep"));
return adapter;
}
private DataTable LoadData() {
DataSet ds = new DataSet();
ds.ReadXml(dataPath);
DataTable dt = ds.Tables[0];
dt.DefaultView.RowFilter = string.Format(CultureInfo.InvariantCulture, "(mag >= {0}) AND (mag <= {1})", minMagnitude, maxMagnitude);
return ds.Tables[0];
}
private MeasureRules CreateMeasureRules() {
MeasureRules measureRules = new MeasureRules();
measureRules.ApproximateValues = true;
measureRules.RangeDistribution = new LinearRangeDistribution();
for (int i = minMagnitude; i < maxMagnitude; i++) {
measureRules.RangeStops.Add(i);
}
return measureRules;
}











