Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleCourse Enrollment Report: Sample Config JSON
{
  "id": "api.report",
  "ver": "1.0",
  "ts": "2019-04-25 13:54:53:905+0530",
  "params": {
    "resmsgid": "9a2b9010-6733-11e9-a5f9-a9ba66dcacb1",
    "msgid": null,
    "status": "success",
    "err": null,
    "errmsg": null
  },
  "responseCode": "OK",
  "result": [
    {
      "id": "course_enrollment_report",
      "label": "Course Enrollment Report",
      "title": "Course Enrollment Report",
      "description": "Reports related to show the course wise enrollment numbers,to show the enrollments by course as a timeline graph, to show the enrollments by district.",
      "dataSource": "/reports/sunbird/daily_metrics.json",
      "charts": [
        {
          "datasets": [
            {
              "data": [
                "54814",
                "51356",
                "67348",
                "176538",
                "214892"
              ],
              "label": "Enrollment Report by Course"
            }
          ],
          "colors": [
            {
              "borderColor": "rgb(1, 184, 170)",
              "backgroundColor": "rgba(12, 18479, 170157, 0.21)"
            }
          ],
          "labels": [
            "English Training Program",
            "Physical Science Training Program",
            "Maths Training Program"
          ],
          "chartType": "horizontalBar",
          "options": {
            "scales": {
              "yAxes": [
                {
                  "scaleLabel": {
                    "display": true,
                    "labelString": "Course Name"
                  }
                }
              ],
              "xAxes": [
                {
                  "scaleLabel": {
                    "display": true,
                    "labelString": "No of enrollments"
                  }
                }
              ]
            },
            "tooltips": {
              "intersect": false,
              "mode": "x-axis",
              "titleSpacing": 5,
              "bodySpacing": 5
            },
            "title": {
              "fontSize": 16,
              "display": true,
              "text": "Course Enrollment Report"
            },
            "legend": {
              "display": false
            },
            "responsive": true
          }
        }
      ],
      "table": {
        "columnsExpr": "keys",
        "valuesExpr": "tableData"
      },
      "downloadUrl": "/reports/sunbird/course_enrollment.csv"
    }
  ]
}
 

...