Hello,i've created two XamDataCharts to display financial data. In the FinancialPriceSeries the first candle is rendered on the first line of Y-Axis, but in the ColumnSeries the first column is rendered between first and second column of Y-Axis. Below is a picture to discribe what I mean:
Now, my question is: which setting I have to set, to get the described behaviour?
It would also be nice if the first and last candle is not cutted.
Thanks in advance and best regards
Below is my code to find a possible error in my settings:
<ig:XamDataChart DataContext="{Binding Path=CandleList}" DefaultInteraction="DragPan" HorizontalZoomable="True" HorizontalZoombarVisibility="Visible" VerticalZoomable="False" VerticalZoombarVisibility="Hidden" Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="4"> <ig:SyncManager.SyncSettings> <ig:SyncSettings SyncChannel="syncGroup" SynchronizeVertically="True" /> </ig:SyncManager.SyncSettings> <ig:XamDataChart.Axes> <ig:CategoryXAxis x:Name="candleXAxis" ItemsSource="{Binding}" Label="{}{Timestamp}"> <ig:CategoryXAxis.LabelSettings> <ig:AxisLabelSettings Location="OutsideBottom" /> </ig:CategoryXAxis.LabelSettings> </ig:CategoryXAxis> <ig:NumericYAxis x:Name="candleYAxis"> <ig:NumericYAxis.LabelSettings> <ig:AxisLabelSettings Location="OutsideLeft" Extent="50" /> </ig:NumericYAxis.LabelSettings> </ig:NumericYAxis> </ig:XamDataChart.Axes> <ig:XamDataChart.Series> <ig:FinancialPriceSeries DisplayType="Candlestick" ItemsSource="{Binding}" OpenMemberPath="Open" HighMemberPath="High" LowMemberPath="Low" CloseMemberPath="Close" VolumeMemberPath="Volume" XAxis="{Binding ElementName=candleXAxis}" YAxis="{Binding ElementName=candleYAxis}" /> </ig:XamDataChart.Series></ig:XamDataChart>
<ig:XamDataChart DataContext="{Binding Path=CandleList}" DefaultInteraction="DragPan" HorizontalZoomable="True" HorizontalZoombarVisibility="Hidden" VerticalZoomable="False" VerticalZoombarVisibility="Hidden" Grid.Row="7" Grid.Column="0" Grid.ColumnSpan="4"> <ig:SyncManager.SyncSettings> <ig:SyncSettings SyncChannel="syncGroup" SynchronizeVertically="True" /> </ig:SyncManager.SyncSettings> <ig:XamDataChart.Axes> <ig:CategoryXAxis x:Name="volumeXAxis" ItemsSource="{Binding}" Label="{}{Timestamp}"> <ig:CategoryXAxis.LabelSettings> <ig:AxisLabelSettings Visibility="Hidden" /> </ig:CategoryXAxis.LabelSettings> </ig:CategoryXAxis> <ig:NumericYAxis x:Name="volumeYAxis"> <ig:NumericYAxis.LabelSettings> <ig:AxisLabelSettings Location="OutsideBottom" Extent="50" /> </ig:NumericYAxis.LabelSettings> </ig:NumericYAxis> </ig:XamDataChart.Axes> <ig:XamDataChart.Series> <ig:ColumnSeries ItemsSource="{Binding}" ValueMemberPath="Volume" XAxis="{Binding ElementName=volumeXAxis}" YAxis="{Binding ElementName=volumeYAxis}" Margin="5" /> </ig:XamDataChart.Series></ig:XamDataChart>
Hi,
We have a new page in the documentation in version 11.2 that describes some of these scenarios. It may be of use to you: http://help.infragistics.com/NetAdvantage/DV/2011.2/CLR4.0/?page=xamDataChart_Multiple_Series.html
-Graham
Hello Graham,
thank you very much. I had already thought that it's a simple problem, but I doesn't found a direct solution in the dokumentation. thanks again.
best regards
To align the columns with items in a different series, you should have them share the x axis from the other chart. Change their XAxis binding to read:
XAxis="{Binding ElementName=candleXAxis}"
Alternatively, you could put the same candlestick series in the lower chart but hide it. Its the act of sharing an axis between these two series that have different alignment rules that make them coordinate with each other.
Hope this helps!