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
715
Draw Rectangle on MouseMove Event
posted

Hi,

I am trying to zoom user selected portion of chart.

user can draw rectangle or square by dragging mouse mouse.

startPosition : Mouse Down

End Position : Mouse Up or MouseMove

i draw rectangle from startPosition to End Position in FillSceneGraph event.

basically on MouseMove event i store EndPosition as current mouse location and call InvalidateLayers function on chart.

In FillSceneGraph event i draw rectangle from startPosition to EndPosition and add it to SceneGraph.

 Every thing works fine except the delay in displaying rectangle.

is there any way to avoid the delay..or is FillSceneGraph is right place to add primitives on mousemove event.

as mousemove event is called for every few milliseconds ..

 

Thanks,

Kk

Parents
  • 70
    posted

    I am confused by what kalvagadda said.

    According the information, it seems that the "Zoom By Area" (use left mouse to draw a rectangle to zoom in) feature is available already.

    However, as far as I know, the feature has not been implemented.  what we only have is using Alt + mouse scroll button in order to zoom in/out 3D charts. In order to zoom in/out 2D charts you should enable axis' scroll.

    Please paste some code for example if you know how to zoom by area.

    Anybody who knows something related can clarify this.

     

    thanks

Reply Children