TAChart Logarithmic and Linear scale on one Chart lazarus / 55-TAChart ---------------------------------------------------------------------- markostarko · 2012-07-27 08:25 Hello! I'am working on project for process control, and have been trying to plot logarithmic scale and linear scale to one chart. However i made Chart whit two axis and assign logarithmical transformation to one of them, but how to scale it propperly. What is AxisindexY property and how does it work. Also is it possible to draw vertical line on chart and get Y axis vale from line position? Any advice is much appreciated ---------------------------------------------------------------------- wp · 2012-07-27 11:06 I am not quite sure what you mean: Do you, for example, want to have several curves in the chart, some drawn with a linear scale in the left axis, and the other ones with a log scale on the right axis? Have a look at the example in demos\axistransf. Moreover, there are several postings in this forum (board "Graphics - TAChart") which refer to logarithmic axis transforms. You have to assign the AxisIndexY of the log series to the index of the logarithmic y axis (you see that in the object inspector tree). And, of course, you need a LogarithmTransform that is assigned to this axis. ---------------------------------------------------------------------- markostarko · 2012-07-27 13:04 I done that now  but still right axis title is not shown, what about vertical line that would be cursor for graph and also show current values. How can i get series value at cursor position from x,y on mouse move. Would situation change whit logarithmic transform. If anybody have good example for this situation getting y value from logarithmic chart on mouse move pleas explain how it's done. I read everything available on forum, but it's not all clear to me. It's my first project whit lazarus and at beginning it went so well, but now whit plotting part i have some difficulties. ---------------------------------------------------------------------- Ask · 2012-07-27 19:27 Quoteright axis title is not shownDid you set Title.Visible = true? Quote vertical line that would be cursor for graph and also show current valuesUse TDataPointCrosshairTool. See "tools" demo for an example. Alternatively, you can use TDataPointDragTool combined with TConstantLine -- see "line" demo for an example. QuoteHow can i get series value at cursor position from x,y on mouse moveUse ASender.Position property from within the TDataPointCrosshairTool. OnDraw event handler to get a graph coordinates of the cursor. Use Series and PointIndex properties to get the series point nearest to the cursor position. ---------------------------------------------------------------------- wp · 2012-07-27 21:22 Quoteto get a graph coordinates of the cursor. Since you are new to TAChart and want to use logarithmic axes you maybe are not aware that the "graph coordinates" are numbers after calculating the logarithms. This mean you have to back-transform the position in order to get the value as displayed on the axis. From the OnDraw event handler of TDatapointCrosshairTool you can do this, for example, in the following way -- the result will be transferred to a label caption: Code: [Select]procedure TForm1.ChartToolset1DatapointCrosshairTool1Dra w(ASender:TDatapointCrosshairtool); var   series: TCustomChartSeries;   y: Double; begin   if not (ASender.Series) is TCustomChartSeries then     exit;   series := TCustomChartSeries(ASender.Series);   y := series.ParentChart.AxisList[series.AxisIndexY].GraphToAxisY(ASe nder.Position.Y);   Label1.Caption := Format('y = %g', [y]); end; ---------------------------------------------------------------------- markostarko · 2012-07-28 13:23 Thanx for all support, project is almost finished. Lazarus and i are definetly frends from now on. ---------------------------------------------------------------------- markostarko · 2012-07-28 18:23 Just one more think, do i need new version of Lazarus get DatapointCrosshairTool, as i saw from forum it's your contribution. My question in short where to get the component. ---------------------------------------------------------------------- wp · 2012-07-28 22:17 I would not recommend to merge this component into an existing installation. Get yourself a current Lazarus snapshot from http://freepascal.dfmk.hu/test/lazarus/ (this link is at the left-hand side of this forum). If you are on Windows, these versions are ready to install. And don't be scared by the message that "you are using completely untested software" - the snapshots are very stable. Delete (or rename) the old lazarus folder before installing the snapshot.