Scaling multiple y-axes lazarus / 55-TAChart ---------------------------------------------------------------------- dnota · 2015-10-16 12:41 Hi all, I'm doing an application with several axes, both left and right, and I need to adjust scales, here is a simple example with only one left y-axe and one right y-axe, but I can have up to 4 axes on each side. In the image you can see left and right axes are on the same scale, but I need left axe labels go from bottom to up, not only halfway. Any help? Thank you very much. ---------------------------------------------------------------------- wp · 2015-10-16 12:46 Follow the principles of http://wiki.lazarus.freepascal.org/TAChart_Tu torial:_Multiple_Panes_in_one_Chart ---------------------------------------------------------------------- dnota · 2015-10-16 13:10 I don't know if I'm not undersanding the link or I'm not doing the same thing, in an advanced example you can see, 2 axes on each side, I need 50, 100, 150 and 200 (the max values) are all aligned at the top of axes and so have 5 lines of horizontal separation. Thx. ---------------------------------------------------------------------- wp · 2015-10-16 14:21 You mean something like in the attachment? For this you do the following Add three additional vertical axes, one with Alignment = alLeft, two with Alignment = alRightAdd four series of the kind you need.Important: for each series you have to specify in AxisIndexY the index of the y axis to which the series belongs.Add four TChartAxisTransformations, link each of them to the Transformations property of a vertical axisDouble-click on each TChartAxisTransformations and add an Autoscale axis transform. ---------------------------------------------------------------------- dnota · 2015-10-19 06:32 I got this, but I can't make it runs like yours. ---------------------------------------------------------------------- wp · 2015-10-19 10:08 Every chart has an invisible coordinate system ("graph coordinates"). In a "normal" chart - no transformations - the "graph" coordinates are equal to the "axis" coordinates, these are the coordinates listed along the axis. When transformations come into play the "axis" coordinates are mapped to the "graph" coordinates in a unique way. A simple exmple is the logarithmic transformation: It calculates the log of the data values and plots the logs insteads of the data values themselves. The Autoscale transformation is a bit more difficult to understand. Using the MinValue and Maxvalue of the AutoscaleTransformation you define a range of values in "graph" coordinates. Suppose MinValue is 0 and MaxValue is 1, and the minimum data value is 50 and the maximum data value is 100. Then the data value are transformed such that the minimum data value (50, "axis" coordinates) aligns with the minimum graph coordinate (0), and the maximum data value (100, "axis coordinates") aligns with the maximum graph coordinate (1). If you have several axes, say one between 0 and 50, a second one from 0 to 100, a third one from 0 to 150 and a fourth one from 0 to 200 and want all axes to extend across the entire chart then simply use the same MinValue and MaxValue of each AutoScale axis transformation, e.g. Minvalue = 0, Maxvalue = 1. Other numbers would work as well, the only requirement is that they are the same for all transformations. In your demo, however, you had set the MaxValue equal to the corresponding axis value. Doing this all axes extend across the entire chart. Another comment on your code: Don't check UseMax and UseMin of the axes' Range without specifying a value for Max and Min. Because Max and Min are 0 by default this would create a division by zero error. This did not happen because you provide a dedicated chart source for axis labelling ---------------------------------------------------------------------- dnota · 2015-10-20 08:55 Thank you, now it works.