416.467.9100 | Dundas Data Visualization | Login
Welcome Guest
This is the support page for the legacy Dundas Dashboard application. For assistance with the current Dundas BI application please click here.
Dashboard v5.0

This site makes extensive use of JavaScript.

Please enable JavaScript in your web browser and reload the page before proceeding.

Formatting Text

Hide navigation
RSS
Modified on Sun, 29 Jul 2012 06:08 PM Categorized as Design, User Interface
Click to return to: Documentation


Overview

The Format Text dialog is accessible from many parts of the application where format specifier strings for text can be entered. This dialog composes a format specifier string based on your selections, which saves you from having to enter the specifier string manually.

The Format Text dialog.

The Format Text dialog.


Using the Format Text dialog

Accessing the dialog

You can access the Format Text dialog from different places in the application, including:

  • Chart properties | Y Axes | Scale | Label Format property.
  • Radial Gauge properties | Scales | Labels | Format property.

Specifying the format

Specify the format for your text as follows:

  1. In the Format Text dialog, go to the list on the left, then select the Category that best describes the text you want to display.
  2. Depending on the category, configure its specific options on the right. For example, if you chose the Number category, enter the number of decimal places you want to see.
    The Number category.
  3. Verify the Sample text at the top of the dialog shows the format you want.
  4. Click OK to close the Format Text dialog.

Text categories

The following table lists the supported text categories:

CategoryOptionsSample format specifierSample text
Generaln/aempty string1000.12345
CurrencyNumber of decimal placesC2$1,000.12
PercentNumber of decimal placesP0100 %
NumberNumber of decimal placesN1$1,000.1
ScientificPrecisionE21.00E+003
DateShort Date
Long Date
Month Year Pattern
Month Day Pattern
DMarch 15, 2011
TimeShort Time
Long Time
T12:00:00 AM
DateTimeDate and Time
Date and Long Time
Full Date and Time
Full Date and Long Time
RFC1123 Date String
Sortable Data String
Universal Sortable
g15/03/2011 12:00 AM
Custom DateTimeFormat specifier stringyyyy-MM-dd hh:mm:ss tt2011-03-15 12:000:000 AM
Custom NumericFormat specifier string[>=1000]#,.##'K'1K

Warning: The use of currency formats such as “C” or “C2” should be avoided in your dashboards because the displayed currency symbols change depending on the language/culture selected by the users viewing your dashboards. For example, suppose you have designed a dashboard to display sales figures on a chart in US dollars, but you used the “C” format to do this. A user in France who then views your dashboard using French (France) culture settings will see the exact same chart values displayed using the Euro dollar sign instead, which is misleading. To avoid this type of problem, you can hard-code currency symbols directly into your format strings so that they remain invariant under culture changes.

Custom DateTime

Use the Custom DateTime category to specify exactly what components of the date and/or time to include in the formatted value and in what order.

To set up a custom DateTime format:

  1. In the Format Text dialog, select the Custom DateTime category.
    The Custom DateTime category.
  2. The text box on the right is where the overall format specifier string will be composed. A dropdown menu to the right of the text box provides a number of samples, which can be selected or combined together as desired.

The following table lists supported components for custom date and time formatting, which can be combined together to make a format:

Sample FormatSample TextDescription
y12The year, from 0 to 99
yy12The year, from 00 to 12
yyy2012The year, with a minimum of three digits
yyyy2012The year as a four-digit number
yyyyy02012The year as a five-digit number
M6The month, from 1 through 12
MM06The month, from 01 through 12
MMMJunThe abbreviated month name
MMMMJuneThe full month name
s1The quarter number from 1 through 4,
or week number from 1 through 53
(where supported)
ss01The quarter number from 01 through 04,
or week number from 01 through 53
(where supported)
d7The day of the month, from 1 through 31
dd07The day of the month, from 01 through 31
dddWedThe abbreviated name of the day of the week
ddddWednesdayThe full name of the day of the week
gA.D.The period or era
h4The hour in 12-hour time, from 1 through 12
hh04The hour in 12-hour time, from 01 through 12
H16The hour in 24-hour time, from 0 through 23
HH16The hour in 24-hour time, from 00 through 23
m9The minute, from 0 through 59
mm09The minute, from 00 through 59
s6The second, from 0 through 59
ss06The second, from 00 through 59
f
ff
fff
...
0
01
015
...
Fractions of a second with the specified number
of digits of precision including zeros
F
FF
FFF
...
0
01
015
...
Fractions of a second with the specified number
of digits of precision excluding trailing zeros
tPThe first character of AM/PM
ttPMAM/PM
z-5Hours offset from UTC without leading zeros
zz-05Hours offset from UTC with leading zeros
zzz-05:00Hours and minutes offset from UTC
"Word"
'Word'
WordDisplays the enclosed text unchanged
\hh\ displays the following character unchanged
%D7% formats using the single character, instead of
the standard format string corresponding to that
character used by other format categories.

Note: Quarter and week numbers are only supported for chart controls in certain scenarios.

Custom Numeric

Use the Custom Numeric category to specify exactly the precision of a number, preceding or following characters, and some conditions to use when formatting.

To set up a custom numeric format:

  1. In the Format Text dialog, select the Custom Numeric category.
    The Custom Numeric category.
  2. The text box on the right is where the overall format specifier string will be composed. A dropdown menu to the right of the text box provides the option to clear and a number of samples.
    Image

The following table lists supported components for custom numeric formatting:

CharacterSample NumberSample FormatSample TextDescription
012

0
0
000.0
0
12
012.0
0
Digit placeholder displaying at least the specified number of digits, including zeros
#12

0
#
###.#
#
12
012.
 
Digit placeholder displaying at least the specified number of digits, excluding zeros
.0.45

15
0.00
#.00
0.00
#.##
0.45
.45
15.00
15
Placeholder for the decimal separator
,12159

2000000
0,0
#,
0,0,,
12,159
12
2
Group separator if between digits, divides by 1000 if after digits
%0.120.0%12.0%Multiplies by 100 and displays the percentage symbol
0.5190‰519‰Multiplies by 1000 and displays the per mille symbol
E05198460.0E005.2E05Displays exponential notation, with zeros specifying the precision after E
'...'
"..."
230 'degrees'23 degreesDisplays the enclosed text unchanged
\5\#0#5Displays the following character unchanged
;12
0
-12
0;(0);-12
-
(12)
Formats positive numbers, followed by negative, followed by (optionally) zero



Conditional formatting

You can also use the Custom Numeric category to apply different text formats depending on the numerical value of the text. For example, you can add a conditional formatting rule that switches to a more compact format when the numerical value of the text is larger than 1000. This is useful for minimizing the size of axis labels, which can help you to create more compact charts and other visualizations.

To set up a conditional numeric format:

  1. In the Format Text dialog, select the Custom Numeric category.
    The Custom Numeric category.
  2. The text box on the right is where the overall format specifier string will be composed. A dropdown menu to the right of the text box provides a couple of options:
    • Clear - Clears the overall format specifier string from the text box and removes all conditional format rules from the grid below.
    • Shortened Thousands/Millions - Adds a default specifier string and the set of corresponding conditional format rules. This default set of rules produces compact text when values exceed one thousand or one million in magnitude. If you choose this option, simply click OK to accept the overall format specifier string.
      The Shortened Thousands/Millions option.

Conditional formatting syntax

A conditional format specifier string has the following syntax:

[{ComparisonOperator}{NumberOperand}]{FormatString};[{ComparisonOperator}{NumberOperand}]{FormatString};{UnconditionalFormatString}

Tip: The dialog composes and updates the format string automatically when you add conditional format rules.

Adding a conditional format rule

As an example, follow these steps to add a conditional rule so that when the text value is greater than or equal to one million, use scientific notation:

  1. Click the plus sign button at the bottom of the dialog. A new rule is added to the Conditional Format Rules dialog.
  2. Click the Operator dropdown list and set it to >=.
  3. Type 1000000 into the Value cell.
  4. Type E0 in the Format cell. You can also click the edit button next to the cell in order to use the Text Format dialog to compose the format specifier string for this rule.

The text box is updated with the overall format specifier string.

Adding a new conditional format rule.

Adding a new conditional format rule.


Removing a conditional format rule

To remove a conditional format rule:

  1. Locate the rule that you want to remove from the Conditional Format Rules grid.
  2. Click the corresponding cell in the Sample grid column in order to select the rule.
  3. Click the delete button at the bottom of the dialog.

Reordering conditional format rules

Rules are evaluated according to the order in which they appear in the Conditional Format Rules grid (&ie; from top to bottom). If a rule is evaluated and is a match, subsequent rules will be ignored.

Follow these steps to reorder a selected rule:

  1. Locate the rule that you want to reorder from the Conditional Format Rules grid.
  2. Click the corresponding cell in the Sample grid column in order to select the rule.
  3. Use the up or down arrow buttons to reorder the selected rule.

Related topics



Click to return to: Documentation
  Name Size
- DDHighLevelArchitecture.pdf 0 B

About Dundas | Contact Us Follow us on Twitter! | Privacy Statement | Report Site Issues

Copyright © 2009-2014 Dundas Data Visualization, Inc.