Author Topic: Hint: Number Formatting for Arrow Label Quantities  (Read 10577 times)

Offline pbeilschmidt

  • Administrator
  • Hero Member
  • *****
  • Posts: 500
  • e!Sankey - show the flow.
    • Umberto - know the flow.
Hint: Number Formatting for Arrow Label Quantities
« on: May 18, 2010, 10:27 AM »
It is possible to format the display of the number strings in the automatically created Sankey Arrow Labels.
 
The number format can be defined per unit type. In the Controller window click on the button 'Edit Unit Types'. In the column 'Number Format' enter the format string.

Examples of format strings:
 
0.###
The number is dispayed with three decimal places. If it has more decimal places it will be rounded to three decimal digits. It it has less than three, the filling zeros will not be displayed.
 
0.00
The number is shown with exactly two decimal places. The value will be rounded to two decimal places, or filled with zeros if there are less. This is the common number format for currencies.
 
0,0
Use a comma after the first zero to display thousand separators (e.g. five million is shown as '5,000,000'). Please note that the thousand separator from the Windows Regional Settings is used.
 
0,0.00
The comma after the first zero is used to add thousand separators (see above). The number of decimal places is fixed to two places (see above).
 
e
The letter 'e' in the number format field is used to display a number in the scientific number format (standard form, exponential notation).

0.0;"error";<"0,1"
A combination of number formatting strings can be used. The one shown above is a combination of three format strings, separated by semicolons (';').
The first section ('0.0') is applied to positive numbers (fixed one decimal place, see above).
The second section (string "error") is used for negative values. Since negative values can not be displayed in e!Sankey, a specific number format is not applicable. Instead of the negative number the string within the quotation marks is shown.
The third section ('<"0,1"') can be used for null values. If, for example, rounding of very small values would turn the number to zero, the operator and the string within the quotation marks can be shown (in this example '<0,1').
Peter Müller-Beilschmidt
e!Sankey Forum Moderator
ifu Hamburg GmbH

Offline Jörn Zietz

  • Administrator
  • Hero Member
  • *****
  • Posts: 192
Re: Hint: Number Formatting for Arrow Label Quantities
« Reply #1 on: August 09, 2013, 06:06 PM »
0.##e+000
In some cases it might be usefull to limit the number of significient digits for scientific number format. The example displays 3 digits with exponent.
Jörn Zietz
e!Sankey Team
ifu Hamburg GmbH