Steema Issues Database

Note: 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.



Bug 2073 - line series tool NearestPoint never fired on a YValue = 0 point
Summary: line series tool NearestPoint never fired on a YValue = 0 point
Status: RESOLVED NOTABUG
Alias: None
Product: .NET TeeChart
Classification: Unclassified
Component: Tools (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- critical
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-15 04:17 EDT by truthtracer
Modified: 2018-08-16 10:50 EDT (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments
sample project (13.63 KB, application/x-zip-compressed)
2018-08-15 04:17 EDT, truthtracer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description truthtracer 2018-08-15 04:17:11 EDT
Created attachment 843 [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
Comment 1 christopher ireland 2018-08-16 10:50:18 EDT
This is because the .NET Framework's Rectangle.Contained method ( https://docs.microsoft.com/en-us/dotnet/api/system.drawing.rectangle.contain ) returns false if the point is touching the boundary of the rectangle.

To remedy this you can add in an extra pixel, e.g.

annotate.TextAlign = StringAlignment.Center;

series.FillSampleValues(10);
series.YValues[2] = 0;
series.YValues[4] = 1;

tChart1.Axes.Left.MinimumOffset = 1; //<- workaround here