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
1080
x- Axis DateTime labels
posted

How can I set  period units in an x-axis showing DateTime values, according to a particular rule?
For example, if the datapoints are 365 (one year) I would like to show axis label every end of month, or quarterly, and so on.

If no unit is set, line chart will show every day in the axis label, but the chart is not readable anymore.

 

Parents
No Data
Reply
  • 5124
    posted

    famproject,

    Please test this code in your implementation and let me know how this works for you:

    axis.AutoRange = false;

    axis.Minimum = aDateTime.ToOADate();

    axis.Maximum = aDateTime.ToOADate();

    axis.Unit = anInterval.TotalMilliseconds;

    Thanks,

     

Children