Giving Change Widget ==================== The Giving Change histogram widget displays donors who have stopped, decreased, increased or started giving to the specified fund. The data, based on the fund ID specified, is segmented into giving change percentage ranges. A minimum giving amount threshold and percentage of change are also configurable. The default code compares the previous 365 days to the prior 365-day period. The widget utilizes an HTML file, SQL script and Python script as shown below. Since the data is the same for all users, caching should be set to **all users**. To customize the widget, make the following modifications to the SQL script: * **Set the fund ID** by updating line 2. * **Set the minimum percentage of change shown** by updating line 3. (Do not include a percent sign.) * **Set the minimum giving amount to include on the graph** by changing line 4. * If desired, **change the time period for comparison** by modifying line 5. Video ----- Below is a short video demonstrating some of the features of this widget. .. raw:: html | HTML Code --------- Below is the HTML code for the Giving Change widget. As supplied by TouchPoint, the name of the file is WidgetGivingChangeHistogramHTML. .. literalinclude:: Files/WidgetGivingChangeHistogram.html :linenos: SQL Script ---------- Below is the SQL script for the Giving Change widget. As supplied by TouchPoint, the name of the file is WidgetGivingChangeHistogramSQL. .. literalinclude:: Files/WidgetGivingChangeHistogram.sql :linenos: Python Script ------------- Below is the Python script for the Giving Change widget. As supplied by TouchPoint, the name of the file is WidgetGivingChangeHistogramPython. .. literalinclude:: Files/WidgetGivingChangeHistogram.py :linenos: | | +--------------------+------------------+ | **Latest Update** | **12/10/2020** | +--------------------+------------------+ Added this article.