Region.IsChartPoint in ChartRegionMouseEventArgs shows wrong
Hi,
Iam using Region.IsChartPoint of ChartRegionMouseEventArgs in chartControl it works fine when i place the cursor near the point provided in line chart. But it also says true if i place the mouse cursor in middle of curve between two points. I have attached a sample which displays the mouse cursor as cross hair along with the point value. Please place the mouse cursor in middle of two points, you could see the cursor change to cross hair and tooltip displaying the point. But this should happen only if the mouse is near a point in the series provided.
Please point out where iam going wrong ?.
Iam using Region.IsChartPoint of ChartRegionMouseEventArgs in chartControl it works fine when i place the cursor near the point provided in line chart. But it also says true if i place the mouse cursor in middle of curve between two points. I have attached a sample which displays the mouse cursor as cross hair along with the point value. Please place the mouse cursor in middle of two points, you could see the cursor change to cross hair and tooltip displaying the point. But this should happen only if the mouse is near a point in the series provided.
Please point out where iam going wrong ?.
GraphDrag.zip
SIGN IN To post a reply.
6 Replies
AD
Administrator
Syncfusion Team
September 18, 2006 12:37 PM UTC
Hi Ashok,
Thank you for choosing Syncfusion products.
The ChartRegionMouseHover Event Occurs when the mouse pointer hovers over the Chart region not on the particular pointIndex.
You can display the Tooltip by clicking on the PointIndex using following code snippet in the ChartRegionClick Event :
if(e.Region.PointIndex==0)(e.Region.PointIndex==1)||(e.Region.PointIndex==2)||(e.Region.PointIndex==3)||(e.Region.PointIndex==4)||(e.Region.PointIndex==5)))
{
if(isDragging)
{
this.Cursor = Cursors.Cross;
double newX = Math.Round(GetXValueForScreenPoint(Control.MousePosition),2);
double newY = Math.Round(GetYValueForScreenPoint(Control.MousePosition),2);
toolTip1.SetToolTip(chartControl1, newX +", "+newY);
}
else
{
if(this.Cursor != Cursors.Default && !this.isDragging)
{
this.Cursor = Cursors.Default;
}
}
}
Kindly let me know if this helps.
Regards,
Jaya
JS
Jst
September 19, 2006 06:20 AM UTC
Hi Jaya,
Thank you for the quick reply. I hope i dint clearly explain what the problem was. i would like to explain with the example scenario with the sample i have provided in the post above.
In the sample above have lots of series points let us take the first two points (0,0) and (1,2). A line joins these two points. Now placing the mouse over the end points (i.e on 0,0 and 1,2) will make the mouse cursor to cross hair and display the tooltip. Place the cursor anywhere in the connecting line will have the default cursor which doesnt diplay any tooltip, Until now everything is OK. Now place the cursor exactly in point 0.5,1 (i.e where the line crosses y axis horizontal gridline of value 1) you could see the cursor change to cross hair and display tooltip. As you said the Mouse Hover fires when your mouse cursor is in chart area and not on series points,exactly true, But why did the same scenario dint happen anywhere else in the connecting line and exactly only at the centre of any of the connecting lines ?.
Thank you for the sample to handle the scenario by click event but my graph doesnt know how many points it has and i have to indicate the user whether that particular point is draggable only on hover of mouse cursor (Where i will evaluate a point based on certain rules and allow/disallow drag, which will be indicated by change of mouse cursor, all these happens before user clicks on a point).But now the middle point on any connecting line changes the cursor to cross hair it makes user to assume that its a draggable point.
Please let me know if my explanation is clear to understand the Region.IsChartPoint exhibiting a different behaviour only in middle of connecting curve between two points.
Thank you for the quick reply. I hope i dint clearly explain what the problem was. i would like to explain with the example scenario with the sample i have provided in the post above.
In the sample above have lots of series points let us take the first two points (0,0) and (1,2). A line joins these two points. Now placing the mouse over the end points (i.e on 0,0 and 1,2) will make the mouse cursor to cross hair and display the tooltip. Place the cursor anywhere in the connecting line will have the default cursor which doesnt diplay any tooltip, Until now everything is OK. Now place the cursor exactly in point 0.5,1 (i.e where the line crosses y axis horizontal gridline of value 1) you could see the cursor change to cross hair and display tooltip. As you said the Mouse Hover fires when your mouse cursor is in chart area and not on series points,exactly true, But why did the same scenario dint happen anywhere else in the connecting line and exactly only at the centre of any of the connecting lines ?.
Thank you for the sample to handle the scenario by click event but my graph doesnt know how many points it has and i have to indicate the user whether that particular point is draggable only on hover of mouse cursor (Where i will evaluate a point based on certain rules and allow/disallow drag, which will be indicated by change of mouse cursor, all these happens before user clicks on a point).But now the middle point on any connecting line changes the cursor to cross hair it makes user to assume that its a draggable point.
Please let me know if my explanation is clear to understand the Region.IsChartPoint exhibiting a different behaviour only in middle of connecting curve between two points.
AD
Administrator
Syncfusion Team
September 25, 2006 04:48 AM UTC
Hi Ashok,
Sorry for the delay in updating you.
I was able to reproduce the mentioned issue i.e middlepoint between the two points was also shown as the PointIndex while using Tooltip.
Please try the attached sample which helps you to display the PointIndex correctly which I achieved through PrepareStyle Event.
But I was not able to control the dragging effect on the middlepoint. I am still working on this and let you know at the earliest once it is resolved.
Thank you for your patience.
Regards,
Jaya
GraphDrag0.zip
Sorry for the delay in updating you.
I was able to reproduce the mentioned issue i.e middlepoint between the two points was also shown as the PointIndex while using Tooltip.
Please try the attached sample which helps you to display the PointIndex correctly which I achieved through PrepareStyle Event.
But I was not able to control the dragging effect on the middlepoint. I am still working on this and let you know at the earliest once it is resolved.
Thank you for your patience.
Regards,
Jaya
GraphDrag0.zip
AD
Administrator
Syncfusion Team
October 10, 2006 02:41 PM UTC
Hi Ashok,
Sorry for the delay in updating you.
I created a bug report with increased priority on controlling the dragging effect of the middle point of the line chart and let you know at the earliest once it is fixed.
Thank you for your patience.
Regards,
Jaya
RF
Rashidha F
Syncfusion Team
June 28, 2007 03:17 AM UTC
Hi Ashok,
My apologies for the delay in responding to you.
I have received the following comment from the developer. "The above mentioned behavior is not an issue. It's an expected behavior. When we hover the middle of the line the nearest left value is displayed."
Thanks for your patience.
Regards,
Rashidha.
My apologies for the delay in responding to you.
I have received the following comment from the developer. "The above mentioned behavior is not an issue. It's an expected behavior. When we hover the middle of the line the nearest left value is displayed."
Thanks for your patience.
Regards,
Rashidha.
RF
Rashidha F
Syncfusion Team
June 28, 2007 03:20 AM UTC
Hi Ashok,
My apologies for the delay in responding to you.
I have received the following comment from the developer. "The above mentioned behavior is not an issue. It's an expected behavior. When we hover the middle of the line the nearest left value is displayed."
Thanks for your patience.
Regards,
Rashidha.
My apologies for the delay in responding to you.
I have received the following comment from the developer. "The above mentioned behavior is not an issue. It's an expected behavior. When we hover the middle of the line the nearest left value is displayed."
Thanks for your patience.
Regards,
Rashidha.
SIGN IN To post a reply.
- 6 Replies
- 3 Participants
-
JS Jst
- Sep 18, 2006 07:44 AM UTC
- Jun 28, 2007 03:20 AM UTC