|
ImageMap |
Posted by John on May-11-2013 15:12 |
|
Hi Peter Kwan,
How to change my mouse cursor to handshaped cursor on entering the Hotspot in vc++.
Thanks,
John. |
Re: ImageMap |
Posted by John on May-13-2013 20:58 |
|
Hi Peter Kwan,
I got it how to change mouse cursor to hand shaped.
I have a scatter layer for which I have created an image map.
And iam able to move the data point to some other point on my plot area at run time
through mouseclickevents.
But now I want to go on updating my scatter layer as the mouse moves along the plot area and draw the final layer once the mouse is released.
Please suggest me a way to do so.
Thanks in advance.
John. |
Re: ImageMap |
Posted by Peter Kwan on May-14-2013 00:01 |
|
Hi John,
If you are using auto-scaling, when you change one data point, the axis scale can change. For example, when a point is moved close to or exceed the axis scale, ChartDirector will automatically rescale the axis to make data points with the axis scale. If the axis is re-scaled, all data points moves in the chart image.
I assume you do not want the axis scale to change when you are dragging the data point, so you need to modify the charting code to not use auto-scaling while dragging. To do this, when you first draw the chart (which uses auto-scaling), after displaying the chart, please saved the x-axis and y-axis range (use Axis.getMaxValue and xis.getMinValue). Subsequently, when the data point is being dragged and your code redraws the chart, please use the saved range (use Axis.setLinearScale to configure the axis to the saved range). This keeps the axis range unchanged when the data point moves.
To implement dragging a data point:
(a) In the MouseDownHotSpot event handler, remember which point the user has clicked and remember the mouse coordinates.
(b) In the regular MouseMove (not the MouseMoveHotSpot) event handler, if the user has clicked on a data point and the mouse button is still down, please compute the amoutn of mouse movement. You can then determine the amount that the mouse has moved and compute the new data point position. Then update your data array and redraw the chart (without using auto-scaling).
(c) In the MouseUp event handler, "forget" which point the user has clicked (so that subsequent MouseMove will no longer move the point).
Hope this can help.
Regards
Peter Kwan |
|