locked
Setting suitable Cursor intervals RRS feed

  • Question

  • I am using the FastPoint chart type, to display data from a number of series. There may be a dozen or so series each having many data points (possibly a couple of hundred or more). I have enabled the X and Y cursors to allow the user to zoom-in and re-scale.
    With some data this works fine, but sometimes one or other of the cursors just seems to be stuck at the bottom and will not move.
    I eventually tracked this behaviour down to the cursor interval setting. The interval defaults to 1, so if my values are less than 1 the cursors won't work. I tried setting the interval to a smaller value (0.001) but now if my data values are very large (e.g. ~1E12) they don't work again. I have no idea ahead of time what the size of the values might be, so how can I determine a suitable value for the interval?
    The automatic Axis scaling seems to be able to be able to pick reasonably suitable values for the interval for the axis labels and tickmarks, is there a way to have it choose a suitable value for the cursor interval too?
    Thursday, December 4, 2008 5:26 PM

Answers

  •  Set the cursor interval to Double.NaN, this will force cursor interval to auto :


    chart1.ChartArea[0]
    .CursorX.Interval = double.NaN;  
    chart1.ChartArea[0].CursorY.Interval = double.NaN;  
     
    Friday, December 5, 2008 12:33 AM
    Moderator

All replies

  •  Set the cursor interval to Double.NaN, this will force cursor interval to auto :


    chart1.ChartArea[0]
    .CursorX.Interval = double.NaN;  
    chart1.ChartArea[0].CursorY.Interval = double.NaN;  
     
    Friday, December 5, 2008 12:33 AM
    Moderator
  • Thanks. I'll try this. Is this any different than setting it to zero?
    Friday, December 5, 2008 10:29 AM
  • Ouch!  This solution although it works should be changed by MSFT to an ENUM value of "Auto" as this is not intuitive.  But I guess as we get use to this type of construct it becomes second hand right?
    Javaman

    BTW to answer the last question... NO zero and NAN are different.  They are not the same.
    Tuesday, February 9, 2010 4:34 PM