'Get the totals of a row/column/report
@param values: the values dictionary
@param facts: the facts
@param append: callback to collect the totals for JSON data
(currently only collects the first layer)'

@staticmethod
def _totals(values, facts, append=None):

    totals = []
    number_represent = IS_NUMBER.represent
    for fact in facts:
        value = values[fact.layer]
        if ((not len(totals)) and (append is not None)):
            append(value)
        totals.append(s3_unicode(number_represent(value)))
    totals = '    /    '.join(totals)
    return totals
