TAChart static axis values lazarus / 55-TAChart ---------------------------------------------------------------------- Leledumbo · 2010-03-26 05:31 I need to have static axis values for TAChart. I want the left axis always and only shows 1,2,3, and 4 (inverted) and the bottom always and only shows 1,2,3 up to 7 regardless either window size or the plotted data. How can I achieve it? ---------------------------------------------------------------------- lightningchaser · 2010-03-26 07:05 see this topic, you will need a recent build http://forum.lazarus.freepascal.org/index.php/topic,8887.0.html ---------------------------------------------------------------------- Leledumbo · 2010-03-26 08:16 I know, you see I also post there. The problem is: how? what properties should be modified in object inspector? I try to use Extent, but when maximized the graph has 1.5, 2.5, and 3.5 as well. I only want the integers. ---------------------------------------------------------------------- lightningchaser · 2010-03-26 14:24 Quote from: Leledumbo on March 26, 2010, 09:16:05 amI know, you see I also post there. The problem is: how? what properties should be modified in object inspector? I try to use Extent, but when maximized the graph has 1.5, 2.5, and 3.5 as well. I only want the integers. you should use "ListChartSource1.DataPoints.Add", the items seem seperated by a pipe symbol. make sure the source of the marks point to the listchartsource1 and style is set to smsLabel. I did use this code to show the date on the axis: Code: [Select]  dateaxis:=encodedatetime(yearof(now),1,1,0,0,0,0);   for i:=1 to DaysInYear(dateaxis) do begin     //show first day of the month     if DayOfTheMonth(dateaxis)=1 then begin       ListChartSource1.DataPoints.Add(inttostr(i)+'|'+inttostr(i)+'|?| '+formatdatetime('yyyymmdd',dateaxis)+'');     end else begin       //show first day of the week       if (dayoftheweek(dateaxis)=1) then         ListChartSource1.DataPoints.Add(inttostr(i)+'|'+inttostr(i)+'| ?|'+formatdatetime('yyyymmdd',dateaxis));     end;     dateaxis:=incday(dateaxis,1);   end; ---------------------------------------------------------------------- Ask · 2010-03-26 15:36 QuoteThe problem is: how? what properties should be modified in object inspector? First, is you do not already, you have to use recent svn version. Using it, you can look at components/tachart/demo/axis folder for a sample project. QuoteYou should use "ListChartSource1.DataPoints.Add", the items seem seperated by a pipe symbol. Well, I really should write some documentation sometime... Anyway, DataPoints property is mainly intended to allow design-time editing of list source data. If you are adding data at run-time, it is more efficient and convenient to use TListChartSource.Add method: Code: [Select]ListChartSource1.Add(i, i, clTAChart, formatdatetime('yyyymmdd',dateaxis)); Also, if you have many data points and want to generate them on-the- fly instead of storing inside of the source, you can use TUserDefinedChartSource. ---------------------------------------------------------------------- Leledumbo · 2010-03-28 06:30 I found it. The axis also has Source property, which I can use to assign different values for left and bottom axis.