Back to Devexpress

MeasureRules Class

wpf-devexpress-dot-xpf-dot-map-71d6cc61.md

latest3.9 KB
Original Source

MeasureRules Class

Contains measure rules for vector items.

Namespace : DevExpress.Xpf.Map

Assembly : DevExpress.Xpf.Map.v25.2.dll

NuGet Package : DevExpress.Wpf.Map

Declaration

csharp
public class MeasureRules :
    MapDependencyObject,
    IOwnedElement,
    IWeakEventListener,
    IMeasureRules,
    ILegendDataProvider
vb
Public Class MeasureRules
    Inherits MapDependencyObject
    Implements IOwnedElement,
               IWeakEventListener,
               IMeasureRules,
               ILegendDataProvider

The following members return MeasureRules objects:

Remarks

An instance of the MeasureRules class can be accessed using the ChartDataSourceAdapter.MeasureRules property.

Example

To automatically generate pie chart items from a datasource do the following.

  1. Create a PieChartDataAdapter object and assign it to the VectorLayer.Data property.
  2. Bind a data source to the DataSourceAdapterBase.DataSource property of the object.
  3. Specify mappings to assign data fields to pie segment properties. To do this, specify the MapPointMappingInfoBase.Latitude, MapPointMappingInfoBase.Longitude, MapPieMappingInfo.SegmentValue and MapPieMappingInfo.SegmentId properties of the MapPieMappingInfo object assigned to the PieChartDataAdapter.Mappings property.
  4. Specify the ChartDataSourceAdapter.ItemIdDataMember property to group generated pie segments to pie charts.

View Example

xaml
<dxm:VectorLayer.Data>
    <dxm:PieChartDataAdapter DataSource="{Binding Source={StaticResource dataProvider}, XPath=Table1}" 
                             ItemIdDataMember="Country" ItemMinSize="20" ItemMaxSize="60">
        <dxm:PieChartDataAdapter.MeasureRules>
            <dxm:MeasureRules RangeStops="1 10 20 30 40"/>
        </dxm:PieChartDataAdapter.MeasureRules>
        <dxm:PieChartDataAdapter.AttributeMappings>
            <dxm:MapItemAttributeMapping Member="Name" Name="Name"/>
        </dxm:PieChartDataAdapter.AttributeMappings>
        <dxm:PieChartDataAdapter.Mappings>
            <dxm:MapPieMappingInfo Latitude="CapitalLat" Longitude="CapitalLon" 
                                   SegmentId="MedalClass" SegmentValue="Quantity"/>
        </dxm:PieChartDataAdapter.Mappings>
    </dxm:PieChartDataAdapter>
</dxm:VectorLayer.Data>

Inheritance

Object DispatcherObject DependencyObject Freezable MapDependencyObject MeasureRules

See Also

MeasureRules Members

DevExpress.Xpf.Map Namespace