views:

140

answers:

1

Hi,

We have some actions associated with double-click events on a data point inside Flex charts. When user hovers mouse pointer, the mouse datatip is shown properly. However, user needs to double click 'precisely' onto the point, to fire the event correctly. Can we increase 'radius' or 'range' or 'region' or 'target area' of this click event?

PS: Technical details are -

  • myChart.addEventListener(ChartItemEvent.ITEM_DOUBLE_CLICK, doubleClickHandler);
  • mychart.dataTipFunction = myDataTipFunction ;

  • Firefox 3.5

  • Flex SDK 3.3
  • Flash Player 10

Please help !!!!

Thanks in advance.

+1  A: 

Yes, you can set the mouseSensitivity property on your chart to specify a bounding radius around your data points that flex will use when determining if a point was clicked.

From the docs:

public var mouseSensitivity:Number = 5 Specifies the distance, in pixels, that Flex considers a data point to be under the mouse pointer when the pointer moves around a chart. Flex considers any data point less than mouseSensitivity pixels away to be under the mouse pointer. This value is also used by the findDataPoints method.

George
Thanks George.I have a doubt here, mousesensitivity is applicable to both the 'datatip' as well as 'click' functionality. In my case the datatip works fine only click functionality is not invoked promptly. One interesting I found here is that as soon as I bring my mouse near a point, datatip function is invoked first and may be this prevents click functionality to get invoked promptly because I do a bit of complex things in my data tip function which takes a several miliseconds. Could it be the root cause ??
Ashine