Extensions

Charts

Charts extension

Build interactive bar, line, pie, scatter, candlestick, and radar charts.

Enable the extension

Add the extension key to ruflet.yaml:

extensions:
  - charts

Run ruflet run during development or ruflet build <target> for a release. Extension packages are compiled into the Ruflet client, so rebuild the client after changing this list.

Ruby DSL example

sales = bar_chart(
  min_y: 0,
  max_y: 100,
  groups: [
    bar_chart_group(x: 0, rods: [bar_chart_rod(from_y: 0, to_y: 72, color: "#2563eb")]),
    bar_chart_group(x: 1, rods: [bar_chart_rod(from_y: 0, to_y: 91, color: "#7c3aed")])
  ],
  on_event: ->(event) { puts event.data.inspect }
)
page.add(sales)

API provided

Permissions and platforms

No protected service declaration is added automatically. Platform support still follows the underlying Flet extension, so test every target you ship.

Build behavior

Ruflet resolves the extension key to flet_charts and includes that Flet package through the client extension pipeline. Application code uses the Ruby DSL shown above; do not add the package directly to your app's Flutter dependencies.