CHART FORMAT PROPERTIES

  

DEVELOPER

Trail: PROIV Documentation > Developer > PROIV Developer > Developing Functions > Screen Function Dynamics Charts > Chart Format Properties

Chart Format Properties

Charts contains a collection of format properties which you can use to determine the format of a Label. The behaviour depends on the format specified and the available properties depend on the type of chart chosen.

Examples:

BarChart.axes_label_format         = "%e"

BarChart.leftAxis_label_format     = "%e"

BarChart.rightAxis_label_format   = "%e"

LineChart.topAxis_label_format     = "%e"

LineChart.Chart_label_format        = "%e"

LineChart.BottomAxis_label_format = "%e"

Where "%e" is a valid format.

String formats:

%%

a percent sign

%c

a character with the given number

%d

a signed integer, in decimal

%u

an unsigned integer, in decimal

%o

an unsigned integer, in octal

%x

an unsigned integer, in hexadecimal

%e

a floating-point number, in scientific notation

%f

a floating-point number, in fixed decimal notation

%g

a floating-point number, in %e or %f notation

%X

like %x, but using upper-case letters

%E

like %e, but using an upper-case "E"

%G

like %g, but with an upper-case "E" (if applicable)

%b

an unsigned integer, in binary

%B

like %b, but using an upper-case "B" with the # flag

%n

special: stores the number of characters output so far into the next variable in the parameter list

Text%s

Displays the text in addition to the original value

Note: If the chosen format adds characters, it replaces the label unless you add a place holder for the original string (%s)

Example 1:

"%%" - This displays the character "%".  To include the original value you need a place holder; that is, "%s %% " displays "<string value> %".

Example 2:

"Test" prints "Test" overwriting the original value

"Test%s" prints "Test<string value>"

Date and Time Formats:

d

The day of the month, from 1 through 31.

dd

The day of the month, from 01 through 31.

ddd

The abbreviated name of the day of the week.

dddd

The full name of the day of the week.

m

The month, from 1 through 12.

mm

The month, from 01 through 12.

mmm

The abbreviated name of the month.

mmmm

The full name of the month.

yy

The year, from 00 to 99.

yyyy

The year as a four-digit number.

h

The hour, using a 12-hour clock from 1 to 12.

hh

The hour, using a 12-hour clock from 01 to 12.

H

The hour, using a 24-hour clock from 0 to 23.

HH

The hour, using a 24-hour clock from 00 to 23.

M

The minute, from 0 through 59.

MM

The minute, from 00 through 59.

s

The second, from 0 through 59.

ss

The second, from 00 through 59.

l

The milliseconds, from 000 through 999.

L

The milliseconds, from 00 through 99.

t

The first character of the am/pm designator.

tt

The am/pm designator.

T

The first character of the AM/PM designator.

TT

The AM/PM designator.

Z

Time Zone

o

Hours offset from UTC

S

The day suffix th, st, nd or rd

Note: PROIV does not perform validation, therefore, if an invalid format is used then the output is undefined.

Comment on this topic

Topic ID: 500713