I'm revisiting this PlotChart project after a brief hiatus. Thanks to
Igor's comments and his pointers to Ely's examples, I was able to get
the chartitem selection working.

Now I have a seemingly larger task and I'm not sure where to start.

To recap, I have a PlotChart and a datagrid both bound to the same
datarenderer. Updating the data in the datagrid cells adjusts the
locations of the chartitems on the PlotChart. Selecting a row in the
datagrid highlights the row and selects the corresponding chartitem,
and clicking on a chartitem highlights the chartitem and selects the
corresponding row in the datagrid.

But now I'd like to be able to drag the chartitems directly, and have
any changes in location update the value(s) in the datagrid.
The things that are tripping me up are:

1) I've done some drag/drop functionality in other Flex apps before,
but always from one container to another. This is pretty much just
dragging within the same container (the chart). So I'm not even sure
if it requires the DragManager or not. Maybe it's just using a
MouseMove event to update the location??

2) It's a rather course chart... the y-axis, for example, is just 0 to
10 with pretty wide increments. I'd like to snap the dragging object
to the grid, but there doesn't appear to be any way to determine
what/where the grid is as a property of the chart. Is there a way?

3) And on DragComplete (if it does, indeed, utilize the DragManager),
I need to be able to determine the new coordinates to be able to
update the datagrid. Obviously if I can get #2 solved, seems like this
should fall into place since I'll know the chartitem position already.

Anybody have any comments and/or pointers on any of this? I Googled
all morning and I'm not finding much.

Thanks in advance!
-Carl

Reply via email to