Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

BubbleChartDataAdapter.MarkerType Property

Gets or sets a value specifying the appearance of bubble markers.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v24.2.dll

NuGet Package: DevExpress.Win.Map

#Declaration

[DefaultValue(MarkerType.Default)]
public MarkerType MarkerType { get; set; }

#Property Value

Type Default Description
MarkerType Default

A MarkerType enumeration value.

Available values:

Show 13 items
Name Description
Default

The default marker type.

Square

A marker is drawn as a square.

MarkerType_Square

Diamond

A marker is drawn as a diamond.

MarkerType_Diamond

Triangle

A marker is drawn as a triangle.

MarkerType_Triangle

InvertedTriangle

A marker is drawn as an inverted triangle.

MarkerType_InvertedTriangle

Circle

A marker is drawn as a circle.

MarkerType_Circle

Plus

A marker is drawn as a plus sign.

MarkerType_Plus

Cross

A marker is drawn as a cross.

MarkerType_Cross

Star5

A marker is drawn as a five pointed star.

MarkerType_Star5

Star6

A marker is drawn as a six pointed star.

MarkerType_Star6

Star8

A marker is drawn as an eight pointed star.

MarkerType_Star8

Pentagon

A marker is drawn as a pentagon.

MarkerType_Pentagon

Hexagon

A marker is drawn as a hexagon.

MarkerType_Hexagon

#Example

This example demonstrates how to generate bubble charts for a map control. Do the following:

    // 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;
}
See Also