Building New Dashboards

Overview

This documentation talks about building a new dashboard in the DSS and also it defines the configurations required for the analytics service. Analytics microservice which is responsible for building, fetching, aggregating, and computing the data on ElasticSearch to a consumable data response. Which shall be later used for visualizations and graphical representations.

Pre-requisites

Before you proceed with the configuration, make sure the following pre-requisites are met -

  • Prior Knowledge on JSON

  • Prior Knowledge on Elasticsearch Query Language

  • Prior Knowledge on Kibana

  • DSS setup

Adding New Dashboard Configurations

Key Functionalities

  1. Adding new Roles for Dashboards

  2. Adding a new Dashboard

  3. Adding new Visualizations in existing Dashboard

  4. Adding new charts for visualizations :

1. Adding Roles and Dashboards :

  • To add a new role, We have to make changes in the RoleDashboardMappingsConf.json (roles node) configuration file has to be modified as below. In the roles array, every JSON object is unique based on the id. The name of the role is defined in the roleName attribute.

  • If we want to assign any dashboard to a particular role, Add the id and name of the dashboard in the dashboards array. This dashboard id is unique and it’s referred to as the MasterDashboardConfig.json file configuration.

Any number of roles & dashboards can be added

Below is a sample to add a new role object

2. Adding a new Dashboard

  • To add a new dashboard, We have to make changes in the MasterDashboardConfig.json (dashboards node) that has to be modified as below.

  • Add the new JSON object in the dashboards array. Add the dashboard name in the name attribute, Id should be unique, which is used for assigning a role for the dashboard. We will talk about visualizations below.

Dashboards array add a new dashboard as given below

3. Adding new Visualizations in existing Dashboard

  • To add new visualizations, We have to make changes again in the MasterDashboardConfig.json (vizArray node) that has to be modified as below. Add the visualization name to the name attribute. We will add all the visualizations in the vizArray array.vizArray will contain the name of the visualization, vizType as visual type, noUnit, and charts.

  • charts array contains chart API configuration query details. The id is referred to as the chartapiconfig.json file’s key to fetch the required data from elastic search’s index. And the name attribute is referred to as the name of the chart in localization.

vizArray is to hold multiple visualizations

4.Adding charts for visualizations

  • To add a new chart, chartApiConf.json has to be modified as shown below. A new chartid (key of the JSON) has to be added with the chart node object. In the chartid JSON contains the chart name, chart type, valueType, documentType, aggregationPaths and queries attribute.

  • Types of the chart: Metric, Pie, Line, Table, and xtable

  • AggregationPaths: Query result will take from this path.

  • valueType: Based on the value type result will be shown in the UI. Different types of valueType are Amount, percentage, and number.

  • queries array will contain the information of the module, requestQueryMap (request param of the API), dateRefField (Based on this field date data will be filtered), indexName, and aggrQuery. We can add multiple modules queries in a single chart.

For more information please refer the reference documents listed below.

Reference Docs

Creative Commons LicenseAll content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.

Last updated

​All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.