Hi,
I've just upgraded from 2021.32.210430 to v2023.39 (231109) which seems to have a y-axis drawing difference.
As the image shows attached the left graph has for example 60.48 on the y-axis while on the previous version this would be 64, 56, 48 etc. Axis min = 0 and max = 65. It draws correctly with more space but if window is small its adding the dp's.
The AxisValueFormat is still the default graph_->LeftAxis->AxisValuesFormat = "###0.###";
I can reduce set ###0 which restricts it but wondering why the values produced are so different ?
Is this an issue with the new VCL TChart ?
v2023.39 (231109) y-axis label issue
v2023.39 (231109) y-axis label issue
- Attachments
-
- tchartCapture.JPG (20.79 KiB) Viewed 22518 times
Re: v2023.39 (231109) y-axis label issue
Hello,
I've tried to reproduce the problem with this simple example code without success.
Do you have a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
I've tried to reproduce the problem with this simple example code without success.
Code: Select all
uses Chart, Series;
var Chart1: TChart;
procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
Chart1:=TChart.Create(Self);
with Chart1 do
begin
Parent:=Self;
Align:=alClient;
Color:=clWhite;
Gradient.Visible:=False;
Walls.Back.Color:=clWhite;
Walls.Back.Gradient.Visible:=False;
Legend.Hide;
View3D:=False;
with AddSeries(TLineSeries) do
for i:=0 to 19 do
Add(Random*65);
Axes.Left.SetMinMax(0, 65);
Axes.Left.Title.Text:='Left axis';
end;
end;
Thanks in advance.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: v2023.39 (231109) y-axis label issue
Thanks Yeray.
I'll have to dig into the code some more to see what is causing the difference and get back to you.
I was assuming exactly the same code base on our side but will dig some more.
I'll have to dig into the code some more to see what is causing the difference and get back to you.
I was assuming exactly the same code base on our side but will dig some more.
Re: v2023.39 (231109) y-axis label issue
Only just had a chance to re-look at what the code we have is doing.
We also have the Axis.Left.Increment := 1 set in this case to try and reduce the number of y-axis labels rather than automatic.
With that setting in the past it still kept the y-axis labels clean rather than having the in the example 64.8, 57.6 etc
I've not tested that code on the older release yet but will try shortly
We also have the Axis.Left.Increment := 1 set in this case to try and reduce the number of y-axis labels rather than automatic.
With that setting in the past it still kept the y-axis labels clean rather than having the in the example 64.8, 57.6 etc
I've not tested that code on the older release yet but will try shortly
- Attachments
-
- GraphCapture.JPG (31.23 KiB) Viewed 22382 times
Re: v2023.39 (231109) y-axis label issue
Ok I've tested with the two TChart version listed previously and as you can see with the same code the graphs look quite different.
Top one is v2021.x and bottom v2023.x
Top one is v2021.x and bottom v2023.x
- Attachments
-
- GraphCapture.JPG (45.28 KiB) Viewed 22376 times
Re: v2023.39 (231109) y-axis label issue
Ok I have a work around for the present time.
I check the ClientHeight and when its less than 200pixel I set Increment=0 (which is automatic by my testing) for graphs with max - min height < 200 units.
Greater than 200 height units I just set Increment=0
I check the ClientHeight and when its less than 200pixel I set Increment=0 (which is automatic by my testing) for graphs with max - min height < 200 units.
Greater than 200 height units I just set Increment=0
Re: v2023.39 (231109) y-axis label issue
Hello,
Indeed setting
I've added it to the public tracker: #2690
Indeed setting
Increment
to 1
was the key to reproduce the problem.I've added it to the public tracker: #2690
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |