analytics/geckoboard_views.py
def geckoboard_pie_chart(request):
    """
    Shows a pie chart of the metrics in the uids[] GET variable array.
    """

    params = get_gecko_params(request, cumulative=True)
    from_date = datetime.now()-timedelta(days=params['days_back'])

    metrics = Metric.objects.filter(uid__in=params['uids'])
    results = [(metric.latest_count(frequency=params['frequency'], count=not params['cumulative'],
        cumulative=params['cumulative']), metric.title, get_next_colour()) for metric in metrics]
    
    return tuple(results)
def geckoboard_pie_chart(request):
    """
    Shows a pie chart of the metrics in the uids[] GET variable array.
    """

    params = get_gecko_params(request, cumulative=True)
    from_date = datetime.now()-timedelta(days=params['days_back'])

    metrics = Metric.objects.filter(uid__in=params['uids'])
    results = [(metric.latest_count(frequency=params['frequency'], count=not params['cumulative'],
        cumulative=params['cumulative']), metric.title, get_next_colour()) for metric in metrics]
    
    return tuple(results)
def geckoboard_pie_chart ( request ) : params = get_gecko_params ( request , cumulative = True ) from_date = datetime . now ( ) - timedelta ( days = params [ 'days_back' ] ) metrics = Metric . objects . filter ( uid__in = params [ 'uids' ] ) results = [ ( metric . latest_count ( frequency = params [ 'frequency' ] , count = not params [ 'cumulative' ] , cumulative = params [ 'cumulative' ] ) , metric . title , get_next_colour ( ) ) for metric in metrics ] return tuple ( results )
Shows a pie chart of the metrics in the uids[] GET variable array.
Shows a pie chart of the metrics in the uids [] GET variable array .