Skip To Content

Format numbers

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

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

Operations Dashboard determines users' locales based on either their language settings in their ArcGIS user profiles, or if they are accessing dashboards anonymously, the language settings in their web browsers.

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

Pattern setting

Below are the number formatting conventions that Operations Dashboard supports. They are inspired by the number formatting patterns described in Unicode's Common Locale Data Repository (CLDR) documentation.

  • Entering . indicates where a decimal point should go.
  • Entering , indicates where a thousands separator should go.
  • 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 # means no padding. If the number is too short, nothing displays in the dashboard.
  • Entering HTML decimal or hexadecimal encoding can be used for displaying currency signs. For example, the euro sign will appear by entering the HTML decimal encoding € or the hexadecimal encoding €. Similarly, the yen sign will display by entering the HTML decimal encoding ¥ or the hexadecimal encoding ¥.

Below are some 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 below patterns get 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

#,##0.00€

1,234.57 €

1 234,57 €

1.234, 57 €

#,##0.00¥

1,234.57¥

1 234,57¥

1.234,57¥

There is no limit on 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. Operations Dashboard does support some special characters though 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 , gets replaced by ,. In this instance, a character replacement still occurs. If the symbols are changed, then the grouping character also changes. There are also a few special characters that impact formatting behavior just by their presence. The percent character results in the value being multiplied by 100 before it appears in the dashboard.

Below is a table that describes the effects of certain special characters on number formats in dashboards.

Symbol

Meaning

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.

X

Any other characters can be used in the prefix or suffix.

'

Used to quote special characters in a prefix or suffix.

Note:

All patterns are composed of a positive subpattern and an optional negative subpattern, such as #,##0.00;(#,##0.00). Each subpattern is comprised of the following: a prefix, numeric part, and suffix. If an explicit negative subpattern has not been entered, then the implicit negative subpattern is the - sign appended to the beginning of the positive subpattern. For example, 0.00 by itself 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