Still I am not sure that I understand what the Extent property actually does, while CurrentExtent and LogicalExtent are clear.
Wiki says only: Fixed extent -- determined by TChart.Extent property. May override full extent calculation partially or fully.
What I am trying to do is:
When I click on the upper or the lower displayed value in a chart to have a text box exactly on the text value a text box to appear over the value. When I write the value, the LogicalExtent shall change to the given value (the same shall be done for the X axes, too).
Here are some of the issues to be solved:
1. I shall forbid the chart to autosize. Probably I shall
Chart1.LeftAxis.LogicalExtent [4]:= NewYmax; //This line won't work directly, it is just for example
Chart1.Extent.Ymax:= NewYmax; //Probably I shall use this to prevent auto scale, when I drag or zoom only horizontally ???
Chart1.Extent.UseYmax:= True;
Regarding this clause, I got to the point with the Ymax < Ymin issue, so I posted here.
In fact, there is a problem, that sometimes when I use Chart1.LeftAxis.LogicalExtent [4]:= NewYmax; the absolute value that is really used is higher.
I have not yet found the exact reason for that behaviour, but here is the case:
When I have one LineSeries on the chart everything is fine.
If I have more then one LineSeries (currently I use cursors as separate line series, each
lineseries containing one point only, though I intent to switch to one series, with several
points). The indexes of the cursors are before the index of the actual curve.
So when I have a cursor if the value of the cursor is positive, when I do
Chart1.LeftAxis.LogicalExtent [4]:= 5000; the actually displayed axis value is higher,
i.e. 6231,2576546.
In the same time there is not problem with Chart1.LeftAxis.LogicalExtent [2]:= -5000;
but if the cursor has a negative value, then I star having the same problem with
LogicalExtent [2]. So far I cannot post the code, but maybe this sounds you familiar.
I have to mention that I have set all margins to 0;
2. I have no idea where the upper and the lower values are located on the screen.
3. I have to handle the cases when Ymax < Ymin. Probably that is the time, where I could have some more questions or proposals.