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

Offline pbeilschmidt

  • Administrator
  • Hero Member
  • *****
  • Posts: 594
  • e!Sankey - show the flow.
    • e!Sankey - show 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:
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.
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.
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.
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).
The letter 'e' in the number format field is used to display a number in the scientific number format (standard form, exponential notation).

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').
e!Sankey Forum Moderator
ifu Hamburg GmbH

Offline Jörn Zietz

  • Administrator
  • Hero Member
  • *****
  • Posts: 193
Re: Hint: Number Formatting for Arrow Label Quantities
« Reply #1 on: August 09, 2013, 06:06 PM »
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