I was using Teechart v7 so far but now we bought version 8.
I have some charts with logarithmic bottom axis (choose between log or lin) and in version 7 I set Logarithmic to true and if I delete all BottomAxis.Items (clear) and set increment to 0 everything works ok. Now in version 8 this doesn't work anymore.
On zoom/undo zoom I am redrawing scale using code (RedrawGrid on Zoom/UndoZoom)
Code: Select all
with Chart.BottomAxis do
begin
tmpIncrement := Abs(Minimum - Maximum)/10;
Items.Clear;
tmpValue:=Minimum;
while tmpValue <= Maximum do
begin
with Items.Add(tmpValue) do
begin
Text := Format('%5.2f' ,[tmpValue]);
Font.Color := clSilver;
end;
tmpValue:=tmpValue+tmpIncrement;
end;
if FFFTXScaleType = atLog then
Items.Clear;
end;
with Chart.LeftAxis do
begin
tmpIncrement := Abs(Minimum - Maximum)/10;
Items.Clear;
tmpValue:=Minimum;
while tmpValue <= Maximum do
begin
with Items.Add(tmpValue) do
begin
Text := Format('%5.2f' ,[tmpValue]);
Font.Color := clSilver;
end;
tmpValue:=tmpValue+tmpIncrement;
end;
end;
Code: Select all
Title.Caption := 'Frequency (Hz)';
Logarithmic := true;
MinorTickCount := 8;
MinorGrid.Visible := true;
MinorGrid.Style := psDot;
MinorGrid.Color := clGray;
Grid.Style := psDot;
AxisValuesFormat := '00e-0';
LabelsExponent := true;
FMin := 0;
FMax := 1e6;
SetMinMax(FMin, FMax);
Increment := 0;
Thank you for your help.