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
920
How to determine start and end of data window when using axis scrolling
posted

Hi

My application has a chart and I have enable scrolling on the X-axis which is date/time based.  I also have to calendars that constrain the data displayed in the chart.

Is it possible to determine the start and end of data window displayed when the X axis is scrolled so that I can keep the calendars in sync?

Any help greatly appreciated.

Regards

James

Parents
  • 26458
    Suggested Answer
    Offline posted

    Yes, but you'll have to extract those from FillSceneGraph event. Here's how you can do that:

    DateTime effectiveMin;
    DateTime effectiveMax;

    private void ultraChart1_FillSceneGraph(object sender, FillSceneGraphEventArgs e)
    {
        if (e.Grid.Count == 0) return;
        IAdvanceAxis xAxis = (IAdvanceAxis)e.Grid["X"];
        effectiveMin = (DateTime)xAxis.WindowMinimum;
        effectiveMax = (DateTime)xAxis.WindowMaximum;
    }

Reply Children