Dear Support Team
We have an issue with the axis automatic increment being not well selected. Steps to reproduce are the following:
1. Add a TChart to a form
2. Add a TPointSeries to the Chart
3. Add the following code:
Chart1.LeftAxis.SetMinMax(-0.855,0.855);
Chart1.BottomAxis.SetMinMax(-0.855,0.855);
Series1.AddXY(-0.475,0.151);
Series1.AddXY(0.475,0.151);
This result in bottom axis having just one label (at zero) as shown in attached screendump. Why is the automatic axis increment not working well in this case?
Automatic Axis Increment
Automatic Axis Increment
- Attachments
-
- TeeChartAxisIncrement.png (15.4 KiB) Viewed 8692 times
Re: Automatic Axis Increment
Hello,
I'm afraid the algorithm for the automatic axis increment has limitations and it's difficult to handle all the possibilities.
I'm afraid the algorithm for the automatic axis increment has limitations and it's difficult to handle all the possibilities.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Automatic Axis Increment
I understand it is difficult to handle all situations, but it is a very simple case that I think it should handle.
The example can be even simpler as there is no need to add the points. Just these lines give exactly the same behavior:
Chart1.LeftAxis.SetMinMax(-0.855,0.855);
Chart1.BottomAxis.SetMinMax(-0.855,0.855);
In the example the axis limits are the same on both axes and no points are added. The left axis increment is well selected, but not on the bottom axis which lead to exactly the same as uploaded earlier. I think automatic axis increments should cover such simple example.
The example can be even simpler as there is no need to add the points. Just these lines give exactly the same behavior:
Chart1.LeftAxis.SetMinMax(-0.855,0.855);
Chart1.BottomAxis.SetMinMax(-0.855,0.855);
In the example the axis limits are the same on both axes and no points are added. The left axis increment is well selected, but not on the bottom axis which lead to exactly the same as uploaded earlier. I think automatic axis increments should cover such simple example.
Re: Automatic Axis Increment
Hello,
We've discussed about it and ended adding a fix for this (#2589).
Since you own the sources, you can apply it and recompile.
Search for this line in TeEngine.pas:
Modify it for this:
We've discussed about it and ended adding a fix for this (#2589).
Since you own the sources, you can apply it and recompile.
Search for this line in TeEngine.pas:
Code: Select all
if tmp.Active and IsAssociated(tmp) then
Code: Select all
if tmp.Active and IsAssociated(tmp) and
HasLabels(tmp) and not HasNoMandatoryValues(tmp) then
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Automatic Axis Increment
I have done the change and confirm that it is working. Thanks a lot for your support!
Re: Automatic Axis Increment
Hello,
Great. Thanks for the feedback!
Great. Thanks for the feedback!
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |