Adobe Dreamweaver Forums



Last 10 THreads :         Re: 2.1 GB TIF size limit (Last Post : Buko - Replies : 0 - Views : 1 )           »          Re: Colour differences on the web (Last Post : Ann_Shelbourne@adobeforums.com - Replies : 0 - Views : 1 )           »          Re: sRGB vs. Adobe (1998) RGB (Last Post : pfigen@adobeforums.com - Replies : 0 - Views : 1 )           »          Re: SFW and date created (Last Post : Ann_Shelbourne@adobeforums.com - Replies : 0 - Views : 1 )           »          help me with adjustments layers in CS4 (Last Post : Ramón_G_Castañeda@adobeforums.com - Replies : 1 - Views : 2 )           »          Snippet Pod Problems (Last Post : Pat@ffic - Replies : 4 - Views : 5 )           »          bad luck (Last Post : newwaveboats - Replies : 0 - Views : 1 )           »          Cannot setup audio with Captivate 2 (Last Post : c..k - Replies : 0 - Views : 1 )           »          Re: Urgent: Can Only Record in Demonstration Mode (Last Post : halyna - Replies : 0 - Views : 1 )           »          Change custom Vector class to new Vector class in player10 (Last Post : VarioPegged - Replies : 1 - Views : 2 )           »         


User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 11-04-2008, 09:00 AM
sayali_d
 
Posts: n/a
Diggs:
Default Moving markers

In a cartesian chart, I have four series, three line and one column series. I
want to show moving markers on all of the four series, when mouse is moved in
chart region. Moving markers like circle...

For that, I am using array of items which I have got through items property of
series object. and with the help of that array I am getting x and y
co-ordinates of each item.

I am then passing these co-ordinates to localToGlobal function on series
object to get global co-ordinates. After this, I am getting the item with
minimum diff between its co-ordinates and the point where mouse is.

But the thing is, I am not getting exact item at the place, where the mouse
is. For whole width of an item on X-axis, i am getting that item when the mouse
is at the middle of that width.
Here is the sample code.....
var arrSeries:Array=(ChartBase)(myPanel.getChildAt(1)) .series;
for(var i:int=0;i<arrSeries.length;i++)
{
var arrItem:Array=arrSeries[i].items;

var flag:int=-1;
var diff:int=100000000000;
for(var j:int=0;j<arrItem.length;j++)
{
arrItem[j].currentState="deselected";
}
for(var j:int=0;arrItem && j<arrItem.length;j++)
{
var p:Point =arrSeries[i].localToGlobal(new
Point(arrItem[j].x,arrItem[j].y));

if(diff>Math.abs(Math.ceil(p.x-event.currentTarget.mou*No thank you*)))
{
diff=Math.abs(Math.ceil(p.x-event.currentTarget.mou*No thank you*));
flag=j;
}
}

if(flag!=-1)
{
showValues(arrSeries[i].yField,arrItem[flag]);
arrItem[flag].currentState="selected";
}

}



Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 11:39 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk