Charts API Reference

MonsterUI supports ApexCharts, a javascript library for rendering different charts like line and pie charts. See the full list of chart types here.

To render a chart you'll need to include the ApexChart js in your app headers like this

app, rt = fast_app(hdrs=Theme.blue.headers(apex_charts=True))

Then create an ApexChart component as shown in the examples below.

Generally, you should be able to take any chart from the ApexChart docs, convert the chart's options var to a python dict and plug it straight into MonsterUI's ApexChart component.

Example usage

Line chart

Pie chart

ApexChart

Source
ApexChart(*, opts: Dict, cls: enum.Enum | str | tuple = (), **kws) -> fastcore.xml.FT

Apex chart component

Params
  • opts ApexChart options used to render your chart (e.g. {"chart":{"type":"line"}, ...})

  • cls Classes for the outer container

  • kws

Returns: Div(Uk_chart(Script(...)))