Hi Doug. It definitely can be done, without too much difficultly, although the charts don't support interactive modelling out of the box. When writing a typical drag/move interface for a UI, you usually do something like this: - add a mouseDown handler to something. - on mouseDown... - add a mouseMove/mouseUp handler to the systemManager (on capture). - record the thing that was clicked on - record the thing's starting point - record the mouse's starting point. - on mouseMove (of the systemManager listener) - figure out the delta between the mouse position, and the starting mouse position - add that to the thing's starting position - slam that into the thing's new position. - stop processing on the mouseMove (so it doesn't go to other components by accident). - on mouseUp - do the same stuff as mouseMove - remove your event listeners from the system Manager For a chart item, the process is basically the same, except you're working in data values. That means... - you've already got the thing's starting coordinates, which are the values in the dataProvider that are being charted. - you should record your mouse position in data coordinates, using the chart's localToData() function. - in your mouseMove, when you calculate the difference between the starting mouse (data coordinates) and updated mouse (data coordinates), you have to think about what type of axes you have in your chart. For a linear axis, no problem. But if you want to drag left/right between categories, you probably can't calculate deltas/additions. On the other hand, for categories, that's probably not necessary...you just assign the current category of the mouse (from localToData()) to the item. - when you assign the new values back to the item from the dataprovider (on mousemove), you'll need to let the chart know the data has been changed. If you're using collections, there's an API on the collection to alert lilsteners that something has changed...if you're using raw Arrays or XML, you'll need to force an update (i.e., try re-assigning the chart's dataProvider property). Ely.
________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Doug McCune Sent: Tuesday, January 30, 2007 9:15 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Gantt Chart OK, so here's a question for Ely or some chart experts. Let's say you wanted to create an editable chart, like a Gantt chart that let you drag the regions. Is there any obvious way to go about doing this using the chart classes? What I'm thinking is using Andrew Trice's idea of a DataGrid with custom renderers. That way you can have a custom itemRenderer to display the data, then use a custom itemEditor to actually allow the user to slide the region and adjust the data. I haven't seen that type of support for itemEditor stuff in the charting components. Is that true, or am I just overlooking it? Doug Nate Pearson wrote: I think that's it! thanks so much! Thanks Ely!! On 1/29/07, Kazi Faisal <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote: Hello there!!! Please take a look at this link: http://demo.quietlyscheming.com/ChartSampler/app.html <http://demo.quietlyscheming.com/ChartSampler/app.html> under Series Type --> Columns and Bars --> Floating Bars I believe that you can use this floating bar as Gantt chart, as I did. GOOD LUCK BY THE WAY THIS IS ELY'S WORK, SO THE CREDIT GOES TO HIM!!! :-))) On 1/29/07, Nate Pearson < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote: Hello, I'm looking for a Gantt chart tool. I have read Andrew Trice's article at http://www.cynergysystems.com/blogs/page/andrewtrice?entry=gantt_charts_ in_flex_datagrids <http://www.cynergysystems.com/blogs/page/andrewtrice?entry=gantt_charts _in_flex_datagrids> and I will use that if I don't find another solution. I don't need to draw dependencies. I'm actually going to use it to build a product roadmap. When I add series I would like animations to display. Sorry if this question has been asked a lot. I've googled it for two days now and haven't found a real solution. I herd that back in Nov 2004 that someone showed a Gantt chart example "that was completely interactive with drag and drop" capabilities. http://www.richinternet.de/blog/index.cfm?entry=0539CEAE-91C9-CD8F-05566 45BE7952887 <http://www.richinternet.de/blog/index.cfm?entry=0539CEAE-91C9-CD8F-0556 645BE7952887> After searching through this mailing list it seems that Ely was working on something? His name came up in about every Gantt chart mail string i read. Thanks SO much for your help, Nate