Pivot Report - LiquidAnalytics/ld-api-examples GitHub Wiki
#Pivot Report Configuration ##Description/Overview
- This is the specification for the Configuration of PivotReport.
- A PivotReport Is always found on clicking an InfoCard or Dashboard Card or from a Hamburger menu(AppDef).
##Basic Information about the PivotReport
-
A PivotReport looks like the example shown below.
-
As seen in the image above the screen is divided in 3 parts where left upper corner is a Dashboard Card (will be blank if pivotReport is coming from an InfoCard.), Upper right corner is a pivot bar chart, and lower half is the pivot table/DataGrid
##Steps to Configure Pivot Report
- LiquidInsightPop with liquidInsightPopType should be “PivotReport”
- PivotReport
- Create an item of Type PivotReport with pivotReportId same as liquidInsightPopId.
- DataGridDefId of the dataGrid that we want to display on the lower half of the screen.
- FunctionId is the same as function of the dataGrid.
- Rows is a block of type PivotReportRow with fields {‘field’, ’title’, ‘sortBy’, ‘sortOrdering’}. Number of Rows indicates how many levels we can drill down to get detailed information. 1. Field:- Field refers to a field of a schema. (eg year, month, week, day etc) using which we will drill in to get a detailed information. 2. Title:- At that level of bar chart what title you want to see above the chart for better understanding (eg ‘New Projects Per Year’) 3. SortBy:- This is an enumeration field where you need to select either ‘label’ or ‘value’. Label indicated the bars in the report will be
- Values is a block of type PivotReportValue with fields {‘field’, ‘summation’}. Number of values indicates number of bars we will see per label (eg for a chart of Won Projects MTD initially we can have 2 bars per year ($ Won, # of Projects). 1. Field:- Field refers to the field of schema and the value of that field will be treated as count of that bar(eg # of Projects). 2. Summation:- This is an enumeration field where you have to select either ‘sum’, ‘average’, ‘count’ (eg sum when field is $ of the Projects, count when field is # of Projects, average when we want average of # of Projects per user)
- Configuration of DataGrid that will display the table in the lower half of the pivotReport.
- Configuration of Function for the dataGrid and pivot bar char.