score:1

you can send the queryset to the template in the context and use the values there.

class yourtemplate(templateview):
    def get_context_data(self, **kwargs):
        requestcnt = activitylog.objects.annotate(request_count=count('requesttype')).values('dodate', 'request_count')
        context = super().get_context_data(**kwargs)
        context["data"] = requestcnt
        return context

then in your template, you can use data variable to get the data for both the axis. the data will be of the format:

[{"dodate":"...", "request_count":"..."}, {"dodate":"...", "request_count":"..."}]

Related Query

More Query from same tag