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. Use client-statistic for a client statistic widget

layout: layout definition of the client statistic widget

  • x: HTML DOM Style left is calculated as formula x / 12 * 100%

  • y: HTML DOM Style top is calculated as formula y / 12 * 100%

  • w: HTML DOM Style width is calculated as formula 60 * w + 20 * (w - 1)

  • h: HTML DOM Style height is calculated as formula 60 * 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 is true, set to false to hide the icon.