trame.html.vega

You can find more information about using Vega with trame here.

class trame.html.vega.VegaEmbed(name=None, chart=None, **kwargs)[source]

Bases: trame.html.AbstractElement

Vega component. See vega docs here for more info.

Parameters
  • chart – The chart to display. Defaults to None.

  • name – The identifier of this components data in shared state. Generated if not given.

static altair_to_spec(chart, **kwargs)[source]

Serialize altair chart

update(chart=None, **kwargs)[source]

Change which chart is displayed

Parameters

chart – The chart to display. Defaults to None.