TAchart and Xlabel property is usable ? lazarus / 55-TAChart ---------------------------------------------------------------------- dav999 · 2008-10-27 23:42 Hello, i see this code with add a line in my graph : Code: [Select]function TChartSeries.AddXY(X, Y: Double; XLabel: String; Color: TColor) i would see my xlabel in my graph (i need because my app show a serie of athletic performance, i would show every perf in each point of the line) thanks David ps : excuse for my poor english but if anyone speak french ---------------------------------------------------------------------- Edson · 2014-02-19 17:31 I have the same problem, 5 years later. Can someone please help with this? I haven't found anything, on the documentation. ---------------------------------------------------------------------- Jkey · 2014-02-19 18:39 Yes, label property is usable. Currently the mentioned TChartSeries function looks like this: function AddXY(AX, AY: Double; AXLabel: String = '';  AColor: TColor = clTAColor): Integer; You can add a datapoint to a chart with given coordinates, label text and data point colour. In order to demonstrate it, 1. try to create a new project 2. put a Tchart object onto your Form (Chart1) 3. add a line series to its series section (Chart1LineSeries1) 4. change Chart1LineSeries1.ShowPoints property to True 5. change Chart1LineSeries1.Marks.Style to smsLabel 6. Add this code to OnCreate procedure of your form:   Chart1LineSeries1.AddXY(1,1,'First',clRed);   Chart1LineSeries1.AddXY(2,2,'Second',clBlue); 7. Run it. ---------------------------------------------------------------------- Edson · 2014-02-19 19:58 It works. Thanks. Now, I'm trying to put labels to the X-axis, and I have seen that, using a TListChartSource: http://forum.lazarus.freepascal.org/index.php/topic,19820.msg113355.ht ml#msg113355 Is there an easy way? I mean, without using a TListChartSource. ---------------------------------------------------------------------- wp · 2014-02-19 22:07 That's the most general way. Maybe, if your data points are equidistant, and if the data label are the same as the axis labels, you can assign the Chartsource of the series to that of the axis: Code: [Select]  Chart1.BottomAxis.Marks.Source := Chart1LineSeries1.Listsource; ---------------------------------------------------------------------- Edson · 2014-02-20 03:09 That's what I wanted to hear. I understand. I see the TAChart is very complete. I need to learn more about that. Thanks. ---------------------------------------------------------------------- wp · 2014-02-20 15:41 Have a look at the TAChart tutorials (http://wiki.lazarus.freepascal.org/Category:TAChart), the TAChart documentation (http://wiki.lazarus.freepascal.org/TAChart_documentation), or the TAChart user guide (http://wiki.lazarus.freepascal.org/TAChart_User_Guide) to learn more if you are interested.