You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
3.9 KiB
83 lines
3.9 KiB
<!--**************************************************************************************
|
|
|
|
Toolkit for WPF
|
|
|
|
Copyright (C) 2007-2025 Xceed Software Inc.
|
|
|
|
This program is provided to you under the terms of the XCEED SOFTWARE, INC.
|
|
COMMUNITY LICENSE AGREEMENT (for non-commercial use) as published at
|
|
https://github.com/xceedsoftware/wpftoolkit/blob/master/license.md
|
|
|
|
For more features, controls, and fast professional support,
|
|
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
|
|
|
|
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
|
|
|
|
************************************************************************************-->
|
|
<local:DemoView x:Class="Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Views.ChartSeriesDataPointsBindingView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer"
|
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
|
xmlns:xctkconv="clr-namespace:Xceed.Wpf.Toolkit.Core.Converters;assembly=Xceed.Wpf.Toolkit"
|
|
xmlns:conv="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart.Converters"
|
|
xmlns:sample="clr-namespace:Xceed.Wpf.Toolkit.LiveExplorer.Samples.Chart"
|
|
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
|
Title="Chart Series DataPoints Binding">
|
|
<local:DemoView.Description>
|
|
<Paragraph FontSize="14" FontFamily="Segoe">
|
|
<Run>The DataPoint objects of a chart's series can be set by binding with the Series.DataPointsSource property. From there, a DataPointBinding can be set on the X, Y, or Label property of a DataPoint.</Run>
|
|
<!--##INCLUDE_OPEN_SOURCE
|
|
<LineBreak />
|
|
<Run>This feature is only available in the "Plus" version.</Run>
|
|
<LineBreak />
|
|
<Hyperlink NavigateUri="https://xceed.com/xceed-toolkit-plus-for-wpf" RequestNavigate="Hyperlink_RequestNavigate">
|
|
Click here for more details about Xced Toolkit Plus for WPF.
|
|
</Hyperlink>
|
|
##END-->
|
|
</Paragraph>
|
|
</local:DemoView.Description>
|
|
|
|
<!--##EXCLUDE_OPEN_SOURCE-->
|
|
<local:DemoView.Resources>
|
|
<sample:Persons x:Key="Persons"/>
|
|
<CollectionViewSource x:Key="PersonCollection" Source="{Binding Source={StaticResource Persons}, Path=PersonList}" />
|
|
</local:DemoView.Resources>
|
|
|
|
<Grid Margin="10">
|
|
<xctk:Chart MinHeight="300" ShowLegend="False">
|
|
<xctk:Chart.Areas>
|
|
<xctk:Area>
|
|
<xctk:Area.XAxis>
|
|
<xctk:Axis Title="Persons" GraduationMode="Manual" LabelsType="Labels"/>
|
|
</xctk:Area.XAxis>
|
|
<xctk:Area.YAxis>
|
|
<xctk:Axis Title="Skill Level" />
|
|
</xctk:Area.YAxis>
|
|
<xctk:Area.Series>
|
|
<xctk:Series DataPointsSource="{Binding Source={StaticResource PersonCollection}}">
|
|
<xctk:Series.DataPointBindings>
|
|
<xctk:BindingInfo PropertyName="Y">
|
|
<xctk:BindingInfo.Binding>
|
|
<Binding Path="Skill"/>
|
|
</xctk:BindingInfo.Binding>
|
|
</xctk:BindingInfo>
|
|
<xctk:BindingInfo PropertyName="Label">
|
|
<xctk:BindingInfo.Binding>
|
|
<Binding Path="Name"/>
|
|
</xctk:BindingInfo.Binding>
|
|
</xctk:BindingInfo>
|
|
</xctk:Series.DataPointBindings>
|
|
</xctk:Series>
|
|
</xctk:Area.Series>
|
|
</xctk:Area>
|
|
</xctk:Chart.Areas>
|
|
</xctk:Chart>
|
|
|
|
</Grid>
|
|
<!--##END-->
|
|
|
|
<!--##INCLUDE_OPEN_SOURCE
|
|
<Image Source="..\OpenSourceImages\ChartSeriesDataPointsBinding.png" Width="600" Height="400"/>
|
|
##END-->
|
|
</local:DemoView>
|
|
|