AxisList[0].Range is not accepted lazarus / 55-TAChart ---------------------------------------------------------------------- Firebird · 2022-02-03 10:44 Dear All, I am using TAChart to generate a simple xy diagram (see image in the attachment). When I try to reset Chart1.AxisList[0].Range.Min or Chart1.AxisList[0].Range.Max in the program the application automatically changes it to the extension of the y-axis of the graph presented. However, if I do this for the Chart1.AxisList[1].Range.Min or Chart1.AxisList[1].Range.Max it works fine. I have added the code of the form (the setting takes place in function EditAxisScaling()), the corresponding Lazarus Form and a screenshot of form at runtime. I would be very grateful for a hint. ---------------------------------------------------------------------- wp · 2022-02-03 11:23 Sorry, I do not want to look at your code without compiler support - it would be much more difficult. Please remove everything from the form which is not needed and put it into a standalone project which I can compile after you uploaded it under "Attachments and other options". Put the .pas, .lfm, .lpr and .lpi files into a common zip archive which is accepted by the forum software. Do not add any compiler-generated files, otherwise the zip will become too large. ---------------------------------------------------------------------- Firebird · 2022-02-06 15:09 Thank you for the feedback. I have attached a miniproject with the code as requested. Now, selecting the min and max values for the graph display automatically focuses on the graph extensions on both axis when min and max are selected (SpeedButton1 -> EditAxisScaling). It is probably a configuration issue on my side - but which one? Thank you for the help in advance. ---------------------------------------------------------------------- wp · 2022-02-06 15:40 There are several levels of priorities which affect the range of an axis. The TChartAxis.Range has a very low priority. Next higher priority is the range dictated by the series. This means that when the data range covered by the series exceeds the range of the axis the latter one is ignored. The simplest way to achieve given axis limits is to assign them to the Extent subproperties of the chart: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   Chart.Extent.XMin := 0.7;  Chart.Extent.XMax := 1.1;  Chart.Extent.YMin := 3.0;  Chart.Extent.YMax := 5.0;  Chart.Extent.UseXMax := true;  Chart.Extent.UseXMin := true;  Chart.Extent.UseYMax := true;  Chart.Extent.UseYMin := true; But be carefull to apply the Use* in the correct order. The minimum must never be greater than the maximum! To avoid this it is recommended to use an auxiliary variable and let the chart apply the limit at the same time in the FixTo method: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i uses  TACharUtils;   // needed for TDoubleRect;...var  extent: TDoubleRect;...  extent.a.x := 0.7;   // min x value  extent.b.x := 1.1;   // max x value  extent.a.y := 3.0;   // min y value  extent.b.y := 5.0;   // max y value;  Chart1.Extent.FixTo(extent); ---------------------------------------------------------------------- Firebird · 2022-02-07 09:37 That really helped! Thank you very much, now everything is working as it should.