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 Format button

Measure Formatting

The Measure Formatting dialog allows to configure the label formatting for number fields :

Measure Format dialog

Number Representation

Numbers can be shortened in several ways :

Measure Format Representation
  • 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 :

Measure Format Decimals

Negative Values

Alternate symbols can be used to represent negative values :

Measure Format Negative

Prefix / Suffix

Prefix (before the number) and/or Suffix (after the number) text can be used :

Measure Format prefix

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

Measure Format Date predefined

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 :

  1. 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.
  2. The culture selected by the user as preferred language in the web browser will be used.
  3. 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”. :

Measure Format Date custom

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, m : Month/day pattern
  • O, o : Round-trip date/time pattern
  • R, 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, 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 month
  • ddd, dddd : the day of the week
  • f, ff, fff, ffff, fffff, ffffff, fffffff, ffffffff : decimals of the second
  • h, hh : the hour, using a 12-hour clock
  • H, HH : the hour, using a 24-hour clock
  • m, mm : the minute
  • M, MM, MMM, MMMM : the month
  • s, ss : the second
  • t, tt : AM/PM
  • y, 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
Last modified: Feb 17, 2022

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment