Get Started Free

20+ Chart Types

The everyday charts sit one click away under Show me: bar, line, area, pie, donut, treemap, funnel, heatmap, gauge and table. A chart your current fields can't draw is greyed out, so you only pick ones that work. More types lists the rest (scatter, bubble, radar, sunburst, Sankey, maps, calendar, timeline, candlestick, pivot and tree tables) along with the fields each one needs. The preview updates live as you change fields, colors and labels.

Show me chart buttons with the More types menu open, listing scatter, bubble, radar, Sankey, maps, calendar, timeline, candlestick, pivot and tree tables with the fields each needs

Visual Field Mapping

Pick fields instead of writing a query. Click a field from your MongoDB documents or SQL result, or drag it onto Group by, Measure, Color or Filters: group orders by channel, sum their totals, split each bar by status and keep only delivered orders. MongoDB charts are grouped in the database, so the totals cover every matching document, not a sample. Chart types the boxes can't hold yet, such as scatter, maps or Sankey, open a field mapping panel where Auto Detect suggests a starting point.

Chart Builder fields: Group by channel, Measure SUM(totals.total), an empty Color box and Filters status = delivered and totals.total ≥ 150, above the Show me chart buttons

Charts That Stay Tied to Their Query

Every chart is backed by a MongoDB query, a MongoDB aggregation pipeline or a SQL query. Edit Query, Edit Aggregation or Edit SQL reopens the source so you can change filters, stages, joins or grouping, and the chart refreshes with the new data. For SQL charts you can also point the same query at a different connection, such as dev, staging or prod.

Chart builder showing a bar chart of delivered revenue by channel, with fields on the left and Group by, Measure and Filters above the preview

Charts from SQL Queries

Run a SELECT and click Create Chart: the result's columns become fields you drop onto Group by, Measure and Color. Edit SQL opens the chart's query in the SQL editor right beside it, so you can change it, run it and Save to Chart. Anything your database dialect allows can feed a chart, including JOINs, GROUP BY, window functions and CTEs. The same steps work on PostgreSQL, MySQL, SQL Server and SQLite; only the SQL dialect changes.

PostgreSQL query counting orders by channel and status in the SQL editor, next to the Chart Builder showing it as a bar chart split by status

One Chart, Two Possible Sources

A bar chart of revenue by country can come from a SQL table or a MongoDB collection. Once the result is loaded, mapping, styling and saving work the same way.

SQL · PostgreSQL

Revenue by country, last 30 days

SELECT country, SUM(total)::numeric(12,2) AS revenue, COUNT(*) AS order_count FROM orders WHERE created_at >= NOW() - INTERVAL '30 days' AND status = 'completed' GROUP BY country ORDER BY revenue DESC LIMIT 20;

Run it in a SQL Query activity, then click Create Chart. Click country to group by it and revenue to measure it, and pick Bar under Show me.

MongoDB · aggregation pipeline

The same question on an orders collection

[ { $match: { status: "completed", createdAt: { $gte: ISODate("2026-09-01") } } }, { $group: { _id: "$country", revenue: { $sum: "$total" }, order_count: { $sum: 1 } } }, { $sort: { revenue: -1 } }, { $limit: 20 } ]

Build the pipeline in the aggregation builder, then click Create Chart to send its output to the Chart Builder.

How It Works

This walkthrough follows the PostgreSQL example from the Chart Builder documentation.

From query to chart

  1. Add the database in the Connection Manager and test the connection.
  2. Open a SQL Query activity on that connection, or a collection or aggregation for MongoDB.
  3. Run the query and check that the result has the columns you want to plot.
  4. Click Create Chart. The result set opens in the Chart Builder.
  5. Drop columns onto Group by and Measure, pick a chart type under Show me, and add a title and axis labels.

From chart to dashboard

  1. When several rows land on the same point, choose how they combine: Sum, Average, Count, Min, Max, First or Last. Non-numeric values are skipped instead of counted as zero.
  2. Save the chart into a folder such as reports/sales in the chart library.
  3. Open the Dashboard Builder and pin the chart to a dashboard for regular viewing.

Chart Data from Any Connected Database

Frequently Asked Questions

Can I chart data from a SQL database?
Yes. Run a SQL query against any SQL connection, such as PostgreSQL, MySQL, SQL Server or SQLite, and click Create Chart. Full SELECT, JOIN and GROUP BY are supported, along with whatever else your database dialect allows.
Which chart types are available?
More than 20: bar, line, area, pie, donut, scatter, bubble, funnel, gauge, heatmap, treemap, sunburst, Sankey, radar, timeline, candlestick, calendar, geo map, geo scatter and geo heatmap, plus table, pivot and tree views.
How does Auto Detect choose the axes?
It looks at the actual values in your result to classify each field as numeric, text, date or geographic, then matches fields to what the selected chart type needs. If the data is inconclusive, it falls back to field names, for example treating "count", "total" or "amount" as numbers.
What happens when several rows share the same category?
You choose the aggregation in the Data Field Mapping panel: Sum, Average, Count, Min, Max, First or Last. The default is Sum. The choice is saved with the chart and applies on dashboards too.
Can I change the query after the chart is built?
Yes. Use Edit Query, Edit Aggregation or Edit SQL to reopen the source. For SQL charts you can also switch to another connection, preview the new result, and let the chart re-render.
View all FAQs
Aggregation pipeline builder with stage palette

Aggregation Pipeline

Transform and prepare your data before visualizing it. Use aggregation pipelines to group, filter, and calculate metrics, then feed the results directly into Chart Builder to create powerful data visualizations.

VisuaLeaf visual query builder assembling a MongoDB filter from dropdowns

Visual Query Builder

Build the data queries that power your charts without writing code. Use Visual Query Builder to filter and select exactly the data you need, then visualize the results instantly in Chart Builder.

Want to Learn More?

Check out the documentation to explore all the details about the Chart Builder and discover more VisuaLeaf features.

Read the Documentation

Ready to chart your MongoDB and SQL data?

Get started free with our Community Edition. Includes a 14-day trial of Pro features.

macOS Windows Linux