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
140
HitTest to find next data value
posted

I need a vertical marker in a line chart. When clicking in the chart area (not on the line itself), then for example a vertical red line shall appear. The goal shall be a time marker in the x-axis like a time marker in a wave editor.

The question is:
How can I find out the next data value after left mouse click ?

Second question:
The x-axis is scaled, but moving is not possible with the black scrollbar. It is only possble with the black arrows. How can I move with the scrollbar ?

Regards
Achim

 

Parents
  • 28496
    Offline posted

    i'm not sure what you mean by "the next data value."  if you want to associate a data value with a point on the chart, you can do that using the Axis.MapInverse function -- but to reference the Axis object, you have to handle the FillSceneGraph event...

     

    void UltraChart1_FillSceneGraph(object sender, FillSceneGraphEventArgs e)

    {

    IAdvanceAxis xAxis = e.Grid["X"] as IAdvanceAxis;

    object valueAtMouseLocation = xAxis.MapInverse(mouseLoc.X);

    }

     

    as for dragging the scrollbar -- sorry, but this feature is not yet implemented in WinChart.  you can submit a feature request here: http://devcenter.infragistics.com/protected/requestfeature.aspx

Reply Children
No Data