it would be fine to have a method "AddRangeWithoutBorder", I think it should not be too difficult to implement.
Currently,
TIntervalList is implemented as an ordered list of (closed) non-overlapping intervals.
AddRange procedure automatically maintains these properties, which is important for efficient drawing.
To include open (and half-open) intervals, the data structure and logic should be correspondingly updated.
Not too hard, but not quite trivial either.
Notes on the last tutorial changes:
1) Meaning of then
Epsilon property is different. I have added it to the documentation:
http://wiki.lazarus.freepascal.org/TAChart_documentation#Function_series2) Dynamic update of the function domain has some pitfalls:
2.1) It is better to use
CurrentExtent, not
LogicalExtent, because otherwise part of the series drawn over margins may not receive domain exclusion
2.2) I'd suggest using a single loop:
procedure TForm1.UpdateDomainExclusions;
var
ex: TDoubleRect;
x: Integer;
begin
ex := Chart1.CurrentExtent;
Chart1.DisableRedrawing;
try
with FuncSeries.DomainExclusions do begin
Clear;
for x := Floor(ex.a.x / Pi - 0.5) to Ceil(ex.b.x / Pi + 0.5) do
AddPoint((x + 0.5) * Pi);
end;
finally
Chart1.EnableRedrawing;
end;
end;
2.3) Using
OnExtentChanged is suboptimal. This event is called after the chart is drawn. The reason it works is that changing of domain exclusions initiates a redraw.
The reason it does not hang is that domain exclusions do not affect logical extent (unless
ExtentAutoY = true. tAll in all, too brittle to recommend in tutorial.
Currently, you can use
OnDrawBackWall event, although I admit it is not intuitive.
--