def yearly_activity(request, project=None, subproject=None, lang=None, user=None):
 activity = get_json_stats(request, 364, 7, project, subproject, lang, user)
 serie = []
 labels = []
 month = (-1)
 for item in activity:
  serie.append(item[1])
  if (month != item[0].month):
   labels.append(pgettext('Format string for yearly activity chart', '{month}/{year}').format(month=item[0].month, year=item[0].year))
   month = item[0].month
  else:
   labels.append('')
 return JsonResponse(data={'series': [serie], 'labels': labels})

def yearly_activity ( request , project = None , subproject = None , lang = None , user = None ) : activity = get_json_stats ( request , 364 , 7 , project , subproject , lang , user ) serie = [ ] labels = [ ] month = ( - 1 ) for item in activity : serie . append ( item [ 1 ] ) if ( month != item [ 0 ] . month ) : labels . append ( pgettext ( 'Format string for yearly activity chart' , '{month}/{year}' ) . format ( month = item [ 0 ] . month , year = item [ 0 ] . year ) ) month = item [ 0 ] . month else : labels . append ( '' ) return JsonResponse ( data = { 'series' : [ serie ] , 'labels' : labels } )
returns yearly activity for matching changes as json .