Configure data tables in PPF report definitions with threshold-based color coding.
Full Example
Below is an example of all available options when defining a table. Only options marked as required must be defined — all others use sensible defaults.
Required. HTML element IDs where the table should render. For example, if the HTML contains <div id='speedtable'></div>, use: ele: ['speedtable']
data
Required. The data set name to use. Example: data: 'speeddata'
type
Required. Must be 2 for a table widget.
metrics
Required. Metrics to display as table columns, in testtype.metric format. Metrics must be available for the chosen data set. See available metrics. Example: metrics: ['speed.dspeed', 'speed.uspeed']
metricnames
Required. Friendly names for the table heading row, one per metric. Example: metricnames: ['Download', 'Upload']
datadepend
If the widget depends on a certain data type, define it as an array. Common types: voip, act (Quality), route, capacity.
Styling Options
All styling options are optional and use sensible defaults if not specified.
Key
Description
Example
bordercolor
Color of the table border, including cell and row borders.
'#333333'
cellspacing
Spacing between cells. Also affects border width.
'2px'
cellpadding
Padding within cells.
'5px'
fontsize
Font size for table text.
'13px'
width
Width of the table (pixels or percentage).
'100%'
headWs
White-space for heading cells. Use 'nowrap' to prevent wrapping.
'normal'
rowWs
White-space for result cells. Use 'normal' to allow wrapping.
'nowrap'
Other Options
Key
Description
thresholds
Threshold file to use for color-coding results (bad, okay, good). MCS supports multiple threshold files, which must be specified when setting up data sets. Example: thresholds: 'default'
url
Makes column headings clickable. The array position determines which heading is activated. Example: url: ['https://www.visualware.com', ''] makes the first heading clickable but not the second.