I am attempting to draw a chart with multiple axes:
<charts:XYChart >
<charts:XYChart.XAxes>
<charts:XYDoubleAxis AreMajorTicksVisible="True" AreMinorTicksVisible="True" TickMajorInterval="10" TickMinorInterval="5" AreLabelsVisible="True" />
</charts:XYChart.XAxes>
<charts:XYChart.YAxes>
<charts:XYDoubleAxis Maximum="4000" Minimum="0" x:Name="FileAxis" Position="NearEdge" Title="Files" AreLabelsVisible="True" AreMajorTicksVisible="True" AreMinorTicksVisible="True" />
<charts:XYDoubleAxis Maximum="4000" Minimum="0" x:Name="EffortAxis" Position="FarEdge" Title="Effort" AreLabelsVisible="True" AreMajorTicksVisible="True" AreMinorTicksVisible="True" />
</charts:XYChart.YAxes>
<charts:LineSeries x:Name="FileSeries" ItemsSource="{Binding Path=CumulativeStages}" XPath="StageNumber" YPath="FileCount"
YAxis="{Binding ElementName=FileAxis}" >
</charts:LineSeries>
<charts:LineSeries x:Name="EffortSeries" ItemsSource="{Binding Path=CumulativeStages}" XPath="StageNumber" YPath="CodeEffort"
YAxis="{Binding ElementName=EffortAxis}" />
</charts:XYChart>
However I only get a default axis and two databinding errors:
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=FileAxis'. BindingExpression:(no path); DataItem=null; target element is 'LineSeries' (Name='FileSeries'); target property is 'YAxis' (type 'XYAxisBase')
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=EffortAxis'. BindingExpression:(no path); DataItem=null; target element is 'LineSeries' (Name='EffortSeries'); target property is 'YAxis' (type 'XYAxisBase')
Any suggestions?
Thanks
DC