Commit 245b2a71 authored by Arthur Lutz's avatar Arthur Lutz
Browse files

do a daily graph and a monthly graph

parent 641d82933bf5
......@@ -88,9 +88,12 @@ class StatGraph(EntityView):
entity = self.cw_rset.get_entity(row, col)
self.w(u'<h1>%s %s</h1>' % (_('Graph of hits for'),
entity.dc_title()))
rql = 'Any S, HITS WHERE H hit_type "normal", H count HITS, H stats_about E, H period P, P start S, E eid %(e)s'
rset = self._cw.execute(rql, {'e':entity.eid})
self.w(self._cw.view('plot', rset, 'null'))
for constraint in (' HAVING O-S <= 20',
' HAVING O-S >= 20'):
rql = 'Any S, HITS WHERE H hit_type "normal", H count HITS, H stats_about E, H period P, P start S, P stop O, E eid %(e)s'
rset = self._cw.execute(rql + constraint, {'e':entity.eid})
self.w(u'%s' % (rql % {'e':entity.eid}))
self.w(self._cw.view('plot', rset, 'null'))
class StatPeriodChart(EntityView):
__regid__ = 'periodchart'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment