diff --git a/src/purchase/views/reports.py b/src/purchase/views/reports.py index 2e4ab34..fcb51e4 100644 --- a/src/purchase/views/reports.py +++ b/src/purchase/views/reports.py @@ -2,6 +2,7 @@ import datetime from io import StringIO from zoneinfo import ZoneInfo +import matplotlib import numpy as np from django.conf import settings from django.contrib import messages @@ -17,6 +18,8 @@ from matplotlib.figure import Figure from purchase.models import Basket, PaymentMethod, Product, ProductQuerySet +matplotlib.use("TkAgg") + @permission_required("purchase.view_basket") def reports(request):