Hi,
I use Tchart 8 professional.
I set the decimal to a fix one e.g LeftAxis.AxisValuesFormat:=0.0
If I zoom the axisvalue is always the same : for e.g. 1.1/1.1/1.1
So what can I do, that the format changes so that the last digit is different.
Example : I zoom -> the axis is 1.11/1.12/1.13
I zoom more the axis is 1.111/1.112/1.113 and so on
with best regards
Werner
decimals on axis
Re: decimals on axis
Hi Werner,
By default, the AxisValuesFormat is '#.##0,###'. But you can change it as you want adding more decimals if you need them.
You even could calculate the string in the OnZoom event to add more or less decimals. It could be something similar to this:
By default, the AxisValuesFormat is '#.##0,###'. But you can change it as you want adding more decimals if you need them.
You even could calculate the string in the OnZoom event to add more or less decimals. It could be something similar to this:
Code: Select all
procedure TForm1.Chart1Zoom(Sender: TObject);
var Range: Double;
i: Integer;
valueFormat: String;
begin
Range:=(Chart1.Axes.Bottom.Maximum-Chart1.Axes.Bottom.Minimum);
Chart1.Draw;
valueFormat:='#,##0.#';
i:=1;
while ((Range / Chart1.Axes.Bottom.Items.Count) * (i*10) < 1) do
begin
Inc(i);
valueFormat:=valueFormat+'#';
end;
Chart1.Axes.Bottom.AxisValuesFormat:=valueFormat;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |