Editing the Line series at runtime
Posted: Tue Aug 31, 2010 2:12 pm
Hi,
I am trying to implement editing of editing of line series(with stairs enablied) at run time, i.e. user can add new points to the line series and can edit the value of existing point by dragging them. The whole functionality can be explained as follows:
1. If user clicks mouse somewhere on chart (not on series), a new point at the clicked location is added to the series.
2. To edit the value of particular point, user presses mouse on the pointer of that point and then drags the mouse. The point changes its location with changing position of mouse pointer.
I am using Series.Clicked(point) method on mouse down event of chart to get the index of the point on which mouse is pressed to drag the point.
The problem is, Series.Cicked(point) method returns the index even if the mouse is pressed down on the connecting line between two pointers. I want that, it should return index only when mouse is pressed on pointer of series not on the connecting line. I want this because of one more functionality explained below:
When user presses mouse on the connecting line between two pointers, he/she can drag the line horizontally if the line is vertical or vertically if the line is horizontal, that in turn will change the X value or Y value of the associated point.
Kindly provide some solution to this problem.
Waiting for your reply.
Thanks & Regards
Yatendra
I am trying to implement editing of editing of line series(with stairs enablied) at run time, i.e. user can add new points to the line series and can edit the value of existing point by dragging them. The whole functionality can be explained as follows:
1. If user clicks mouse somewhere on chart (not on series), a new point at the clicked location is added to the series.
2. To edit the value of particular point, user presses mouse on the pointer of that point and then drags the mouse. The point changes its location with changing position of mouse pointer.
I am using Series.Clicked(point) method on mouse down event of chart to get the index of the point on which mouse is pressed to drag the point.
The problem is, Series.Cicked(point) method returns the index even if the mouse is pressed down on the connecting line between two pointers. I want that, it should return index only when mouse is pressed on pointer of series not on the connecting line. I want this because of one more functionality explained below:
When user presses mouse on the connecting line between two pointers, he/she can drag the line horizontally if the line is vertical or vertically if the line is horizontal, that in turn will change the X value or Y value of the associated point.
Kindly provide some solution to this problem.
Waiting for your reply.
Thanks & Regards
Yatendra