'Collect params related to the data series.'

def _GetDataSeriesParams(self, chart):

    pie_points = []
    labels = []
    max_val = 1
    for pie in chart.data:
        points = []
        for segment in pie:
            if segment:
                points.append(segment.size)
                max_val = max(max_val, segment.size)
                labels.append((segment.label or ''))
        if points:
            pie_points.append(points)
    encoder = self._GetDataEncoder(chart)
    result = util.EncodeData(chart, pie_points, 0, max_val, encoder)
    result.update(util.JoinLists(label=labels))
    return result
