TChart - DateTime on XAxis - setting question(s) lazarus / 55-TAChart ---------------------------------------------------------------------- vx-rexx · 2011-12-01 21:37 Hello, 1. I have a bar-chart with Source: DateTimeIntervalChartSource and Style: smsLabel. Steps dtsDay, dtsMonth and dtsYear set True. I have the problem that if I get very few Data-Point's (maybe 3; I have only one Data-Point at a Day ) no Marks displayed. If I set dtsHour True then Marks with hour are displayed, but I need only Day and Month, perhaps Year (if it is changed). My chart is default Height/Width 687/805. If 6 Data-Points on chart Marks on XAxis are displayed (if size of window/chart is default) . The Size of program-window is changeable. Now, if I change the size of window (and so also the size of chart) sometime no Marks at Bottom. Where can I set that always Marks at XAxis are displayed? 2. Line-chart, also with Source: DateTimeIntervalChartSource and Style: smsLabel. Steps dtsDay, dtsMonth, dtsYear, dtsHour, dtsMin and dtsSecond set True. I need 2 Lines on Bottom-Axis:   First line 'hh:mm:ss'   second line 'dd.mm.' example: 22:15:20  01.12. How can I get this? I hope you can help me. Windows: Lazarus 0.9.31 SVN 33083, FPC 2.5.1 Linux: Lazarus 0.9.31 Source: 27.11.2011, FPC 2.4.4 ---------------------------------------------------------------------- Ask · 2011-12-02 08:48 QuoteI have the problem that if I get very few Data-Point's (maybe 3; I have only one Data-Point at a Day ) no Marks displayed. You have several options: 1) You can adjust DateTimeIntervalChartSource.Params (probably MinLength and MaxLength), see http://wiki.lazarus.freepascal.org/TACha rt_documentation#Axis_intervals 2) You can enable all Steps -- this will ensure that *some* interval will be displayed at most zoom levels, although perhaps not in the units you prefer. 3) If you do NOT need to zoom your chart, you can use a simple ListChartSource with pre-determined marks. I can offer more specific advice if you would upload a sample code. I have seen your post on the German forum, but I am not registered there and thus unable to download attachments. QuoteI need 2 Lines on Bottom-Axis Set DateTimeFormat property to include end-of-line sequence. TAChart should automatically break labels containing end-of-line into multiple lines (see "labels" demo for an example). ---------------------------------------------------------------------- vx-rexx · 2011-12-02 20:27 Thank's Ask. I have tryed it with Code: [Select]DateTimeIntervalChartSource1.DateTimeFormat:='hh:mm:ss'+ #13+'DD.MM.';but Code: [Select]DateTimeIntervalChartSource1.DateTimeFormat:='hh:mm:ss'+ #13#10+'DD.MM.';work. (MessageDlg('String_1'+#13+'String_2') work's fine so. I thought I only need #13.  ) The Attachment is a little example that demonstrate my problem. Have you more then 2 Data-Point's created (Add-Button), Marks are displayed. Now, for example, you have 3 Data-Point's created, please change the size (width) of window. At some point there is no Mark. My first Monitor has 1680x1050 and second Monitor 1280x1024 Resolution. I can (and use this from time to time) change size of window over the full width (2704). In  this example I need 7 Data- Point's or more and Marks are displayed. (System for this example: Windows 7, Lazarus 0.9.31 SVN 33083, FPC 2.5.1)