valueFormat

valueFormats to format values on a multi-style chart.

Sets the format for data values displayed in the chart plot area.

Type

StyleConstant.DATE_FORMAT

date display

StyleConstant.DECIMAL_FORMAT

number display

StyleConstant.MESSAGE_FORMAT

text display

StyleConstant.PERCENT_FORMAT

fraction display

StyleConstant.CURRENCY_FORMAT

locale-adapting currency display

For the Date, Decimal, and Message formats, use the formatSpec property to assign a format specification using the appropriate masks: [formatType, formatSpec]. See the examples below.

Examples

Number Format
Chart1.valueFormat = [Chart.DECIMAL_FORMAT,"#,###.00"];

valueFormatNumber

Text Format
Chart1.valueFormat = [Chart.MESSAGE_FORMAT,"{0} Dollars"];

valueFormatText

Either syntax below can be used in component script:

valueFormat         // unqualified
Chart1.valueFormat  // qualified

For onInit/onRefresh scripts, and for component and property scripts on other components, the second (qualified) form is required.