Crosshair mouse tracker on Plot Chart

Hi All,
I have implemented a flex plot chart, which works fine (able to plot items to it).  I want to add a cross hair tracking device that will move along with the mouse.  The cross hair will draw a simple horizontal and vertical line crossing at the mouse pointer to the edges of the chart.  I already have registered for the mouse move event (I have a status line that prints the real world values based on x/y position as the mouse moves).  The crosshair implementation I have tried implementing causes the mouse tracking to act very strange...almost, in a lagging type behaviour.  I am using a Graphics object from the plot chart object.  I do a clear each time before I redraw the crosshair (as the mouse moves).  The 'clear' seems to be the core of the lag problem (if I comment out the 'clear', the tracking works fine..but of course the crosshair from the previous mouse position doesnt erase).  I didnt see an 'xor' type of function which is what I have used on like projects before. Any ideas or suggestions would be greatly appreciated.
my plot char is  called tlat_chart.
var G:Graphics = tlat_chart.graphics;
G.clear();
G.moveTo(somex, somey);
G.lineTo(newx, somey);
etc......

Take a look at Eli's custom chart annotations here: http://demo.quietlyscheming.com/ChartSampler/app.html

Similar Messages

  • Simple Flex Chart question - Plot Chart labels

    I'm playing around with displaying data from WDA as charts in Flex 3.
    I'm able to bind my internal table, which has 3 fields, to the plot chart.
    The table looks like this
    ext_id      type string    " bound to prjname in Flex
    cost         type string    " bound to prjcost in Flex
    benefit     type string    " bound to prjbenefit in Flex
    These are all bound to my island's DataSource.
    I have bound these in Flex and the Cost and Benefits are showing up as points on my chart. However, I can't seem to get the Project Name to display on the plot points. All I see when I mouse over the point is EXT_ID, and the values for cost and benefits.
    The cost/benefit values are coming across correctly, just not the project name (ext_id) value. any ideas?
    here's the Flex code for the chart
         [Bindable]
         public var dataSource:ArrayCollection;
         [Bindable]
         public var prjcost:String;
         [Bindable]
         public var prjbenefit:String;
         [Bindable]
         public var prjname:String;.
        <mx:PlotChart id="plotchart1" dataProvider="{dataSource}" showDataTips="true">
           <mx:series>
                <mx:PlotSeries displayName="{prjname}" yField="{prjcost}" xField="{prjbenefit}" dataProvider="/>
            </mx:series>
        </mx:PlotChart>

    This is really a Flex question not an Islands specific one.  I don't think the displayName properity is what you want to use here.  This is the name for the entire series as it will be displayed in the legend. I think what you want is a dataTip.  You register a callback for the dataTip rendering and then fill the custom dataTip quick info.
    This is an example from a bar chart, but the theory is the same:
    <mx:BarChart id="barChart" dataTipFunction="dtFunc" xmlns:mx="http://www.adobe.com/2006/mxml" type="clustered" width="100%" showDataTips="true" height="100%">
         <mx:verticalAxis>
              <mx:CategoryAxis categoryField="{SalesOrd}" dataProvider="{dataSource}" />
         </mx:verticalAxis>
         <mx:series>
              <mx:BarSeries id="bsGross" xField="{grossAmt}" displayName="Gross Amount" dataProvider="{dataSource}" fill="{otdFill}" showDataEffect="{slideIn}"  />
              <mx:BarSeries id="bsNet" xField="{netAmt}" displayName="Net Amount" dataProvider="{dataSource}" fill="{rtyFill}" showDataEffect="{zoomIn}"  />          
         </mx:series>
    </mx:BarChart>
    private function dtFunc(hd:HitData):String {
                  switch(BarSeries(hd.element).id){
                       case "bsGross":
                             return "Sales Order #: " +  hd.item.SO_ID + "\n" + FlashIsland.formatNumber(hd.item.TTL_GROSS_AMOUNT) + " " + hd.item.CURRENCY_CODE;                        
                             break;
                       case "bsNet":
                             return "Sales Order #: " +  hd.item.SO_ID + "\n " + FlashIsland.formatNumber(hd.item.TTL_NET_AMOUNT) + " " + hd.item.CURRENCY_CODE;
                             break;                   
                  return "Amount";

  • In need of a Mighty Mouse Track Ball

    Something small and hard, fell in the mouse track ball area and while i was pressing it (upside down) on a piece of paper to clean it, that little hard piece of dust, carved the surface of my track ball making it unable to scroll without jumping around!
    So im now in the need of purchasing a new ball and replacing it! Does the ball as a part exist? Because i can't find anything on ebay! Any help?

    What exactly am i looking for in the "about this Mac" specs? I mean i have found the mouses info, i think this is it:
    but what numbers must be used in order to locate it from mouseballz website?

  • Mighty Mouse Track Ball

    Does any one else have issues with the mighty mouse track ball?? My does not work half the time. When it is working it will only work in one direction half of that time.
    Does anyone know of ways to clean it?? Or keep this from happening?
    Cameron
    MBP 15.4"   Mac OS X (10.4.8)  

    I've read all the posting about this..in recent months I've been cleaning the track ball 6,7,8,9....times every day. I had planned to buy a wireless Mighty Mouse but not now, it'd be cheaper to sit in front of my Mac bashing my testicles with a mallet for the same effect. Apple, this is an utter design disaster. Like Joachim says, why not a mouse we can open and clean easily, or a larger, more robust track ball mechanism? I'm off to but a mouse by anyone but Apple...
    G5 i-Mac   Mac OS X (10.4.9)  

  • Flex 3 : Contour Plot Chart

    Hi,
    I have been tasked with a project where a contour plot chart is required like the one below. Does anyone know how this coould be done in Flex or are there any third-party components available to do this?
    Thanks very much for you help.
    Martin

    Hi Subeesh,
    Thanks for the info but it's not a radar chart. What I am looking for is more like --> http://www.singleton-labs.com/mcharts.php
    Martin

  • Dynamic Series creation for Plot Chart

    Hi,
    I am using a plot chart which takes data from an external XML file.
    Based on certain fields in the data, I create 3 different plot series.
    I use a Combo box to show different plot series based on the selected value from it.
    I am placing another Combo box
    How can do the below task:
    I need to create some dynamic series based on some node elements in the series for which the chart is currently shown.
    I create another Combo box to show the above generated plot series based on the selected value from it.

    Hi,
    I am using a plot chart which takes data from an external XML file.
    Based on certain fields in the data, I create 3 different plot series.
    I use a Combo box to show different plot series based on the selected value from it.
    I am placing another Combo box
    How can do the below task:
    I need to create some dynamic series based on some node elements in the series for which the chart is currently shown.
    I create another Combo box to show the above generated plot series based on the selected value from it.

  • Mouse tracking always reset to a specific area point

    Hi,
    My iMac mouse always reset to a specific area of my screen every time I move it.
    I thought that it was the magic mouse tracking that was bugging but it's not : the same problem occurs when I'm using the ScreenSharing app with my computer on sharing mode.
    I tried to restart the computer, empty the PRAM after unplugging the computer but nothing worked..
    Here's the specs of my iMac :
    iMac 27-inch, Late 2012
    3,4 GHz Intel Core i7
    32 Gb of ram
    NVIDIA GeForce GTX 680MX 2048 Mb
    OS X Yosemite 10.10.1
    Someone could help me please?

    Everything is ok finally : I haven't seen that the pen of my graphic tablet was layed down on it..! -_-

  • IMAC 27 - attached a second monitor - mouse tracking problem

    After attaching a 19 inch lcd via the mini display port and a dvi adapter my mouse tracking has gone bad, not just from one screen to the other even just on the main screen if you move the mouse around it jumps several inches and is very inaccurate. problem goes away when the second mointor is unpluged.
    Can anyone help?
    Stephen

    I'll add to the chorus: I have the 27" iMac, and I get the same mouse jumpiness when I connect my 24" Acer P244W display via the Mini DisplayPort-DVI adapter. Oddly enough, the mouse jumpiness is more pronounced when I use my old wired MS Intellimouse Optical than when I use the included Magic Mouse. I've confirmed with another Mac (and with this Mac minus the second display) that the wired mouse is functioning normally.
    Basically, given slow, constant mouse movement, the cursor will hiccough for about a tenth of a second once every 1.0 seconds, like clockwork. Given more normal use, the cursor will continue to hiccough every second and will also occasionally jump to a completely unrelated location on the screen. (The wired mouse was the worse off here, jumping unpredictably several times a minute.)
    I've unplugged the secondary display for now, but I kinda sorta really need it for Flash and video work. Apple, help!

  • Keyboard & Mouse Settings - Mouse Tracking Problem

    Whenever I change the tracking setting for my mighty mouse in system preferences it works fine, but as soon as I close system preferences the tracking setting reverts to the default setting. I tried altering various settings and they all remain as I set them when I close system preferences, but the mouse tracking setting is the only one that will not remain as I set it. I tried changing the setting in Terminal, but it will not work that way either. Then I downloaded MouseZoom thinking that maybe it would work, but it also works fine until you close system preferences. Any input would be greatly appreciated.

    Have you tried repairing permissions?
    If that doesn't work try downloading Onyx
    http://www.titanium.free.fr/pgs2/english/onyx.html
    Run these scripts in the 'Cleaning' Tab
    * User Caches
    * System Caches
    * Core Files
    * Temporary Files
    See if that works for ya.
    Good Luck
    -Steve

  • Airport/freezing/mouse track won't work

    Hey guys, I'm wondering if you could help with my iBook G4. I'm beginning to get seriously annoyed with it. I bought it back in September and it was fine up until recently where it has begun crashing. It tells me that I need to push down the power button to power down. When that happens, I shut it down and then I power it back up again. However, when it does load up, Airport cannot be found/does not exist. When I try to run disk utility, or any other program, it freezes. Not only that but the mouse track will no longer respond.
    I'm bloody well tired of having to restart it over 10 times. I've updated all the necessary software and hardware on here. Maybe this happened when I updated the Airport software. I am running some third party software, but that hardly crashes the laptop. There are times when it won't respond and I just force quit applications.
    I'm really annoyed and I need this laptop to work. I've also found that the build of iBook is loose like it has been altered before being sent to me.
    Any help would be necessary. Thank you.

    Welcome to the Apple Discussions!
    It seems you are encountering a . The cause of a kernel panic could be hardware or software. If your AirPort card is not available after a crash like this, that could be a telling sign. Perhaps your AirPort card itself is loose? A loose connection could cause a kernel panic. You might try taking it out and putting it back in to make sure it's secure.
    If that doesn't help, you might visit Dr. Smoke's great FAQ about troubleshooting kernel panics here.
    -Doug

  • Mouse tracking

    OK, I have finally had a chance to play around with my newly purchases iMac 24" yesterday! So far so good, and as a now ex Windows users I am very impressed with the OS However, I have one little niggle, and if there's a solution I would love to see it.
    I have adjusted to mouse tracking speed to around 90% so that I can quickly cover the 24 inches of my screen, but I am getting a little frustrated by the fact that when I slow my hand movement down slightly (for instance, to click on a small object, or to highlight text etc.) the mouse slows down to a crawl. I am assuming that this is a deliberate feature of OSX to increase accuracy, but it is slowing me down. Is there any way to turn this "feature" off?

    A lot of people have been complaining about the acceleration curve algorithm used in the Intel Macs. You may have some success with an alternative driver such as http://www.versiontracker.com/dyn/moreinfo/macosx/13443
    USB Overdrive which has many more options than Apples's mouse driver.
    G4 Sawtooth, 400MHz (upped to 1.1 GHz), 1.2GB   Mac OS X (10.4.9)   120 GB HD, ATI Radeon 9000, DVR-105

  • Plot chart problem

    Hi experts,
        In plotchart using cirlcular item renderer am getting full details.But instead of that one using customItemRenderer am unable to get full details.This is my customItemRender(CirlceFileRenderer ) action script class file
    package
        import flash.display.Graphics;
        import mx.charts.series.items.PlotSeriesItem;
        import mx.core.IDataRenderer;
        import mx.skins.ProgrammaticSkin;
        public class CirlceFileRenderer extends ProgrammaticSkin implements IDataRenderer
            public function CirlceFileRenderer()
            private var _chartItem:PlotSeriesItem;
            public function get data():Object
                return _chartItem;
            public function set data(value:Object):void
                _chartItem = value as PlotSeriesItem;
                invalidateProperties();
            override protected function updateDisplayList(unscaledWidth:Number,unscaledHeight:Number):void
                super.updateDisplayList(unscaledWidth, unscaledHeight);
                var g:Graphics = graphics;
                g.clear();
                var col:Number = 0;
                var x:Number = 0;
                var y:Number=0;
                //if(_chartItem!=null)
                var obj:Object = _chartItem.item as Object;
                //col = getColor(obj.Color as Number);
                x= obj.Xdata as Number;
                y=obj.Ydata as Number;
                g.beginFill(col);
                trace("X :"+x+" Y :"+y);
                trace("_chartItem.x:"+_chartItem.x+" _chartItem.y :"+_chartItem.y);
                g.drawCircle(_chartItem.x,_chartItem.y,1);
                //g.drawCircle(x,y,1);
                //g.drawRect(_chartItem.x,_chartItem.y,unscaledWidth,unscaledHeight);
                // g.drawRect(x,y,1,2);
                g.endFill();
            public function getColor(x:Number):Number   
                if(x < 0.0)
                    return 0x000000;
                else if (x < 0.125)
                    return 0x000088;
                else if (x < 0.375)
                    return 0x0000FF;
                else if (x < 0.625)
                    return 0x00FFFF;
                else if (x < 0.875)
                    return 0xFFFF00;
                else if (x <= 1.0)
                    return 0x880000;   
                else
                    return 0xFFFFFF;   
    Flex action script code is like this:
    private function handleResult(event:ResultEvent):void
                    temparray = event.result as Array;
                    for(var i:int =0;i<256;i++)
                        var ta:Array = new Array();
                        var ar:Array = new Array();
                        ar = temparray[i];
                        for(var j:int = 0;j<288;j++)
                        //    trace("a["+i+"]["+j+"] -:"+ar[j]+" Color:"+(Math.abs(ar[j])-131) / 20);
                            ta.push({Xdata:i,Ydata:j,Color:(Math.abs(ar[j])-131) / 20  });
                        var ps:PlotSeries = new PlotSeries();
                        ps.xField = "Xdata";
                        ps.yField = "Ydata";
                        //ps.radius = 1;
                        ps.setStyle("itemRenderer",new ClassFactory(CirlceFileRenderer));
                        ps.dataProvider = ta;
                        newarr.addItem(ps);
                    chart.series = newarr.toArray();       
    Am unable to find the problem.I didn't get full details in plot chart.
    Please tell me this is urgent requirement....

    Hi,
    what info you didn't get?
    try this
    public function set data(value:Object):void
                _chartItem = value as PlotSeriesItem;
              super.data = value;
                invalidateProperties();

  • Charting / custom plot chart advice?

    Hi, I'm trying to build a customized chart in Flex that might
    be a bit over my current skill level so I was hoping I could get a
    tip how to approach this. Essentially it will be a plot chart with
    an associated data table. The plot chart will have only one series
    of data but each point on the chart shall indicate a range. Instead
    of having two dots on the chart (2 series) that indicate the lower
    and higher bound, I want to have, in essence, two dots that are
    joined by a wide long bar. If that's too hard I might go for just a
    thick bar going from lower bound to upper bound. I believe this
    should be done with just one data series indicating the upper and
    lower value because both values really belong together. The user
    would click anywhere on that bar to select it. So there is only one
    item to interact with per point and therefore there is also only
    tooltip for both. The bars are not evenly spaced out but based on
    date information, so I'd use a Data-Time axis horizontally and a
    regular linear axis vertically.
    I believe the right way to build this is a custom renderer
    for the actual datapoint and that's where I was looking for a
    tip/advice. Is that hard to do? Is there some classes that I can
    tweak into doing that for me without writing custom components or
    such?
    The other thing I want to achieve (after I solved this one)
    is to have a data grid associated with the chart. When one data
    item is clicked in the chart, the corresponding row in the table
    gets highlighted, and vice versa, if the user clicks a row in the
    table, the corresponding chart item is highlighted. I think that's
    doable too, it's just a bit tricky with how the events are flying
    around I think. But, as I said, first I need to figure out the
    chart.
    If anybody has some advice how I should approach that I sure
    would appreciate it. I experimented around with Bubble charts over
    a category axis for a while but I think it really should be done
    with a plot chart over a time axis and maybe a custom renderer for
    the data point.
    Thanks a bunch!
    Andreas

    Hi AndreasD,
             Can you please  let me know if  you were able to get solution to the below querry. My curent requirement is very close to what you have specified in the querry
    Regards
    Kalavati Singh
    [email protected]

  • HT2845 why doesn't my mighty mouse track ball scroll up or down vertically?

    why doesn't my mighty mouse track ball scroll up or down vertically?

    Hi:
    New ones are not that expensive, but I would try running it up and down (vigorously) on microfiber cloth or a towel or something.
    If that does not fix it...yes I would buy a new one.  I like wireless ones anyway
    Barry

  • Mighty mouse - tracking sluggish w/ new MacPro

    Set up a new MacPro w/ AirPort and BT with the Apple BT KB and Mighty Mouse. Arrived with dead batteries. With fresh batteries in my office mouse tracked fine. At new location, tracking now unusable. MacPro doesn't seem to support ext antenna for AP or BT, so is there any possible remedy for this poor signal/tracking?
    MacPro 2x2.6GHz, 4GB ram, Radeon X1900, 2x500GB SATA HD. MacOS X 10.4.8.
    Thanks

    Dear poor friend,
    I am facing the same very problem here. It started last monday when I updated the OS and the system requested to restart. I restarted it and then Voala!!! My Magic mouse stopped tracking. Like you I can scroll, click, perform some gestures... but thats all.
    I still have 8 months of warranty and as I discussed with "Apple Care Specialist" I should reinstall the Mac OS X overlapping the current system. I did that and nothing..... Then he recomnended me to take my mac to a service center.
    I live in Brazil and here the Service Center system is always down. I tried to take my MacPro there three times (iPlace in Shopping Ibirapuera) and I always heard that the system was down and they didnt even try to check it.
    So I called the Apple Care Again, this time the Super Advanced Specialist told me to FORMAT my disk and reinstall the system once more.... I had no option and I lost everything in this process....
    My mouse worked for few minutes and then..... Ta daaaa!!!... it stopped again...
    Then this super Advanced Specialist said that this problem might be related to the firmware and only Service Center can give a look...
    That means... DEAD END for me...
    I was an apple maniac fanboy until today... I cannot accept that my mouse is not working...
    APPLE, please, release a patch to fix this problem to occur again. Fix my Mac without the need to bring it to a Service Center.!!!
    Best Regards,
    Disappointed client.

Maybe you are looking for

  • Please send some Important Quetions from REPORTS

    i have a interview in TCS Please send some Important Quetions from REPORTS,SMARTFORMS,ALE/IDOC's

  • ITunes opens when I click help in Power Point

    I was changing format on a video and now anytime I click help in MS Power Point, iTunes opens.  Help!

  • Using an external controller with GB

    I have Pro Tools LE with the Mbox on my G5 and I'm trying to get Garage Band to play through my monitors with an external controller.. Help!!! I can't get it to work...

  • Proper steps to Add/Remove SP Solutions/Features

    Hello SharePoint Fam, I am still kind of lost on deploying/removing sharepoint featuers/solutions from the farm fully and want to try get understanding once and for all on totally cleaning or deploying a feautre/solution to try and keep clean environ

  • Audigy 2 ZS and AC97 Sound

    Hi, i got the MSI K8TNeo. I want to use to soundcards, the onboard sound and my audigy 2 ZS, but anytime i stick the audigy on the board, the onboard sound in windows is disabled. I got no conflict but i cannot choose the on board sound only the audi