shapeLegend.format

Sets the format for data values displayed in the shape legend.

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.shapeLegend.format = [Chart.DECIMAL_FORMAT,"$#,##0.00"];

shapeLegendFormatNumber

Text Format
Chart1.shapeLegend.format = [Chart.MESSAGE_FORMAT,"{0} Inc."];

shapeLegendFormatText

Either syntax below can be used in component script:

shapeLegend.format          // unqualified
Chart1.shapeLegend.format   // qualified

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