Would it be possible for you to give me a short example of adding the
event in this manner?
 
The only syntax I am familiar with is as follows:
 
columnChart.addEventListner (ChartItemEvent.ITEM_CLICK,myListener);
 
but this, I think, is only for adding events to object that already have
event types defined.
 
thanks for your time!
 
brad

-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of JWOpitz
Sent: Tuesday, February 05, 2008 10:22 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Adding Event to Object that doesnt have one



Well to answer your first question: "How do I add events to an item
that does not have any?" - your object can implement the
IEventDispatcher interface or you can extend EventDispatcher. Either
way is the only way that you are going to get your object to be able
to make use of the Flash Player's event system.

I really can't answer your second question with any authority since I
haven't done much with Flex Charts. I think from what code I did have
to work on, it was pretty much a situation where you retrieve the x,y
coords of the mouse relative to the whole chart. I could be wrong at
various points but I think that is the only way I have seen it done.

Justin

--- In [EMAIL PROTECTED] <mailto:flexcoders%40yahoogroups.com>
ups.com, "Brad Bueche" <[EMAIL PROTECTED]> wrote:
>
> I'm new to flex so there may be an obvious way to do this that I am
> missing.
> 
> In my charts, my users want to drill down from the month view to the
> days of month view by clicking on the month name (categoryAxis,
> categoryfield) for the horizontal axis.
> 
> However, from what I can see CategoryAxis has no mouse events (or any
> other events) associated with it. So my question is specific but may
> have broad application.
> 
> 1. How do I add events to an item that does not have any?
> 2. How do I associate this event with a layout on the screen where the
> object seemingly keeps no reference to position?
> 
> The only thing I can think of is pursuing looking at the fully
rendered
> chart, figuring out x and y coordinates of the items (from an eyes on
> view), and then making areas of the screen clickable (and able to
> generate events). This does not seem very generic though and seems
> heavily dependent up on eyes on the screen (which seems fraught with
> peril to me).
> 
> Suggestions? 
> 
> Since I'm new to flex, it would really help me if the answer could be
> tied specifically to the categoryAxis issue thats stumping me.
> 
> brad
>



 

Reply via email to