def charts(self): chart = LineChart(_("Messages over time"), None, Axis(_('# of Messages'), ',.1d')) chart.data = { _("Keywords"): self.es_histogram(WORKFLOW_KEYWORD), _("Reminders"): self.es_histogram(WORKFLOW_REMINDER), _("Broadcasts"): self.es_histogram(WORKFLOW_BROADCAST), } chart.data_needs_formatting = True chart.x_axis_uses_dates = True return [chart]
def charts(self): chart = LineChart(_("Appointment Reminders"), None, None) chart.data = [ { "key": _("% Appointments Confirmed"), "values": self.percent_over_time('case_data'), }, { "key": _("% Reminders Confirmed"), "values": self.percent_over_time('session_data'), }, ] chart.x_axis_uses_dates = True return [chart]