Most Widgets show data labels for values and dates, which may depend on user culture and personal choices.
The properties panel has a “Format” section which allows to configure these labels. All number and date fields are listed there, and labels can be configured by clicking on the cog icon :
The Measure Formatting dialog allows to configure the label formatting for number fields :
Numbers can be shortened in several ways :
- Auto (default) : depending on how large the number is, a multiplicator symbol can be added : “K” for thousand, “M” for million, “B” for billion
- Ones : the full number is displayed without multiplicator symbol
The Decimal Places selector allows to force how many decimal places should be displayed for numbers :
Alternate symbols can be used to represent negative values :
Prefix / Suffix
Prefix (before the number) and/or Suffix (after the number) text can be used :
No space is added by default between the number and the prefix/suffix.
The Date Formatting dialog allows to configure the label formatting for
DateTime fields :
A selection of date format types is available, and a preview is shown at the bottom of the window as “Sample”.
Date format localization
Only the type of date format can be configured (short, long, etc…).
At runtime, the date localization will depend on localization choices of the user.
In order of decreasing priority :
- The Language selected by the user on Alpana Server contains culture information that will be used to localize the dates. Note : this is not available during Dashboard Preview from Alpana Designer.
- The culture selected by the user as preferred language in the web browser will be used.
- The culture of the display language of the web browser will be used.
Custom formats can also be configured, and a preview is shown at the bottom of the window as “Sample”. :
This allows to use text placeholders to define the custom date string.
There are 2 ways to configure a date format string :
- from a standard date format
- compose a custom string
Standard date formats
If the custom string is a single character, then you can use with one of the placeholders defined here as part of the .NET framework, and you will end up with one of the standard date formats that will adapt to your culture :
d: Short date pattern
D: Long date pattern
f: Full date/time pattern (short time)
F: Full date/time pattern (long time)
g: General date/time pattern (short time)
G: General date/time pattern (long time)
m: Month/day pattern
o: Round-trip date/time pattern
r: RFC1123 pattern
s: Sortable date/time pattern.
t: Short time pattern
T: Long time pattern
u: Universal sortable date/time pattern
U: Universal full date/time pattern
y: Year month pattern
Custom date strings
This allows to configure any date part in any order and use that as a label.
Use any text and include special placeholders to compose the date format.
The placeholders are defined here as part of the .NET framework, and a summary is below :
dd: the day of the month
dddd: the day of the week
ffffffff: decimals of the second
hh: the hour, using a 12-hour clock
HH: the hour, using a 24-hour clock
mm: the minute
MMMM: the month
ss: the second
yyyy: the year
:: the time separator
/: the date separator
\: the escape character allows to write a character without interpreting as a placeholder
'my text': the escape quotes allow to write a text without interpreting as a placeholder