Recent

Author Topic: Adding Text to LineSerie in a Tchart  (Read 327 times)

Dzandaa

  • Full Member
  • ***
  • Posts: 120
  • From C# to Lazarus
Adding Text to LineSerie in a Tchart
« on: May 30, 2023, 02:04:43 pm »
Hi everybody,

Using Lazarus 2.2.4 FPC 3.2.2 on Windows 64 bits

I try to add values in a Lineserie with

Code: Pascal  [Select][+][-]
  1. MySerie.AddXY(x, y, 'text', clRed);


In LineSerie property:
ShowLines set to False
ShowPoints set to True

I can see the point on the Chart at the right position, but no text.

Do I have missed something in the property?


Thank you.

B->












Dzandaa

wp

  • Hero Member
  • *****
  • Posts: 11205
Re: Adding Text to LineSerie in a Tchart
« Reply #1 on: May 30, 2023, 02:33:59 pm »
Since the data points can be labelled by a variety of items you must specify what you want to see: Set MySerie.Marks.Style to smsLabel to show the point labels. (You may also have to expand the Chart.Margins.Left and .Right to avoid truncation of the labels of the first and last data points).

Dzandaa

  • Full Member
  • ***
  • Posts: 120
  • From C# to Lazarus
Re: Adding Text to LineSerie in a Tchart
« Reply #2 on: May 30, 2023, 03:27:54 pm »
Hi,

Thank you, you save me :)


B->
Dzandaa

 

TinyPortal © 2005-2018