I have a chart with a OrdinalTimeXAxis and my chart is zoomable. i want to get current x axis values
<ig:OrdinalTimeXAxis x:Name="PreviewXAxis" DateTimeMemberPath="." ItemsSource="{Binding Path=DatesRange}" Label="{}{Date:dd MMM yyyy}"> <ig:OrdinalTimeXAxis.LabelSettings> <ig:AxisLabelSettings Location="OutsideBottom" FontSize="10" /> </ig:OrdinalTimeXAxis.LabelSettings> </ig:OrdinalTimeXAxis>
Hello,
The children collection HorizontalAxisLabelPanel returns all labels, regardless of their visibility. Can you maybe show me an example so I can understand the requirements better?
Looking forward to your reply.
Sincerely,
Tihomir TonevAssociate Software DeveloperInfragistics
Hello,thank you for your answer, that`s worked but i have also another problem that my some labels in x-axis are hide and i have only some of them and this code give me the displayed labels. I need all of lables in current x-axis.
I guess you are looking for the currently visible labels of the XAxis after you have zoomed? If this is the case, what I can suggest is retrieving the HorizontalAxisLabelPanel:
HorizontalAxisLabelPanel xPanel = Utilities.GetDescendantFromType(chart, typeof(HorizontalAxisLabelPanel), false) as HorizontalAxisLabelPanel;
The panel will have a children collection of textblocks. You can loop trough it and check for the visible elements, as the textblocks which are left out of view will have their visibility set to collapsed.
If this is not the case, please let me know.
This post is similar to my problem but in JQueryhttps://ko.infragistics.com/community/forums/f/ignite-ui-for-jquery/96283/get-current-x-axis-range