I have the following XAML which creates several X-axes, all but one should not be displayed. When the application runs, screen layout space is still reserved for these "hidden" axes instead of the XamDataChart expanding to the bottom of the available display area. How can I truly hide/collapse these axes?
<ig:XamDataChart x:Name="PhysAnalysis" VerticalZoomable="True" HorizontalZoomable="True" Grid.Row="1" Grid.Column="0"> <ig:XamDataChart.Axes> <ig:CategoryDateTimeXAxis x:Name="_1_xAxis" DateTimeMemberPath="XOADate" Visibility="Collapsed" /> <ig:CategoryDateTimeXAxis x:Name="_2_xAxis" DateTimeMemberPath="XOADate" Visibility="Collapsed" /> <ig:CategoryDateTimeXAxis x:Name="_3_xAxis" DateTimeMemberPath="XOADate" Visibility="Collapsed" /> <ig:CategoryDateTimeXAxis x:Name="_4_xAxis" DateTimeMemberPath="XOADate" Visibility="Collapsed" /> <ig:NumericXAxis x:Name="visible_xAxis" Title="xAxis" /> <ig:NumericYAxis x:Name="visible_yAxis" Title="yAxis" /> </ig:XamDataChart.Axes> <ig:XamDataChart.Series>
Thanks Andrew, I added:
<ig:CategoryDateTimeXAxis.LabelSettings> <ig:AxisLabelSettings> <ig:AxisLabelSettings.Visibility> <Visibility>Collapsed</Visibility> </ig:AxisLabelSettings.Visibility> </ig:AxisLabelSettings> </ig:CategoryDateTimeXAxis.LabelSettings>
To the CategoryDateTimeXAxis XAML definition and now the "hidden" axis label layout space is reclaimed by the visible controls.
Thanks!
Hello Gary,
Thank you for your post.
By setting the Visibility property of the axis in this case, you are hiding the axis, but the space for the labels will still be reserved, as the axis label panels will still be visible. To truly collapse the space needed for the axis and its labels, I would recommend defining an AxisLabelSettings element under your CategoryDateTimeXAxis.LabelSettings. This AxisLabelSettings element has a Visibility property, which I would recommend setting to "Collapsed." This should collapse the space needed for the labels as well as the space for the axis.
I hope this helps. Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate DeveloperInfragistics Inc.www.infragistics.com/support