Issue with TNearestTool and THorizAreaSeries
Issue with TNearestTool and THorizAreaSeries
Hello,
I am using TChart 2010.01.11004 and just noticed a strange behavior. When moving the mouse over a THorizAreaSeries with a TNearestTool enabled, in some cases the cursor jumps to the last point of the Series although it is over or near another point. To reproduce this error do:
1. Start a new application
2. Drop a TChart and add a THorizAreaSeries
3. Add a TNearestTool
4. Left axis is inverted
5. Fill with some sample data
Can anyone please conform this and let me know of a fix?
Kindest regards
I am using TChart 2010.01.11004 and just noticed a strange behavior. When moving the mouse over a THorizAreaSeries with a TNearestTool enabled, in some cases the cursor jumps to the last point of the Series although it is over or near another point. To reproduce this error do:
1. Start a new application
2. Drop a TChart and add a THorizAreaSeries
3. Add a TNearestTool
4. Left axis is inverted
5. Fill with some sample data
Can anyone please conform this and let me know of a fix?
Kindest regards
Re: Issue with TNearestTool and THorizAreaSeries
Hello johnnix,
I couldn't reproduce your problem using last version of TeeChartVCL. I inform that in download page there are a new version of TeeChartVCL (Build 2011.03.30407). Please update your version and try again if your project persist.
Thanks,
I couldn't reproduce your problem using last version of TeeChartVCL. I inform that in download page there are a new version of TeeChartVCL (Build 2011.03.30407). Please update your version and try again if your project persist.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Issue with TNearestTool and THorizAreaSeries
Hello,
Thank you very much for your email. Unfortunately I am reluctant to update my version but will download the sources and try to figure out if something changed....
Kindest regards
Thank you very much for your email. Unfortunately I am reluctant to update my version but will download the sources and try to figure out if something changed....
Kindest regards
Re: Issue with TNearestTool and THorizAreaSeries
Hello jhonnix,
I inform you that this problems were a bugs with numbers (TV52015282andTV52015313) and we fixed in maintenance release 2010.02 of TeeChartVCL. I think you can take a look in this link where explain, how solve the two bugs. On the other hand, if pervious link doesn't help you to solve your problem with TNearestTool I recommend see in TeeTools.pas concretely in NearestTool.GetNearestPoint function, so is unlikely the problem is here.
I hope will helps.
Thanks,
I inform you that this problems were a bugs with numbers (TV52015282andTV52015313) and we fixed in maintenance release 2010.02 of TeeChartVCL. I think you can take a look in this link where explain, how solve the two bugs. On the other hand, if pervious link doesn't help you to solve your problem with TNearestTool I recommend see in TeeTools.pas concretely in NearestTool.GetNearestPoint function, so is unlikely the problem is here.
I hope will helps.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Issue with TNearestTool and THorizAreaSeries
Hello Sandra,
Thank you very much for your support. Indeed I too traced the error somewhere in the ClickedPoint but my guess is that the error is maybe inside the PointInArea (the code from the link you provided did not solve the problem). Anyway I will keep looking
Kindest regards
Thank you very much for your support. Indeed I too traced the error somewhere in the ClickedPoint but my guess is that the error is maybe inside the PointInArea (the code from the link you provided did not solve the problem). Anyway I will keep looking
Kindest regards
Re: Issue with TNearestTool and THorizAreaSeries
Hello,
Here is an update. The following code works ok but I do not know if it has any impact in any other series. So it is the PointInArea after all
Kindest regards
Here is an update. The following code works ok but I do not know if it has any impact in any other series. So it is the PointInArea after all
Code: Select all
if (Index>=tmpFirst) and ClickableLine then
if CheckPointInLine then // or (FDrawArea and PointInArea(Index)) then
if GetHorizAxis.Inverted then
result:=Succ(Index)
else
result:=Pred(Index);
Re: Issue with TNearestTool and THorizAreaSeries
Hello johnnix,
I think your modification could break the previous behavior. Let me explain:
Having a TLineSeries, when the mouse pointer is over a line, the predecessor index is returned, even if the successor is nearer because it is considered as part of the predecessor point. The same behavior is applied with TBarSeries and TAreaSeries, when the mouse is over a part of the series, the predecessor index is taken even if the successor is nearer.
I've added to the wish list the possibility to add a new property (it could be called AbsoluteNearest for example) that would make the clicked method to return -1 when the mouse is over the area so the TNearestTool will look for the nearest point (TV52015566). So for the area series it would be something like this:
I think your modification could break the previous behavior. Let me explain:
Having a TLineSeries, when the mouse pointer is over a line, the predecessor index is returned, even if the successor is nearer because it is considered as part of the predecessor point. The same behavior is applied with TBarSeries and TAreaSeries, when the mouse is over a part of the series, the predecessor index is taken even if the successor is nearer.
I've added to the wish list the possibility to add a new property (it could be called AbsoluteNearest for example) that would make the clicked method to return -1 when the mouse is over the area so the TNearestTool will look for the nearest point (TV52015566). So for the area series it would be something like this:
Code: Select all
if CheckPointInLine or (FDrawArea and (not FAbsoluteNearest) and PointInArea(Index)) then
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Issue with TNearestTool and THorizAreaSeries
Hello Yeray,
Thank you very much for your reply. I will try to modify my sources in order to include this new property.
Kindest regards
Thank you very much for your reply. I will try to modify my sources in order to include this new property.
Kindest regards
Re: Issue with TNearestTool and THorizAreaSeries
Here is an update, if I set ClickableLine to false then it works ok