def METHOD_NAME(
    self,
    chart_name="",
    chart_title="",
    as_html=False,
    interactive=False,
    as_chart=False,
    color="",
):
    """Encode aggregation result as Vega-Lite chart.
    Args:
        chart_name: Name of chart as string, defaults to initialized
            value of the chart type..
        chart_title: The title of the chart.
        as_html: Boolean indicating if chart should be returned in HTML.
        interactive: Boolean indicating if chart should be interactive.
        as_chart: Boolean indicating if chart should be returned as a
            chart object (instance of altair.vegalite.v3.api.LayerChart).
        color: String with the color information for the chart.
    Returns:
        Vega-Lite chart spec in either JSON or HTML format.
    Raises:
        RuntimeError if chart type does not exist.
    """
    if not chart_name:
        chart_name = self.chart_type
    # Create an empty chart and then fill it with the spec.
    chart = alt.Chart(pd.DataFrame())
    chart = chart.from_dict(self._spec)
    if interactive:
        chart = chart.interactive()
    if as_html:
        return chart.to_html()
    if as_chart:
        return chart
    return self._spec