@classmethod
def from_dict(cls, connection, data):
    """
        Returns a Chart object from a dictionary item,
        which is usually from AppOptics's API
        """
    obj = cls(connection, data['name'], id=data['id'], type=data.get('type',
        'line'), space_id=data.get('space_id'), streams=data.get('streams'),
        min=data.get('min'), max=data.get('max'), label=data.get('label'),
        use_log_yaxis=data.get('use_log_yaxis'), use_last_value=data.get(
        'use_last_value'), related_space=data.get('related_space'))
    return obj
