def METHOD_NAME(self, key, values, color=None):
    """
    :param key: dataset name
    :param values: List of dictionaries containing x and y values i.e. [{x=1, y=2}, ...]
    :param color: HTML color value
    """
    d = dict(key=key, values=values)
    if color:
        d['color'] = color
    self.data.append(d)