Leftmost point is out of sight, rightmost is drifting to the left, worse with increased zoom. I print the xmin, xmax and line coordinates in the statusbar as it is recalculated (for debugging), it looks quite right, but the three horizontal lines slip away to the left. ![]() When scrolling, the labels follow.But when I zoom in, something is lost. I solved it with having a timer started when first dataseries is redrawn, and then resetting the three labelseries with the chart's new xmin, mid, xmax. These labels must sit at xmin, mid and xmax even when scrolling. Labels are togglable in order not to clutter data. The idea is to show three red limit lines(three 3-element lineseries), and labels at far left, middle and far right showing Yvalue limits. The OnZoom event is triggered whenever zoom is applied to a Chart, either manually or programmatically: procedure TForm1. using Rect () ), you will be able to use the PtInRect () function to test whether the point is within the zoomed rectangle: if PtInRect (ZoomedRect, ChartPoint) then. with the help of the Point () function) and the view area as a TRect (e.g. It works very fine.Now I want to add up to three horizontal 'warning'-lines, each with up to three togglable labels. If you can represent any point from the series as a TPoint structure (e.g. ![]() ![]() So I have this fine legacy Delphi 5 project with a tchart with vertical bars along a datetime bottomaxis.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |