Labels under my bars in barchart?[SOLVED] lazarus / 55-TAChart ---------------------------------------------------------------------- Robert W.B. · 2017-02-16 01:35 I have a barchart with bottom labels 1 2 3 4 5 6 7 automaticly created. How can I set labels like,  one two three  instead of 1 2 3?  Thanks in advance ---------------------------------------------------------------------- wp · 2017-02-16 08:46 Do you know the related tutorial? http://wiki.lazarus.freepascal.org/T AChart_Tutorial:_BarSeries#Using_text_labels The tutorial adds data via the datapoint editor. You probably add data to the series by calling the BarSeries' AddXY method. This method has an optional third parameter for data point labels: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   Chart1BarSeries1.AddXY(1, y_value1, 'one');  Chart1BarSeries1.AddXY(2, y_value2, 'two');  Chart1BarSeries1.AddXY(3, y_value3, 'three');  // etc Then, after adding all data set the Marks.Source of the BottomAxis to the ListSource of the BarSeries (this is where your data are stored), and set Marks.Style to smsLabel (you'll have to add TAChartUtils to "uses" for the compiler to find this identifier, or set the Marks.Style in ObjectInspector): Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i uses  TAChartUtils, ......  Chart1.BottomAxis.Marks.Source := Chart1BarSeries1.ListSource;  Chart1.BottomAxis.Marks.Style := smsLabel; Now you should see the labels instead of the x values. ---------------------------------------------------------------------- Robert W.B. · 2017-02-16 12:49 Hi wp. I was into this solution but, I got External SIGSEGV in tacustomseries.pas Any idea what might be wrong? ---------------------------------------------------------------------- wp · 2017-02-16 13:03 No idea. Did you create the series? Double-click on the chart, select "Add" and pick the series type you want to add. ---------------------------------------------------------------------- Robert W.B. · 2017-02-16 13:24 Yes,the Barchartseries is created. I try to set 7 string labels and the code is accepted but when in runmode I have got SIGSEGV! for a:=1 to 7 do begin   Chart1BarSeries1.AddXY(a,a,IntToStr(mylabels[a]));   end; ---------------------------------------------------------------------- Girlbrush · 2017-02-16 13:41 Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i for a:=1 to 7 do begin  Chart1BarSeries1.AddXY(a,a,IntToStr(mylabels[a]));  end;My guess: Substract 1 from a when used in your mylabels array (that runs from 0 to n). Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i for a:=1 to 7 do begin  Chart1BarSeries1.AddXY(a,a,IntToStr(mylabels[a-1]));  end; ---------------------------------------------------------------------- wp · 2017-02-16 13:56 Why do you create the series label from the integer array mylabels? I thought you wanted words as labels. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i const  mylabels: array[1..7] of string = ('one','two', 'three', 'four', 'five', 'six', 'seven'); for a := 1 to 7 do  Chart1BarSeries1.AddXY(a, a, mylabels[a]); ---------------------------------------------------------------------- Robert W.B. · 2017-02-16 14:18 Many thanks wp and Girlbrush. Now I get it. Have a nice weekend. /Bob