![]() | Steema Issues DatabaseNote: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;otherwise you can use StackOverflow. Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy. |
| Summary: | line series tool NearestPoint never fired on a zero YValue point | ||
|---|---|---|---|
| Product: | .NET TeeChart | Reporter: | truthtracer |
| Component: | Tools | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | RESOLVED NOTABUG | ||
| Severity: | major | CC: | chris |
| Priority: | --- | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| Chart Series: | FastLine | Delphi / C++ Builder RAD IDE Version: | |
| Attachments: | sample project | ||
Internally TeeChart uses the Rectangle.Contains method ( https://docs.microsoft.com/en-us/dotnet/api/system.drawing.rectangle.contains?view=netframework-4.7.2 ) to determine whether to include a series point into the nearestpoint calculation or not. However, this method returns false when the point is touching the rectangle boundary. To counteract this we can increase the size of the rectangle, e.g. series.FillSampleValues(10); series.YValues[2] = 0; series.YValues[4] = 1; tChart1.Axes.Left.MinimumOffset = 1; //<- offset one pixel The nearesttool now detects the point at 0 (zero). tChart1.Axes.Left.MinimumOffset = 1 Works. Thanks very much ! |
Created attachment 844 [details] sample project tchart version 2018.05.04 1. create a tchart control, add tool NearestPoint and a fast line series 2. series.FillSampleValues(10), then set some points YValue to 0 set marks visible to see clearly, the NearestPoint tool never fired on these YValue = 0 points plz see the attachment project