ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Line drag/drop
Posted by Lofi on Jul-04-2013 23:19
Is it possible to drag/drop lines? Example usage: I have 8 lines and y, y2, y3 as axes. Lines 1 and 2 are on y2 and I'd like to put line 3 now via drag/drop from y to y2, so that y2 gets rescaled.

Thank you very much :-)

  Re: Line drag/drop
Posted by Peter Kwan on Jul-05-2013 22:40
Hi Lofi,

Yes. It is possible, but you would need to develop the exact behaviour with your own code. ChartDirector only provides you with hot spot mouse events (so that you can detect if the mouse is on top of a line). Just other standard Java controls, the mouse events do nothing, but you can implement your own mouse event handler to achieve the effect you want.

For your case, when you code detects that the user clicks on a line, then the mouse moves while the button is still down, then the mouse button is released while the mouse is over the axis, you may redraw the chart with that line now using the axis.

Hope this can help.

Regards
Peter Kwan

  Re: Line drag/drop
Posted by Mark on Jul-14-2013 21:15
I do the same kind of thing for my charts.  Users of my software can drag individual points
of a trace to reshape the line.  The trace only updates, though, after the user completes
the drag operation (i.e., "drop").  The chart does NOT update as the point is being dragged.

Once the drag is complete, the entire chart is recreated and redisplayed with the new trace
position.  This incurs a slight delay in displaying the changes after the "drop".  For this
reason, I wish that ChartDirector could output layers such that only the trace would need
to be redrawn/redisplayed and not the entire chart.  Peter Kwan, should I add this "wish" to
your other (General) forum, or is it already noted through this message?

Mark