Difference between revisions of "MI Label Format Number"
Jump to navigation
Jump to search
Go to Layer Control, tick the label box for the layer you wish to label and press Label…. to display the dialog below. In the “Label with:” field, select Expression…
The dialog below should now be displayed. For the expression, use the Format$() string function as shown below (this can be entered by using the Functions drop down list on the right of the dialog). The first argument is the attribute (Elevation in the example below), and the second is a format string. The attribute can be entered by using the Columns drop down list. For the format string, use something like “0.00” making sure that you provide the quotes. MapInfo uses the same (or very similar) formatting strings as Microsoft Excel does when formatting a Number cell. Examples are “0.00” to display to two decimal places, “0.0” to display to one decimal place. Examples from the MapInfo help are shown further below. The line entered in the dialog below is:
Ari Craven (talk | contribs) |
Ari Craven (talk | contribs) |
||
Line 1: | Line 1: | ||
To control the number of decimal places when creating labels for a number (float) field (eg. a Z or Elevation attribute), follow these steps. | To control the number of decimal places when creating labels for a number (float) field (eg. a Z or Elevation attribute), follow these steps. | ||
− | <li>Go to Layer Control, tick the label box for the layer you wish to label and press Label…. to display the dialog below. In the “Label with:” field, select Expression… | + | <li> Go to Layer Control, tick the label box for the layer you wish to label and press Label…. to display the dialog below. In the “Label with:” field, select Expression… |
[[File:12.1.6.png|frame|none]] | [[File:12.1.6.png|frame|none]] | ||
+ | </li> | ||
− | + | <li> The dialog below should now be displayed. For the expression, use the Format$() string function as shown below (this can be entered by using the Functions drop down list on the right of the dialog). The first argument is the attribute (Elevation in the example below), and the second is a format string. The attribute can be entered by using the Columns drop down list. For the format string, use something like “0.00” making sure that you provide the quotes. MapInfo uses the same (or very similar) formatting strings as Microsoft Excel does when formatting a Number cell. Examples are “0.00” to display to two decimal places, “0.0” to display to one decimal place. Examples from the MapInfo help are shown further below. The line entered in the dialog below is: | |
</li> | </li> |
Revision as of 12:59, 5 September 2011
To control the number of decimal places when creating labels for a number (float) field (eg. a Z or Elevation attribute), follow these steps.