Configure Statistic Widget
Define Statistic Widget
The Statistic widget of the Portal dashboard displays statistic and charts.
Below is a sample JSON definition of a statistic widget in the Portal dashboard
{
"type": "client-statistic",
"id": "client_statistic_1",
"layout": {
"w" : 2,
"h" : 2,
"x" : 8,
"y" : 2
},
"chartId": "10",
"showFullscreenMode": true
}
The basic JSON structure of a statistic widget
id
: ID of the widget
type
: type of the widget. Useclient-statistic
for a client statistic widget
layout
: layout definition of the client statistic widget
x
: HTML DOM Styleleft
is calculated as formulax / 12 * 100%
y
: HTML DOM Styletop
is calculated as formulay / 12 * 100%
w
: HTML DOM Stylewidth
is calculated as formula60 * w + 20 * (w - 1)
h
: HTML DOM Styleheight
is calculated as formula60 * h + 20 * (h - 1)
chartId
: ID of the standard client statistic chart. For more information, please refer to Portal.StatisticCharts.
showFullscreenMode
: visibility of the fullscreen mode icon. The default value istrue
, set tofalse
to hide the icon.