Logarithmic, TeeMsg_AxisLogNotPositive and AdjustMaxMin
Posted: Mon Feb 06, 2006 12:49 pm
Hello
İf AChartAxis.Minimum or AChartAxis.Maximum is already negative (not
Automatic).
setting AChartAxis.Logarithmic:=true;
raises TeeMsg_AxisLogNotPositive exception.
In procedure:
Procedure TChartAxis.SetLogarithmic(Value:Boolean);
Begin
if Value and IsDateTime then
Raise AxisException.Create(TeeMsg_AxisLogDateTime);
if Value then
begin
{
in AdjustMaxMin
FLogarithmic is false, but value is true.
I want to set Logarithmic is true.
But IMinimum and IMaximum do not change, even if IMinimum is less than
zero.
I think no exception should raise.
Just make IMinimum:=0, if IMinimum<0 (as Automatic)
}
AdjustMaxMin;
if ((IMinimum<0) or (IMaximum<0)) then
Raise AxisException.Create(TeeMsg_AxisLogNotPositive);
end;
ParentChart.SetBooleanProperty(FLogarithmic,Value);
SetCalcPosValue;
end;
İf AChartAxis.Minimum or AChartAxis.Maximum is already negative (not
Automatic).
setting AChartAxis.Logarithmic:=true;
raises TeeMsg_AxisLogNotPositive exception.
In procedure:
Procedure TChartAxis.SetLogarithmic(Value:Boolean);
Begin
if Value and IsDateTime then
Raise AxisException.Create(TeeMsg_AxisLogDateTime);
if Value then
begin
{
in AdjustMaxMin
FLogarithmic is false, but value is true.
I want to set Logarithmic is true.
But IMinimum and IMaximum do not change, even if IMinimum is less than
zero.
I think no exception should raise.
Just make IMinimum:=0, if IMinimum<0 (as Automatic)
}
AdjustMaxMin;
if ((IMinimum<0) or (IMaximum<0)) then
Raise AxisException.Create(TeeMsg_AxisLogNotPositive);
end;
ParentChart.SetBooleanProperty(FLogarithmic,Value);
SetCalcPosValue;
end;