axis.format

Sets the format for dimension or measure axis labels. The xAxis, yAxis, and y2Axis properties can be used as a shortcut. The available formats are shown below:

  • Chart.DATE_FORMAT for date display

  • Chart.DECIMAL_FORMAT for number display

  • Chart.MESSAGE_FORMAT for text display

  • Chart.PERCENT_FORMAT for fraction display

  • Chart.CURRENCY_FORMAT for locale-adapting currency display

For the Date, Decimal, and Message formats, optionally specify the format and mask as items in an array. See Add Data Format in Visualize Your Data for more information about Dashboard formatting.

Type

Constant (format) or Array ([format, mask])

Example (Number)

 Chart1.axis['Sum(Total)'].format = [Chart.DECIMAL_FORMAT,"#,###.00"];

dimensionFormatDecimal

Example (Text)

Chart1.axis['Company'].format = [Chart.MESSAGE_FORMAT,"{0} Inc."]
Chart1.axis['Company'].rotation = 30;

dimensionFormatText

Either syntax below can be used in component script:

axis['...'].format            // unqualified
Chart1.axis['...'].format     // qualified

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