Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
XamDataChart get current x axis value

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"
                                                     ItemsSource="{Binding Path=DatesRange}"
                                                     Label="{}{Date:dd MMM yyyy}">
                                        <ig:AxisLabelSettings Location="OutsideBottom"
                                                              FontSize="10" />

  • 980
    Offline posted


    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.


    Tihomir Tonev
    Associate Software Developer

Reply Children