Introduction
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 :
Measure Formatting
The Measure Formatting dialog allows to configure the label formatting for number fields :
Number Representation
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
- Thousands
- Millions
- Billions
Decimal Places
The Decimal Places selector allows to force how many decimal places should be displayed for numbers :
Negative Values
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.
Date Formatting
The Date Formatting dialog allows to configure the label formatting for Date
or DateTime
fields :
Pre-defined formats
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
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 patternD
: Long date patternf
: 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
,m
: Month/day patternO
,o
: Round-trip date/time patternR
,r
: RFC1123 patterns
: Sortable date/time pattern.t
: Short time patternT
: Long time patternu
: Universal sortable date/time patternU
: Universal full date/time patternY
,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 :
d
,dd
: the day of the monthddd
,dddd
: the day of the weekf
,ff
,fff
,ffff
,fffff
,ffffff
,fffffff
,ffffffff
: decimals of the secondh
,hh
: the hour, using a 12-hour clockH
,HH
: the hour, using a 24-hour clockm
,mm
: the minuteM
,MM
,MMM
,MMMM
: the months
,ss
: the secondt
,tt
: AM/PMy
,yy
,yyyy
: the year:
: the time separator/
: the date separator\
: the escape character allows to write a character without interpreting as a placeholder"my text"
,'my text'
: the escape quotes allow to write a text without interpreting as a placeholder
Post your comment on this topic.