0
Answer

Binding chart to xml xpath in wpf

Ask a question

Hi Friends.
I m using Chart in Flow Document.The Flow document is bound to xml with help of
 
 
XmlDataProvider
Now the issue is.How can i bind chart to the xpath;
I tried like this.But this is not working.pls help me on the same.
 
 

<
XmlDataProvider x:Key="ProductData" Source="test.xml" XPath="main/test"/>

<charting:Chart.DataContext>
<Binding Source="{StaticResource ProductData}" /> 
</charting:Chart.DataContext>
<charting:LineSeries.DependentRangeAxis>
<charting:LinearAxis
DependentValueBinding="{Binding XPath=VALUE}">
IndependentValueBinding="{Binding XPath=KEY}"
<charting:LineSeries x:Name="dds" Title="" ItemsSource="{Binding XPath=CHARTDATAS/CHARTS/CHART2/CHARTS/CHART}"
<charting:Chart Padding="5,5,5,60" Title="dfgf" Canvas.Top="80" Canvas.Left="10" Name="mcChart" Width="1000" Height="600" Background="LightSteelBlue">