I work on that problem from one day, I use a XCeed chart in WPF,like this :
<xceedTk:Chart Name="graphComptage" VerticalAlignment="Top" MinWidth="400" MinHeight="400" Height="Auto" Width="Auto" IsEnabled="True"
BorderThickness="0" Background="Transparent" BorderBrush="Transparent" DataContext="{Binding}"
Visibility="{Binding AfficherErreur, Converter={conv:BoolConverter TrueValue=Collapsed, FalseValue=Visible}}">
<xceedTk:Chart.Legend>
<xceedTk:Legend Title="{Binding TitreLegende}" Width="{Binding LargeurLegende}" Height="Auto" BorderThickness="0" />
</xceedTk:Chart.Legend>
<xceedTk:Chart.Areas>
<xceedTk:Area Title="{Binding TitreLegende}">
<xceedTk:Axis Orientation="Vertical" Margin="0 0 5 0" ShowGridLines="True" GraduationMode="Automatic" LabelsType="DateTime" />
<xceedTk:Axis Orientation="Horizontal" Margin="0 0 5 0" ShowGridLines="True" GraduationMode="Automatic" LabelsType="Numeric" />
<xceedTk:Area.Series>
<xceedTk:Series DataPointsSource="{Binding DataContext.SeriesPoints, ElementName=ucVueTabulaireGraphique}">
<xceedTk:Series.Layout>
<xceedTk:LineLayout />
</xceedTk:Series.Layout>
<xceedTk:Series.DataPointBindings>
<xceedTk:BindingInfo PropertyName="Y">
<xceedTk:BindingInfo.Binding>
<Binding Path="Value"/>
</xceedTk:BindingInfo.Binding>
</xceedTk:BindingInfo>
<xceedTk:BindingInfo PropertyName="X">
<xceedTk:BindingInfo.Binding>
<Binding Path="Key"/>
</xceedTk:BindingInfo.Binding>
</xceedTk:BindingInfo>
</xceedTk:Series.DataPointBindings>
</xceedTk:Series>
</xceedTk:Area.Series>
</xceedTk:Area>
</xceedTk:Chart.Areas>
</xceedTk:Chart>
I want to bind this on a dictionary in my ViewModel, when I check in the output window, I have in all time a similar message :
System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=DataContext.SeriesPoints; DataItem=null; target element is 'Series' (HashCode=49725882); target property is 'DataPointsSource' (type 'IEnumerable')
It seems that I cannot access at the public property in the view Model, I tried various manner to bind to my ViewModel properties, (FindAncestor, directly), but I always have the same result.
Does somebody stil have an idea?