PlotAxis.LabelsFormat Property

Top 

Description

Sets the formatting string that will be used to display the values for the labels. The formatting string follows the standard C# formatting as used with the .NET ToString() method. Example formats: '0.000', '#,##0.###', and '00e-0'. See the help file for more information and additional examples.

 

 

Any C# format string can be used in both the LabelsFormat property and in the PlotWindow GUI options. When using the object editor GUI, the format string can be typed directly into the text box; which is useful for testing out format specifiers since the plot will update instantly. If the string used for the format specifier is not recognized, the last valid LabelsFormat string will be used.

 

The LabelsFormat property is used for both numbers and dates. If a date format is desired, be sure to change the UseDateTimeFormatting property prior to changing the LabelsFormat property.

 

Note: The format will follow the regional specifications of the system running FreeFlyer. These examples are generated using the "en-US" region specifications.

 

The following tables provide specifiers that can be used to format numeric axes labels. The formatted examples use 1234.56 as the number being formatted.

 

Specifier

Type

Example

e

Scientific

1.234560e+003

f

Fixed point

1234.56

g

General

1234.560

n

Number with commas for thousands

1,234.56

 

 

Specifier

Type

Example

0

Zero placeholder (can use to pad with zeros)

0000.000 -> 1234.560

#

Digit placeholder

####.### -> 1234.56

.

Decimal point

0.0      -> 1234.5

,

Thousand separator

#,###.00 -> 1,234.56

,.

Number scaling (comma adjacent to period scales by 1000)

#,.0     -> 1.2

%

Percent (multiplies by 100 and adds % sign)

0.0%     -> 123456.0%

e

Exponent placeholder

0.0e+00  -> 1.2e+03

 

The following table provides a list of some specifiers that allow for generic formatting of dates and times. The formatted examples use "January 16, 2020 01:36:24.38 PM" as the date being formatted.

 

Specifier

Type

Example

d

Short date

01/16/2020

D

Long date

Saturday, January 16, 2020

t

Short time

01:36 PM

T

Long time

01:36:24 PM

f

Full date and time

January 16, 2020 01:36 PM

F

Full date and time (Long)

January 16, 2020 01:36:24 PM

g

Default date and time

01/16/2020 01:36 PM

G

Default date and time (long)

01/16/2020 01:36:24 PM

M

Month day pattern

January 16

r

RFC1123 date string

Sat, 16 Jan 2020 13:36:24 GMT

s

Sortable date string

2020-01-16T13:36:24

u

Universal sortable, local time

2020-01-16 13:36:24Z

U

Universal sortable, GMT

January 16, 2020 01:36:24 PM

Y

Year month pattern

January, 2020

 

If the plot requires a more customized label for the dates and times, the table below provides some more examples that allow more flexibility.

 

Specifier

Type

Example

dd

Day

16

ddd

Day name

Sat

dddd

Full day name

Saturday

f, ff, ...

Fractions of a second

ff -> 38

hh

2 digit hour

01

HH

2 digit hour, 24hr format

13

mm

Minute (00-59)

36

MM

Month (01-12)

01

MMM

Month abbreviation

Jan

MMMM

Full month name

January

ss

Seconds (00-59)

24

tt

AM or PM

PM

yy

Year, 2 digits

10

yyyy

Year

2020

:

Separator

hh:mm:ss   -> 01:36:24

/

Separator

dd/MM/yyyy -> 01/16/2020

 

Timing Precision Mode

This page describes functionality in millisecond timing precision mode. Millisecond timing precision mode is deprecated and will be removed in a future release. We recommend that you migrate your Mission Plans to nanosecond timing precision mode.

Click here to see the documentation for this object in nanosecond timing precision mode.

 

Attributes

Type:

string

Access:

read/write

Default Value:

"0.000"

 

Syntax

myString1 = myPlotAxis1.LabelsFormat;

 

myPlotAxis1.LabelsFormat = myString1;

 

See also

PlotAxis Object

PlotWindow Guide