1 Reply Latest reply on Jul 2, 2008 7:18 AM by matthew horn

    itemDoubleClick event not fired

    smonika15
      Hi,

      I tried the follwoing code

      <?xml version="1.0"?>
      <!-- charts/DataPointAlert.mxml -->
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml">
      <mx:Script><![CDATA[
      import mx.controls.Alert;
      import mx.charts.events.ChartItemEvent;
      import mx.collections.ArrayCollection;

      [Bindable]
      public var dataSet:ArrayCollection = new ArrayCollection([
      {Month:"Jan", Expenses:1500},
      {Month:"Feb", Expenses:200},
      {Month:"Mar", Expenses:500}
      ]);

      public function myHandler(e:ChartItemEvent):void {
      Alert.show("Chart data was clicked");
      }
      public function myHandlerDoubleClick(e:ChartItemEvent):void {
      Alert.show("Chart data was double clicked");
      }

      ]]></mx:Script>
      <mx:Panel title="Clickable Bar Chart">
      <mx:BarChart id="myChart"
      selectionMode="multiple"
      itemClick="myHandler(event)"
      itemDoubleClick="myHandlerDoubleClick(event)"
      doubleClickEnabled="true"
      dataProvider="{dataSet}"
      >
      <mx:horizontalAxis>
      <mx:CategoryAxis
      dataProvider="{dataSet}"
      categoryField="Month"
      />
      </mx:horizontalAxis>
      <mx:series>
      <mx:ColumnSeries yField="Expenses"/>
      </mx:series>
      </mx:BarChart>
      </mx:Panel>
      </mx:Application>


      double click event is not fired every time fires the itemclick event.

      Can anybody please help me in that?


      Thanks
      smonika15