TAChart different axes of left and right for different data series lazarus / 55-TAChart ---------------------------------------------------------------------- grzegorz · 2010-04-09 07:07 Hi all  I'm a beginner Lazarus user and i have question: Is it possible to do different axes left (temperature) and right (pressure) for different data series on the same graph (common horizontal time axis)? ---------------------------------------------------------------------- Leledumbo · 2010-04-09 07:27 If you use the snapshot version: yes Use DataSource property of each axis whose value you want to change ---------------------------------------------------------------------- grzegorz · 2010-04-09 08:08 Quote from: Leledumbo on April 09, 2010, 09:27:36 amIf you use the snapshot version: yes QuoteUse DataSource property of each axis whose value you want to change but unfortunately, I do not know how to do it. It seems too complicated for me. intuitively tried by a combination of AxisIndexy(tlineseries properties) with the corresponding axis  same way as in Delphi (lineSeries.VertAxis: = aRightAxis) but unfortunately does not work ---------------------------------------------------------------------- Ask · 2010-04-09 09:34 You may be interested in tachart/demo/axis/axisdemo project, "Linear transform" page. ---------------------------------------------------------------------- grzegorz · 2010-04-09 10:15 Quote from: Ask on April 09, 2010, 11:34:05 amYou may be interested in tachart/demo/axis/axisdemo project, "Linear transform" page. in that example, all the vertical axes have the same minima maxima and scale. I need to be independent  (pressure, temperature), conected only by vertical axis (time). ---------------------------------------------------------------------- Ask · 2010-04-09 23:01 Stragne. This example is specifically about representing two series with different scales (temperature in degrees Celsius an Fahrenheit, but of course you are not limited to that). BTW, please update you Lazarus to latest svn -- I have found a bug in the example a few days ago. ---------------------------------------------------------------------- grzegorz · 2010-04-10 13:33 Quote from: Ask on April 10, 2010, 01:01:39 amStragne. This example is specifically about representing two series with different scales (temperature in degrees Celsius an Fahrenheit, but of course you are not limited to that). BTW, please update you Lazarus to latest svn -- I have found a bug in the example a few days ago. in that example, the axis of the left and right are not independent. The relationship between the axes describes ChartAxisTransformations. thanks sorry for my bad english ---------------------------------------------------------------------- Ask · 2010-04-11 07:52 You are right, automatic transformation are is on my TODO list. For now, you may manually set linear transformation parameters. ---------------------------------------------------------------------- ThB · 2010-12-31 10:29 Automatic axis scaling of LineSeries2 (on right axis) depending on LineSeries1 (left axis) can be done this way: Code: [Select]var tmp: Double; ... If Chart1LineSeries1.Active then   tmp := Chart1LineSeries1.GetYMax - Chart1LineSeries1.GetYMin else   tmp := 1; If (Chart1LineSeries2.GetYMax <> Chart1LineSeries2.GetYMin) AND    (Chart1LineSeries2.IsEmpty = false) then begin   LAT1.Scale := tmp / (Chart1LineSeries2.GetYMax - Chart1LineSeries2.GetYMin);   LAT1.Offset := Chart1LineSeries1.GetYMin - LAT1.Scale * Chart1LineSeries2.GetYMin; end; I use it in my own project. ---------------------------------------------------------------------- Ask · 2011-01-05 16:04 In recent versions, you can also use TAutoScaleAxisTransform (see "Auto scale" checkbox in the axisdemo).