ChartDataSourceAdapter.ItemIdDataMember Property
Gets or sets the name of the data field that contains the ID values of chart items.
Namespace: DevExpress.Xpf.Map
Assembly: DevExpress.Xpf.Map.v19.2.dll
Declaration
Property Value
Type | Description |
---|---|
String | A String value that specifies the data field name. |
Example
The ChartDataSourceAdapter class contains the following parameters that can be customized.
- ChartDataSourceAdapter.ItemMinSize - allows specifying an items’ minimum size;
- ChartDataSourceAdapter.ItemMaxSize - allows specifying an items’ maximum size;
- ChartDataSourceAdapter.MeasureRules - allows specifying measure rules used to calculate the size of chart items;
- ChartDataSourceAdapter.SummaryFunction - allows specifying the type of a summary function used to estimate the value of chart items.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-customize-chart-data-source-adapter-parameters-t209508.
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:dxm="http://schemas.devexpress.com/winfx/2008/xaml/map"
x:Class="BubbleChartDataAdapter.MainWindow"
Title="MainWindow" Height="480" Width="640">
<Window.Resources>
<ObjectDataProvider x:Key="SummaryFunctions"
ObjectType="{x:Type sys:Enum}" MethodName="GetValues">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="dxm:SummaryFunction"/>
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
<XmlDataProvider x:Key="dataSet" Source="SummaryExample.xml" XPath="/dataSet" />
</Window.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<dxm:MapControl Grid.Column="0">
<dxm:VectorLayer ToolTipEnabled="True"
ToolTipPattern="Summary Function Result: %V%">
<dxm:BubbleChartDataAdapter
x:Name="adapter" ItemMinSize="10" ItemMaxSize="60"
DataSource="{Binding Source={StaticResource dataSet}, XPath=data}"
SummaryFunction="{Binding ElementName=lbSummaryFunction, Path=SelectedValue}" ItemIdDataMember="id">
<dxm:BubbleChartDataAdapter.Mappings>
<dxm:MapBubbleMappingInfo Latitude="lat" Longitude="lon" Value="value"/>
</dxm:BubbleChartDataAdapter.Mappings>
<dxm:BubbleChartDataAdapter.MeasureRules>
<dxm:MeasureRules RangeStops="1 2 3 4 5 6 7 8 9 10"/>
</dxm:BubbleChartDataAdapter.MeasureRules>
</dxm:BubbleChartDataAdapter>
</dxm:VectorLayer>
</dxm:MapControl>
<StackPanel Grid.Column="1" >
<Label>Summary Function:</Label>
<ListBox x:Name="lbSummaryFunction" Margin="4" SelectedIndex="0"
ItemsSource="{Binding Source={StaticResource SummaryFunctions}}"/>
</StackPanel>
</Grid>
</Window>
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the ItemIdDataMember property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.