Skip To Content

Format numbers

In many places in a dashboard when numbers are shown, Dashboards will attempt to format and parse numbers in a locale-sensitive manner. This means that culturally sensitive patterns are used for representing items such as thousands and decimal separators and percent signs. For example, the number 1 million with two decimal places would be displayed in a dashboard as follows:

  • 1,000,000.00 for Canadian and American users
  • 1 000 000,00 for French users
  • 1.000.000,00 for German users

Dashboards determines a user's locale based on either their language setting in their ArcGIS user profile or if they are accessing dashboards anonymously, the language setting in their web browser.

When the default locale-specific formats aren't appropriate, you can override them by specifying different patterns in the Pattern setting for elements such as gauge, indicator, and serial chart.

Pattern setting

The following are the number formatting conventions that Dashboards supports. They are based on the number formatting patterns described in the Unicode Common Locale Data Repository (CLDR) documentation.

  • Entering . indicates where a decimal point should be placed.
  • Entering , indicates where a thousands separator should be placed.
  • Entering 0 indicates where zero-padding should be in the number. If the number is too short, a zero based on the locale's numeric set will display in the dashboard.
  • Entering # indicates no padding. If the number is too short, nothing displays in the dashboard.

The following are example number patterns that use some of the above conventions and show how they have different impacts on the number displayed based on whether the user's locale is English, French, or German. All patterns are based on the assumption that the number displays as 1234.567 by default. Note how the characters , and . in the following patterns are replaced by locale-specific characters.

Pattern English locale French locale German locale

#,##0.##

1,234.57

1 234,57

1.234,57

#,##0.###

1,234.567

1 234,567

1.234,567

###0.#####

1234.567

1234,567

1234,567

###0.0000#

1234.5670

1234,5670

1234,5670

00000.0000

01234.5670

01234,5670

12345,5670

There is no limit to the number of digits that can be entered in the Pattern setting. This means it is not important how many # placeholder characters are entered before the decimal. However, it is best practice to include at least one zero in every pattern.

Special characters

For many characters, no character replacement occurs, and these characters display on a dashboard exactly how they are entered in the Pattern setting. Dashboards does support some special characters that represent other characters. For instance, the # character causes a localized digit to appear in its place in a dashboard.

Of the special characters, there are some that are replaced with the same character that was entered in the Pattern setting. For example, in the English locale, the grouping character , is replaced by ,. In this instance, a character replacement still occurs. If the symbols are changed, the grouping character also changes. There are also a few special characters that impact formatting behavior by their presence alone. The percent character (%) results in the value being multiplied by 100 before it appears in the dashboard.

The following table describes the effects of certain special characters on number formats in dashboards:

SymbolDescription

0

A digit.

#

A digit. Zero appears as absent.

.

A placeholder for decimal separators.

,

A placeholder for grouping separators.

E

Separates mantissas and exponents for exponential formats.

;

Separates positive and negative subpatterns. See the note below this table.

-

The default negative prefix.

%

Multiplies the number by 100 and shows it as a percentage.

Multiplies the number by 1000 and shows it as per mille.

¤

The localized currency sign. As mentioned above, HTML decimal or hexadecimal encoding can be used to show currency signs.

Note:

  • Using a special character in a pattern as a literal (that is, using the special character without a special meaning) is not supported.
  • All patterns are composed of a positive subpattern and an optional negative subpattern, such as #,##0.00;(#,##0.00). Each subpattern is composed of the following: a prefix, numeric part, and suffix. If an explicit negative subpattern has not been entered, the implicit negative subpattern is the - sign appended to the beginning of the positive subpattern. For example, 0.00 alone equals 0.00;-0.00. If an explicit negative subpattern does exist, it determines the negative prefix and suffix, the number of digits, and minimal digits. Other characteristics are not considered in the negative subpattern.


In this topic
  1. Special characters