Recent

Author Topic: Axis Label format spec  (Read 178 times)

PaulRowntree

  • Jr. Member
  • **
  • Posts: 62
    • Paul Rowntree
Axis Label format spec
« on: September 15, 2019, 11:54:54 pm »
On my system (Win10, Laz1.8, win32) the default axis label format string is "%0:.9g".  What is the meaning of the full semicolon?

 
Paul Rowntree
- coding for instrument control, data acquisition & analysis, CNC systems

wp

  • Hero Member
  • *****
  • Posts: 6331
Re: Axis Label format spec
« Reply #1 on: September 16, 2019, 12:31:49 am »
The axis labels are determined by the ChartSource assigned to the Source and Style properties of the axis' Marks (when Source is empty an internal source is used). Depending on these settings various quanties can be displayed as axis labels which are created by using the Format() function and a given mask string. The number specified before the colon, therefore, is the index of the value in the parameter list passed to the Format() function.

See
- https://wiki.lazarus.freepascal.org/TAChart_documentation#Mark_labels
- https://www.freepascal.org/docs-html/rtl/sysutils/format.html
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

PaulRowntree

  • Jr. Member
  • **
  • Posts: 62
    • Paul Rowntree
Re: Axis Label format spec
« Reply #2 on: September 16, 2019, 01:13:13 am »
Thanks wp.  I was looking at this page, where the ':' is omitted.
https://wiki.freepascal.org/Format_function

Cheers!
Paul Rowntree
- coding for instrument control, data acquisition & analysis, CNC systems