def monthly_activity(request, project=None, subproject=None, lang=None, user=None):
 activity = get_json_stats(request, 31, 1, project, subproject, lang, user)
 serie = []
 labels = []
 for (pos, item) in enumerate(activity):
  serie.append(item[1])
  if ((pos % 5) == 0):
   labels.append(pgettext('Format string for monthly activity chart', '{day}/{month}').format(day=item[0].day, month=item[0].month, year=item[0].year))
  else:
   labels.append('')
 return JsonResponse(data={'series': [serie], 'labels': labels})

def monthly_activity ( request , project = None , subproject = None , lang = None , user = None ) : activity = get_json_stats ( request , 31 , 1 , project , subproject , lang , user ) serie = [ ] labels = [ ] for ( pos , item ) in enumerate ( activity ) : serie . append ( item [ 1 ] ) if ( ( pos % 5 ) == 0 ) : labels . append ( pgettext ( 'Format string for monthly activity chart' , '{day}/{month}' ) . format ( day = item [ 0 ] . day , month = item [ 0 ] . month , year = item [ 0 ] . year ) ) else : labels . append ( '' ) return JsonResponse ( data = { 'series' : [ serie ] , 'labels' : labels } )
returns monthly activity for matching changes as json .