(
            self, data, title='', sketch_url='', field='',
            extra_query_url='', aggregation_id=None)
Initialize the chart object.

        Args:
            data: Dictionary with list of values and dict of encoding info.
            title: String used for the chart title.
            sketch_url: Sketch URL for rendering href links.
            field: The field used to generate search terms for URL.
            extra_query_url: For Chart URL transformation. If provided an extra
                condition will be added to URL transformations in the query
                field.
            aggregation_id: Integer with the aggregation ID.

        Raises:
            RuntimeError if values or encoding is missing from data.
Initialize the chart object.
Initialize the chart object .
def __init__(
            self, data, title='', sketch_url='', field='',
            extra_query_url='', aggregation_id=None):
        """Initialize the chart object.

        Args:
            data: Dictionary with list of values and dict of encoding info.
            title: String used for the chart title.
            sketch_url: Sketch URL for rendering href links.
            field: The field used to generate search terms for URL.
            extra_query_url: For Chart URL transformation. If provided an extra
                condition will be added to URL transformations in the query
                field.
            aggregation_id: Integer with the aggregation ID.

        Raises:
            RuntimeError if values or encoding is missing from data.
        """
        _values = data.get('values')
        _encoding = data.get('encoding')

        if _values is None or not _encoding:
            raise RuntimeError('Values and/or Encoding missing from data')

        self.name = self.NAME
        if isinstance(_values, pd.DataFrame):
            self.values = _values
        else:
            self.values = pd.DataFrame(_values)

        self.encoding = _encoding
        self.chart_title = title

        self._aggregation_id = aggregation_id
        self._extra_query_url = extra_query_url
        self._field = field
        self._sketch_url = sketch_url
def __init__ ( self , data , title = '' , sketch_url = '' , field = '' , extra_query_url = '' , aggregation_id = None ) : _values = data . get ( 'values' ) _encoding = data . get ( 'encoding' ) if _values is None or not _encoding : raise RuntimeError ( 'Values and/or Encoding missing from data' ) self . name = self . NAME if isinstance ( _values , pd . DataFrame ) : self . values = _values else : self . values = pd . DataFrame ( _values ) self . encoding = _encoding self . chart_title = title self . _aggregation_id = aggregation_id self . _extra_query_url = extra_query_url self . _field = field self . _sketch_url = sketch_url