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
622
XamChart and AutoRange property
posted

Hello,

I'm using the XamChart component to display a line chart. The AutoRange property is set to true for the primaryY axis.

It is also possible to zoom the chart. The number of points to be displayed after zooming is computed again and the Y scale is computed again too, due to the Autorange property (set to true).

I'd like to lock the initial scale defined by XamChart and keep it on zooming. My idea is:

- Autorange=true

- add my serie to the chart (the Y scale is computed)

- read Minimum, Maximum and Unit values (automatically defined by autorange=true)

- set autorange= false; Minimum=minValue; Maximum=maxValue; Unit=unitValue

the problem is that I'm not able to get values for this 3 last properties. I have a NaN value when I debug the code and look the watch.

Any explanation or workaround?

Thanks in advance

JD

  • 138253
    Offline posted

    Hello JD,

     

    I am just checking if you got this worked out or you still require any assistance or clarification on the matter.

  • 138253
    Offline posted

    Hello JD,

     

    Thank you for your post. I have been through it and since you set the AutoRange Property to True it is normal to have Maximum and Minimum set to NaN. In this case I can suggest you try our XanDataChart, which in version 11.2 is available in both NetAdvatnage LOB and DV, where the Zooming is a built-in feature. A possible workaround is to iterate trough your DataPoints and get the Maximum and Minimum from there. Please let me know if this helps you or you need further clarifications on this matter.

     

    Looking forward for your reply.