When plotting a financial bar series, the rightmost and leftmost bars (on the margins) are cut in half. We have found no way to adjust the display to show these bars in full.
Here's an example:
Why is the width of the rightmost green bar cut in half? Is there a way to prevent this from happening?
Regards,
Jim
Jim,
Unfortunately this is a known issue, the resolution of which requires some feature work to be completed, which is hopefully scheduled for soon. I would recommend making a feature request for this to log your vote for its priority.
-Graham
I would say this is clearly a bug, not a feature. It should be submitted as such.
If you still think we should submit a FR we will do so, but it seems a longer route to the solution.
When I referred to this as an "issue" I was indicating its status as a known bug with the control. I'm sorry if I was unclear. However, this bug exists because of a missing feature in the chart (namely the ability to establish axis margins, or have them automatically established for you).
This feature is already on the backlog. I'm hoping we will address this in this coming release, but it really depends on how the backlog is prioritized. Submitting a feature request may assist in the backlog item being assigned with the correct priority, and it may not hurt to raise the issue with productmanager@infragistics.com also.
You can approximate this missing feature by putting some margins on the series and the axes, like below. But you will notice some visual aspects of the series and some features not working appropriately due to the fact that the series and axes are determining visibility information based on their bounds. This is why the concept of content margins needs to be introduced as a feature to the chart rather than approximated using its sub components:
<Grid x:Name="LayoutRoot" Background="White"> <igChart:XamDataChart x:Name="theChart" PlotAreaBackground="White" HorizontalZoomable="True" VerticalZoomable="True"> <igChart:XamDataChart.Axes> <igChart:NumericYAxis x:Name="yAxis" Margin="50,0,50,0" /> <igChart:CategoryXAxis Margin="50,0,50,0" x:Name="xAxis" ItemsSource="{StaticResource data}" Label="{}{Label}"> <igChart:CategoryXAxis.LabelPanelStyle> <Style TargetType="Panel"> <Setter Property="Margin" Value="50,0,50,0" /> </Style> </igChart:CategoryXAxis.LabelPanelStyle> </igChart:CategoryXAxis> </igChart:XamDataChart.Axes> <igChart:XamDataChart.Series> <igChart:FinancialPriceSeries x:Name="series" Margin="50,0,50,0" ItemsSource="{StaticResource data}" XAxis="{Binding ElementName=xAxis}" YAxis="{Binding ElementName=yAxis}" DisplayType="Candlestick" OpenMemberPath="Open" HighMemberPath="High" CloseMemberPath="Close" LowMemberPath="Low" > <igChart:FinancialPriceSeries.ToolTip> <TextBlock Text="{Binding Item.Label}" /> </igChart:FinancialPriceSeries.ToolTip> </igChart:FinancialPriceSeries> </igChart:XamDataChart.Series> </igChart:XamDataChart> </Grid>
Here is what the result looks like:
Notice how the axis lines don't extend into the marginal regions? This could be argued to be ok at this zoomed out level, but notice what happens if you zoom in:
Here it just isn't acceptable that the axis is using its bounds to define how far its content extends, and the only reason we are seeing the candlesticks that are out of the view is that the series will often render a shape that might be partially clipped by its bounds.
A safer way to approximate axis margins might be to insert a double.NaN value at the beginning and end of the series. That looks like this:
However, when using that strategy, and using trendlines or indicators, you may cause moving calculations to be invalid for longer during their first period, etc. There is a property on indicators that you can use to ignore the first so many values in the display on an indicator to avoid the invalid first period values, but I cannot recall if we provide the same functionality for trendlines at present.
Hope this helps!
Thanks, Graham. This information is helpful to improve the chart temporarily until properly fixed.
I will submit a FR and email product manager to try and bump up the priority. It is a significant issure for us since we market a financial-oriented product.
Is this issue fixed in 12.2?
We will check after we upgrade to 12.2 (in the middle of some changes before we can upgrade).
Hi Jim,
You should contact Product Management productmanager@infragistics.com and inquire about Product Idea PI12050083.
Sincerely,
Matt Developer Support Engineer
We finally upgraded to 12.2 and this issue is not fixed.