Recent Attendance Trends Widget =============================== The Recent Attendance Trends widget displays a line graph that shows attendance for selected divisions. Attendance for one or more divisions are shown via color-coded lines with a color legend at the top of the graph. The widget utilizes an HTML file, SQL script and Python script as shown below. Since the attendance data is the same for all users, Caching should be set to **all users**. To customize the widget, you will need to make a few changes in the Python script. - Replace lines 6 - 8 with the names and IDs of the divisions for which to display attendance. The sample shows three divisions, but you can use more or fewer. Enter one line per division in the format ``['division name', id],``. - Modify **begindate** with the beginning date of your choice (line 11 in the sample code). This will be the first date for which attendance data is shown. The graph will extend from the **begindate** to the current date. - It is recommended that you leave **graphPoints** (the number of data points per interval) at 15, but it can be set to fewer is desired. HTML Code --------- Below is the HTML code for the Recent Attendance Trends widget. As supplied by TouchPoint, the file name is **WidgetRecentAttendanceTrendsHTML**. .. literalinclude:: Files/WidgetRecentAttendanceTrends.html :linenos: SQL Script ---------- Below is the SQL script for the Recent Attendance Trends widget. As supplied by TouchPoint, the file name is **WidgetRecentAttendanceTrendsSQL**. .. literalinclude:: Files/WidgetRecentAttendanceTrends.sql :linenos: Python Script ------------- Below is the Python script for the Recent Attendance Trends widget. As supplied by TouchPoint, the file name is **WidgetRecentAttendanceTrendsPython**. .. literalinclude:: Files/WidgetRecentAttendanceTrends.py :linenos: | | +--------------------+------------------+ | **Latest Update** | **11/19/2020** | +--------------------+------------------+ Updated scripts and customization note regarding **graphPoints**.