Number formats
Some of the content in this topic may not be applicable to some languages.
The Microsoft Office Chart Component uses the regional settings in Microsoft Windows Control Panel to determine how number, currency, date, and time formats are displayed in charts, both in the design program and at run time in the browser. For example, these settings determine whether years are displayed with two digits or four digits. See Windows Help for information about these formats.
In Microsoft Visual Basic or in a script, you can assign custom number formats to the data. For more information, see Help for writing scripts and programs that use charts for the Web.
The following number formats are available in the Number list under Text format on the Format tab in the Commands and Options dialog box, which is available when an item such as an axis value or data label is selected on the chart.
Format | Effects |
---|---|
General | Displays a number with no thousands separator, and preceded by a minus sign if negative. For example, –36403. Displays up to 11 digits, or 10 digits with a decimal point, rounding additional digits to the right of the decimal point. Displays numbers with more than 11 digits to the left of the decimal point in scientific format. Displays numbers right aligned and text left aligned. |
General Date | Displays a serial number as a date or time, or both. For example, 36403.24583 appears as 8/31/99 05:54 AM. The decimal part of the number is the time. If a number has no decimal part, the format displays only a date. For example, 35920 appears as 5/5/98. If a number has only a decimal part, the format displays only a time. For example, .77 appears as 6:28 PM. |
Long Date | Displays a date by using the Windows Control Panel regional setting for the long date format. An example is Thursday, January 25, 2001. |
Medium Date | Displays a date according to the Windows Control Panel regional setting for the month and date separator, and displays two digits for the year. For example, Jan/25/01. |
Short Date | Displays a date by using the Windows Control Panel regional setting for the short date format. For example, 1/25/01. |
Long Time | Displays time by using the Windows Control Panel regional setting for the long time format. For example, 8:45:36 PM. |
Medium Time | Displays time in 12-hour format, including the AM or PM designator and not including seconds. For example, 8:45 PM. |
Short Time | Displays time in 24-hour format, not including the AM or PM designator and not including seconds. For example, 8:45 PM appears as 20:45. |
Currency | Displays a number by using the Windows Control Panel regional setting for currency, with a currency symbol and a thousands separator, if appropriate, and two decimal places. For example, $2,532.75. |
Euro Currency | Displays a number as euro currency, with a thousands separator and two decimal places. The euro sign is placed before or after the number according to the regional settings for currency in Windows Control Panel. For example, with the default United States English regional settings, 12.35. |
Fixed | Displays a number with two decimal places. For example, 68.3 appears as 68.30. |
Standard | Displays a number with two decimal places, using the thousands separator specified in the list separator setting in the Windows Control Panel regional settings. For example, 1800 appears as 1,800.00. |
Percent | Displays a number multiplied by 100, with two decimal places and including a percent sign. For example, 0.8914 appears as 89.14%. |
Scientific | Displays a number in exponential notation. For example, 1.25E+10. |
Yes/No | Displays No if the number is 0, and displays Yes for any other number. |
True/False | Displays False if the number is 0, and displays True for any other number. |
On/Off | Displays Off if the number is 0, and displays On for any other number. |