Skip to main content
Back to Blog
charts visualization data dashboards

Charts from Any Data Source

Swifty Team Mar 18, 2026 3 min read

A chart component should be a visualization tool, not a database query tool. Its job is to render data clearly — to turn numbers into a form that reveals patterns, trends, and comparisons at a glance. Where the data comes from shouldn't be the chart's concern.

Charts in Swifty connect to any data source through the unified data source interface.

Available Chart Types

The chart library covers the visualization types most useful for business data:

Line charts: Time-series trends, continuous data over intervals. Revenue over the last 12 months. Daily active users for the past 30 days. Error rate minute by minute.

Bar charts: Comparisons across categories. Sales by product. Tickets resolved by team. Orders by region.

Stacked bar charts: Proportional composition over time or across categories. Revenue split by product type per month.

Donut and pie charts: Part-to-whole relationships. Lead sources as proportions of total. Order status distribution.

Area charts: Cumulative trends and volume over time.

Connecting a Data Source

In the builder, select a chart component and open its data source configuration. Choose the data source type — your records, an external integration, monitoring metrics, analytics — and configure the query: what to aggregate, how to group, what time range to use.

The chart type and data source are separate concerns. Switch the chart type without reconfiguring the data source. Switch the data source without changing the chart type.

Aggregation at the Source

Charts consume aggregated data. Instead of fetching every individual record and aggregating in the browser, aggregation happens at the source level — a count of records per status, a sum of amounts per month. Only the aggregated result is returned to the chart.

This approach scales well. A chart showing order counts by month draws the same amount of data whether the underlying table has 1,000 or 1,000,000 orders.

Interactivity

Charts support click interactions. Clicking a bar in a bar chart can filter a connected table to show the records in that category. Clicking a segment in a donut chart can apply a filter. These interactions are configured in the builder by connecting the chart's click event to a filter target.

Combined with named data sources, interactive charts create dashboards where exploring data by clicking charts is a natural navigation pattern.

Consistent Styling

Charts use the workspace's defined color palette. Status colors from the data model appear in charts visualizing status distributions. Custom colors can be overridden per chart. The default is always consistent with the rest of the application's visual language.

Related posts

Composed Data Sources

Chain and relate data sources for rich dashboards — compose complex data views from simpler sources without writing code.

Computed Expressions

Transform data with template expressions and built-in functions — format, combine, and derive values from your data without code.

Cross-Source Data Joins

Combine data from multiple sources in one view — join records from your database with data from external services using a shared key.