Visualization - Number Options
Menu items listed under Create > Charts > Visualization - Number differ from other visualizations in that are designed to visualize a single number rather than a matrix or array.
The options in the Object Inspector are organized into three tabs: Inputs, Properties, and Format.
Inputs
DATA SOURCE
Data source Choose to input the numeric value shown inside the widget
- Type or paste data This is the simplest method where the value is typed in directly. In most cases a numeric values should be supplied, however, if Display is one of Number, Number in an oval or Number in rectangle then a non-numeric value can be supplied.
- Use an existing R output Link to another R output which outputs a numeric value.
- Table Link to a table. This can can be either a Q or R table. Options will be provided to select an entry by specifying a row and column from the table. Row and columns can be selected by either gving the index or the name. Multiple cells can be selected by seperating indices or names by commas. In this case, the sum of the cells will be given. If there has been ambiguity about whether an index or a name has been given, then it will taken as an index. This is because if row or column names contain commas they can only be specified using an index.
- Variable - Average Link to a numeric variable and take its average.
- Variable - Sum Link to a numeric variable and take its sum
- Variable - Percentage Link to a categorical or numeric variable. An option will be provided to select a particular category from the variable. If multiple categories a specified as comma separated list, then percentage that any of the listed categories occur will be given. If a variable from a Pick Any question is used, then category can be left blank. The percentage of times the variable is true (or Selected) is always used for this type of variable. Note that for numeric variables, the values are matched exactly. That is setting category = 1 will ignore observations with values of 1.1, etc. Instead you may want to set category to '1-2'. The range notation can only be used with numeric variables.
OUTPUT
Display Choose how the number should be displayed. Options are:
- Number
- Number in an oval
- Number in a rectangle
- Number in a donut
- Number on a gauge
- Number in a bar
- Number on an icon
- Pictograph (single icon)
- Pictograph (repeated icons)
For Number in a donut, Number on a gauge, Pictograph (single icon) the extent of the fill will reflect the size of the input value. For Pictograph (repeated icons), the size of the input value will be reflected by the number of icons shown.
Maximum value If Display is one of Number in a donut, Number on a gauge, Number in a bar, Pictograph (single icon), specify the value that would be represented by a completely full donut/gauge/bar/icon.
Minimum value This is the value that would be represented by an empty gauge/bar/icon. It is only used for Display is Number on a gauge, Number in a bar, Pictograph (single icon). The other visualizations implicitly assume the minimum value is zero.
Total number of icons This control can be used as to show the input data as a proportion whien Display is Pictograph (repeated icons). For example, to show the score out of 10, we can set this control to 10 (you will also need to deselect hide base image). If left blank this will default to ceiling(input value/scale).
Scale Scaling factor for input value when Display is Pictograph (repeated icons). By default the Scale is set to 1 so that the number of icons is given by the input value. But when the input value is either very large (or very small), it can be used so that each icon represents a unit specified by the Scale.
Format
SHAPE
Fill opacity A numeric value between 0 (transparent) and 1 (opaque).
Border width The width of the border around the shape. A value of zero indicates no border.
Border color The color of the border.
Border opacity A numeric value between 0 (transparent) and 1 (opaque).
Hole radius % The size of hole in pie or gauge as a proportion of the total area of the widget.
ICONS
Icon The icon used to create the pictograph. If Custom icon is selected, additional text fields Icon URL and Base icon URL will appear below.
Icon URL The URL (internet address) of the image to be used for the icon. The image may be in a JPEG or PNG format and must accessible from the internet (e.g. in a public Dropbox folder).
Base icon URL The URL of the image to be used for the unfilled icons. If left blank, unfilled icons will be hidden.
Layout can be set by constraining (1) the number of rows of icons, (2) the number of columns of icons or (3) the width-to-height ratio of the pictograph. Options (1) and (2) will arrange the icons into a specific configuration, but option (3) is useful when the range of the input data is unknown and we want to the icons to maximally fill a particular area.
Row padding Vertical space between icons as a proportion of total height. This should be a number between 0 (no spacing between icons) and 0.99 (almost all output height is used for padding).
Column padding Horizontal space between icons as a proportion of total width. This should be a number between 0 (no spacing between icons) and 0.99 (almost all output width is used for padding).
Hide base image When selected, the unfilled icons are not shown.
Icon base color Color of unfilled icons when base image is not hidden. Note that custom icons cannot be colored.
Direction of fill determines the order in which icons are filled.
Autosize Automatically sizes the chart to fill the window/slot.
Icon width Controls the width of the icon in pixels, when Autosize is turned off. This option can be used to ensure that multiple pictographs placed on the same page are the same size.
FILL COLOR
Default fill color The default color used to fill the shape or icon. This color will be used if no threshold(s) are supplied, or the input value is lower than any of the thresholds.
Threshold i The cut-off above which to use different fill color. These should be provided in increasing order.
Fill color i The fill color to use if the input value is above threshold i. For example if threshold 1 = 1, threshold 2 = 2, and default fill color is red, fill color 1 is yellow and fill color 2 is green. Then for an input value of 0.5, we would color the shape/icon red (default fill color), but for an input value of 5, we would use green (fill color 2) instead.
FONT
Controls are provided to adjust the font family and font color of all the text elements in the visualization. However, they can be adjusted for each of the text elements separately in the other groups below.
Font units Choose whether font sizes are specified in pixels (px) or points (pt).
DATA LABEL
Show data label This option is only available if Display is one of Number on an icon, Pictograph (single icon) or Pictograph (repeated icons). It can be one of None, Overlayed on icon, Above icons, Below icon. This allows icons to be shown without a data label.
Data label prefix Optional string which will be prepended to the data label.
Data label suffix Optional string which will be appended to the data label.
Number type One of Number, Percentage or Scientific. Value treated as percentages will be multiplied by 100 (e.g 0.05 is converted to 5%). If this is not desired, then use the data label suffix instead.
Decimals shown The number of decimal places to show in the data labels.
Data label font size Font size of data labels in units of pixels.
Data label font weight One of Normal or Bold.
Data label horizontal alignment One of Left, Center, Right.
Data label vertical alignment One of Top, Middle, Bottom. This option is only available if displaying Number, Number in an Oval or Number in a Rectangle. Note that when Top or Bottom is chosen, then the Text above or Text below cannot be moved inside the shape.
Data label vertical padding Controls the vertical space between the data label and the shape/icon. When displaying Number, Number in an Oval or Number in a Rectangle, padding can take negative or positive values.
Data label horizontal padding Control to adjust horizontal position of the data label. Negative values will move the data label left while positive values will move the data label right.
Data label font family Controls the font of the data label text.
Data label font color Controls color of the data label text.
GAUGE LABELS
Show maximum and minimum values Whether or not to show the maximum or minimum values on the gauge.
Labels inside shape Whether the gauge labels should be placed inside or outside the gauge.
Prefix Optional text to prepend to gauge labels
Suffix Optional text to append to gauge labels
Number type One of Number, Percentage or Scientific.
TEXT ABOVE/BELOW
Text above/below Optional text to place above or below the data label. This differs from the prefix in that it can have different font settings to the prefix.
Text inside shape Whether the text should be shown inside or outside the shape.
Font size Font size of text above or text below in units of pixels.
Font weight One of Normal or Bold.
Horizontal alignment One of Left, Center, Right.
Font family Controls the font of the text above or text below.
Font color Controls color of the text above or text below.
Vertical padding Controls the vertical space between the text and the shape/icon. If displaying icons or pictographs, padding can only take positive value. But for other types of Display, padding can take both positive or negative values (i.e. text can sit on top of shape).
Horizontal padding Control to adjust horizontal position of the text. Negative values will move the text left while positive values will move the text right.
Vertical space. Controls spacing around the text. If Text inside shape is selected, this controls how far the text is from the center of the shape. If the text is on the outside, this controls the spacing from the edge of the shape.
HOVERTEXT
Hover text Optional text that can be shown when the mouse is placed over the data label.
Hover background color The fill color of box containing the hover text.
Hover font size Font size of the hover text.
Hover font family Font family of the hover text.
BACKGROUND
Transparent background Untick this option to control the background color and background opacity.
Background color Controls color of the background.
Background opacity Opacity should be between 0 (transparent) and 1 (opaque).
Margins Controls how much space between the edge of the iframe and the shape or text. When Display is Number in a rectangle, you may need to increase the margins to see the background color. In some cases if the Text above/below is truncated, you may also need to manually increase the margins.