Hi,
In the attached figure, I build a few point/line series and it works fine but the points are truncated as shown! I have built all series in the code behind. Here is the XAML:
<ig:XamDataChart Padding="5" x:Name="Chart1" HorizontalZoomable="True" HorizontalZoombarVisibility="Collapsed" VerticalZoomable="True" VerticalZoombarVisibility="Collapsed" Title="Stick Diagram : Wellbore-Completion Depth Section View" Legend="{Binding ElementName=xmLegend1}" HorizontalAlignment="Stretch" Margin="5,5,5,5" FontFamily="Tahoma" FontSize="14" FontWeight="Bold"></ig:XamDataChart>
<ig:Legend x:Name="xmLegend1" FontFamily="Arial" HorizontalAlignment="Right" VerticalAlignment="Top" FontSize="6" Margin="0,10,0,0" Grid.Column="1"/>
How do I make sure that all series are displayed properly!
Hello Steve,
The behavior that you are seeing is the expected default behavior of the XamDataChart. The start and end points of your data source will plot at the far left and right ends of the XamDataChart plot area, and as such, the marker may not necessarily fit inside of the bounds of the plot area. This will lead to it being truncated. There are a couple of things you can do to prevent this.
If you are using either version 2016.1 or 2016.2 of the Infragistics for WPF controls, I would recommend that you using the XamDataChart.PlotAreaMargin property. This property will allow you to place some margin between the edges of the plot area and the actual area where the points are plotted.
If you are using a version prior to 2016.1, I would recommend that you pad your data with 'empty' categories. In this case, the data item's property used for the ValueMemberPath could be set to double.NaN, and by default, that point will not be plotted. The space for it's category will still be there, though, which will move your first (and last) "plotted" point away from the edges of the chart.
I have attached a sample project demonstrating both approaches. Currently, the "padding" values are commented out for usage with the PlotAreaMargin property in the sample project. If you are using a version in which this property doesn't exist, I would recommend removal of this setter and uncommenting the "padding" values in the ViewModel.cs class.
I hope this helps. Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate Developer
Thanks Andrew! Good to know this option.