Hi everyone! I’d like to share Fude (筆, “brush”), a charting library for Phoenix LiveView.
I built it for dashboards and reports where you want to turn Elixir data into a chart, but also give the chart enough context to tell a useful story: a title, a source, a note on a change, or a comparison between series.
A basic chart starts with data and the fields to draw:
<.chart
id="revenue"
chart={Fude.bar(@sales, x: :region, y: :revenue, title: "Revenue by region")}
/>
Here @sales can be a list of maps such as %{region: "North", revenue: 120}. When the assign changes, the chart updates in place and its marks animate to their new positions.
More than bars and lines
Fude includes area, scatter, pie, donut, histogram, heatmap, waterfall and funnel charts, along with sparklines, single-value indicators, and world and US maps. You can layer marks, add annotations, and split a chart into small multiples with shared scales.
Channels can also describe how to group or aggregate data:
Fude.line(orders,
x: {:month, :placed_on},
y: {:sum, :total},
color: :channel,
title: "Monthly revenue by channel"
)
For larger datasets, Fude.query/3 accepts an Ecto query and a repo. Supported aggregations and grouping run in the database, so the chart receives the groups rather than every row:
Order
|> Fude.query(Repo)
|> Fude.bar(x: :status, y: {:count, :id}, title: "Orders by status")
Interaction and live data
Charts have tooltips, keyboard navigation, screen reader descriptions, and a data table. Lines and areas show the series together at the pointer. You can also stream new rows into a rolling window with Fude.Live.append/5.
Saving, exporting and theming
Fude.Spec.dump/1 turns a chart definition into a versioned map that can be saved and loaded again. Charts can be exported as SVG or PNG in the browser; Fude.Export also produces Markdown, text, or HTML containing the chart’s words and data on the server. There are CSS variables for theming and support for dark mode and reduced motion.
Install
Fude requires Elixir 1.18+, Phoenix 1.7.14 or 1.8, and LiveView 1.1+. Ecto 3.13+ is needed for Ecto queries. Add the dependency:
{:fude, "~> 0.8"}
Then run:
mix deps.get
mix fude.install
The installer sets up the LiveView hook and stylesheet, and prints any manual steps needed. The JavaScript bundle is included in the package. Import Fude.Components in your web module’s html_helpers, and you’re ready to use <.chart>.
- Hex: fude | Hex
- Docs: Fude v0.8.0 — Documentation
- GitHub:
To try the gallery locally, clone the repo and run mix deps.get, mix fude.build, and mix dev, then visit http://localhost:4099.
I’d love to hear what you think. What kinds of charts or workflows would you like to see supported?

























