Get Started Free

20+ Chart Types

Basic charts (bar, line, area, pie, donut, scatter, bubble), analytics charts (funnel, gauge, heatmap, treemap, sunburst, Sankey, radar), time-series charts (timeline, candlestick, calendar) and geographic charts (geo map, geo scatter, geo heatmap). Table, pivot and tree views are chart types too. The preview updates live as you configure colors, labels and styling.

Chart type dropdown showing all available types

Visual Field Mapping

Map the columns of a SQL result or the fields of MongoDB documents to axes, values and categories with dropdowns. Auto Detect reads the actual values to tell numbers, text, dates and geographic data apart, falls back to field names such as "total" or "count" when the data is ambiguous, and gives you a starting mapping you can adjust.

Data mapper panel with field dropdowns

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.

Edit Query button in preview panel

Charts from SQL Queries

Write a SELECT in the SQL editor, run it, and click Create Chart: the result set opens in the Chart Builder with its columns ready to map. 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.

SQLite query counting failed inspection items by category, shown as a bar chart in the Chart Builder next to the SQL editor

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. Auto Detect maps country to the X axis and revenue to the Y axis.

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. Choose a chart type, click Auto Detect, 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