flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maurice Amsellem <maurice.amsel...@systar.com>
Subject RE: Lineseries tooltip on mobile
Date Tue, 09 Sep 2014 12:44:33 GMT
Hi Deepak, 

I didn't test, but since Datatips are managed at the chart level, not at the renderers level,
 (check ChartBase.mouseOverHandler() ), then it likely that simply adding click/tap listeners
to the renderer will not work.

Did you try  setting mouseSensitivity property for the chart ? 



-----Message d'origine-----
De : Deepak MS [mailto:megharajdeepak@gmail.com] 
Envoyé : mercredi 27 août 2014 11:46
À : users@flex.apache.org
Objet : Lineseries tooltip on mobile

Hi there,
I'm using a columnchart with a lineseries in it for an ipad app. I have enabled tooltip for
it. But unfortunately its too difficult to get the tooltip on the device when we move the
finger over it.

Hence I planned to add a custom circleitemrenderer with width and height of
20 to get the custom tooltip by adding a click\touchtap event on it.

But unfortunately, it is not triggering the click\touchtap event at all.

My code:

myLineSeries.setStyle('itemRenderer', new ClassFactory(DataPointRenderer));

public class DataPointRenderer extends CircleItemRenderer
        public function DataPointRenderer()
            width = 20;
            height = 20;
            addEventListener(MouseEvent.CLICK, onClick);
            addEventListener(TouchEvent.TOUCH_TAP, onClick);

            addEventListener(MouseEvent.MOUSE_OVER, onOver);

        private var model:ApplicationModelLocator = ApplicationModelLocator.getInstance();
        private function onOver(event:MouseEvent):void
            model.showAlert('over');  /// This function is not at all called even after clicking(both
on simulator as well as on device)

        private function onClick(event:MouseEvent):void
            model.showAlert('clicked');    /// This function is not at all
called even after mouse hover (on desktop simulator)

        override protected function
            super.updateDisplayList(unscaledWidth, unscaledHeight);
            var currentFill:uint;
            var g:Graphics = graphics;
            if (data is ChartItem && data.hasOwnProperty('fill'))
                currentFill = data.fill.color;


Am I missing something here?
View raw message