Individual DSS configurations like FSM - DSS configuration is built on the DSS module where configuration and data are received from a set of APIs which can be accessed by users with specific user roles.
Role - FSM_ADMIN
Module - FSM
API Curl
Data for each configuration is fetched using {env}/dashboard-analytics/dashboard/getChartV2?_=1627404593531
API CURL -
Each of the charts will have unique data parameters and responses in distinct API calls.
Fundamentally DSS has various functionalities including filtering of data, charts and drill-down charts with download PDF, Image and .XLS files. This is achieved by various components utilizing external plugins and internal services
Filter component in DSS consists of 4 components:-
The DateRange component is a styling wrapper around DateRangePicker plugin.
Filter on the basis of ULB and DDR (District) is done by selecting single or multiple instances of DDR/ ULB. DDR is an encapsulation of ULBs, and getChart API filters data on the basis of ULB tenants,
Sample request header -
The component in itself uses MultiSelectDropdown
component
React Component named Switch which uses styled radio inputs.
The GenericChart is a common wrapper for all charts. It adds the basic styles to all the chart components.
The MetricChart component is a wrapper component around the MetricChartRow component. MetricChartRow component uses getChart API to fetch data for the “METRIC“ chart type. The MetricData component is a styling component used to format data.
The CustomAreaChart component is used to render line chart type. It can format data based on denomination filter data. It uses the AreaChart component from the recharts package to draw the chart.
The CustomBarChart component is used to render performing-metric chart type. It uses the BarChart component from the recharts package to draw the chart.
The CustomHorizontalBarChart component is used to render horizontal bar chart type. It uses the BarChart component from the recharts package to draw the chart.
The CustomPieChart component is used to render the donut chart type. It displays the top 4 categories and aggregates all the other categories into the “Others“ category. It uses the PieChart component from the recharts package to draw the chart.
The CustomTable component is used to render table chart types. The insights are calculated by fetching the previous year's data and compared with the current data.
The download service is a common service used by all the chart components to facilitate the download/share pdf option. It is handled by using the JSPDF package.