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
125
Modifying where X axis begins
posted

Hi,

 I have a chronologically based x-axis. The data for this chart are integer values accumulated for the last 21 months. Therefore, I currently plot the chart with the x-axis starting 21 months ago from today to up to the most recent data (in intervals, of course).

 My question is this: I want the x-axis to start at the 15 months ago mark, while keeping the data for the y-axis where it was originally. To make myself absolutely clear, I want to truncate the x-axis by 6 months, while keeping the data as it were. I don't see a way to do this currently. Maybe something to do with MinRange and MaxRange?

 Any help is appreciated,

 Srdjan

Parents
No Data
Reply
  • 28496
    Offline posted

    Axis.X.RangeType = AxisRangeType.Custom

    Axis.X.RangeMin = 6

    Axis.X.RangeMax = 21

    ^ that should work although I might be off-by-one with those values.

    if your X-axis is a true time axis, then the same code applies except you would use Axis.X.RangeMin = DateTime.Now.AddMonths(-15).Ticks

     

Children
No Data