At first: there is no pre-built component to add some text a chart. But maybe it is sufficient to show the text in the chart's title or footer?
If you want more control you can use one of the OnDrawXXXX events of the chart to perform manual drawing, see
http://wiki.lazarus.freepascal.org/TAChart_Tutorial:_Background_design#The_TChart_painting_events for an explanation of the events. I'd recommend to pick the OnAfterdraw event which is called after drawing all chart elements, i.e. what you draw here will not get overpainted by other chart elements.
Yes, you could paint using the chart's canvas. But I do not recommend it because you can also paint to other canvases (printer, external files), and your manually drawn text would not appear there. It is better to use the ADrawer interface which is passed as a parameter to the event handler.
See TADrawUtils.IDrawer for the methods of the drawing backend which are similar to the canvas painting methods, except for text output which is done in a bit un-Pascal-ish way, by adding more and more methods to the TextOut methods - see example below.
Note also that drawing occurs in units of the drawer's pixels ("image coordinates"). Use the chart's GraphToImage method to convert values from "data" to "image" coordinates (This statement is simplified, correct only if transformations are not used).
Here is a simple example which displays the average value of a series in the top-left edge of a chart on a yellow background with shadow:
uses
Types, TAChartUtils, TAGeometry;
procedure TForm1.Chart1AfterDraw(ASender: TChart; ADrawer: IChartDrawer);
var
i: Integer;
ave: Double;
ext: TDoubleRect;
Rext, R: TRect;
s: String;
begin
// Calculate value to be displayed
ave := 0.0;
for i:=0 to Chart1LineSeries1.Count-1 do
ave := ave + Chart1LineSeries1.YValue[i];
ave := ave / Chart1Lineseries1.Count;
// Text to be displayed - use 3 decimal places
s := 'Average value: ' + FormatFloat('0.000', ave);
// Limits of the chart box in graph coordinates
ext := Chart1.LogicalExtent;
// ... and in image (screen) coordinates
Rext.TopLeft := Chart1.GraphToImage(DoublePoint(ext.a.x, ext.b.y));
Rext.BottomRight := Chart1.GraphToImage(DoublePoint(ext.b.x, ext.a.y));
// Draw text 10 pixels to the right of x axis, and 10 pixels below top edge of chart
// The text will be on a yellow background with 4-pixel wide shadow
// Calculate rectangle boundaries for text
R.TopLeft := Point(0,0);
ADrawer.SetFont(Chart1.Title.Font); // let's use the same font as the chart title
R.BottomRight := ADrawer.TextExtent(s);
// Move text rect 10 pixels to the right of the x axis, and 10 pixels down from top edge
OffsetRect(R, Rext.Left + 10, Rext.Top + 10);
// Paint shadow first: move rectangle 4 more pixels to the right-bottom
OffsetRect(R, 4, 4);
ADrawer.SetBrushParams(bsSolid, clBlack);
ADrawer.FillRect(R.Left, R.Top, R.Right, R.Bottom);
// Paint yellow background (move rect back to original position)
OffsetRect(R, -4, -4);
ADrawer.SetBrushParams(bsSolid, clYellow);
ADrawer.FillRect(R.Left, R.Top, R.Right, R.Bottom);
// Now draw text
ADrawer.TextOut.Pos(R.Left, R.Top).Text(s).Done; // .Done must be last command!
end;
This code should not depend on platform.