Index: components/tachart/tacustomsource.pas
===================================================================
--- components/tachart/tacustomsource.pas (revision 50475)
+++ components/tachart/tacustomsource.pas (working copy)
@@ -252,8 +252,12 @@
begin
with FIntervals do
Result := not (
- (aipUseMinLength in Options) and (AStep < FScale(MinLength)) or
- (aipUseMaxLength in Options) and (AStep > FScale(MaxLength)));
+ (aipUseMinLength in Options) and
+ (TIntegerTransformFunc(FScale)<>nil) and
+ (AStep < FScale(MinLength)) or
+ (aipUseMaxLength in Options) and
+ (TIntegerTransformFunc(FScale)<>nil) and
+ (AStep > FScale(MaxLength)));
end;
procedure TValuesInRangeParams.RoundToImage(var AValue: Double);
@@ -822,7 +826,9 @@
imagePos: Integer;
begin
with AParams do
- if aipUseMinLength in FIntervals.Options then begin
+ if (aipUseMinLength in FIntervals.Options) and
+ (TIntegerTransformFunc(FScale)<>nil) then
+ begin
imagePos := ToImage(AValue);
Result := Abs(imagePos - prevImagePos) < FScale(FIntervals.MinLength);
end;
Index: components/tachart/taintervalsources.pas
===================================================================
--- components/tachart/taintervalsources.pas (revision 50475)
+++ components/tachart/taintervalsources.pas (working copy)
@@ -195,12 +195,13 @@
// However, both minimax and maximin will be achieved on equal steps.
with AParams do
imageWidth := Abs(ToImage(FMax) - ToImage(FMin));
- if aipUseMinLength in Params.Options then
+ if (aipUseMinLength in Params.Options) and (TIntegerTransformFunc(AParams.FScale)<>nil) then
len := AParams.FScale(Max(Params.MinLength, 2))
else
len := 2;
AMaxCount := Max(imageWidth div len, 2);
- if aipUseMaxLength in Params.Options then begin
+ if (aipUseMaxLength in Params.Options) and (TIntegerTransformFunc(AParams.FScale)<>nil) then
+ begin
len := AParams.FScale(Max(Params.MaxLength, 2));
AMinCount := Max((imageWidth + 1) div len, 2);
end