Chart Widget
The chart widget displays data visually as a line chart, bar chart, or pie chart. The data comes from an SQL query, allowing flexible visualizations.
This makes trends, distributions, and comparisons visible at a glance.
Typical Use Cases
| Use Case | Chart Type | Description |
|---|---|---|
| Revenue trend | Line | Monthly revenue over the course of the year. |
| Orders per month | Bar | Number of incoming orders per month. |
| Order distribution by category | Pie | Share of orders by product category or division. |
| Processing time trend | Line | Average processing duration per week or month. |
| Top 10 customers by revenue | Bar | Ranking of highest-revenue customers. |
| Complaint rate | Line | Development of complaint rate over the last 12 months. |
| Cost breakdown | Pie | Cost split by department or cost center. |
| Staff capacity | Bar (stacked) | Available vs. booked hours per team. |
Chart Types
| Type | Use Case |
|---|---|
| Line Chart | Ideal for trends over time (e.g., orders per month). |
| Bar Chart | Ideal for comparing categories (e.g., revenue by product). |
| Pie Chart | Ideal for showing proportions (e.g., status distribution). |
Configuration
Configuration is done in four steps in the properties panel:
Step 1: Data Source
- SQL Query: An SQL query that returns the data. The first column is used for the axis/label, subsequent columns for the values.
Step 2: Chart Type
- Line chart, bar chart, or pie chart.
Step 3: Axis Labels
- X-Axis Label (optional): Label for the horizontal axis.
- Y-Axis Label (optional): Label for the vertical axis.
Step 4: Display Options
- Colors: The chart colors can be customized.
- Legend: Whether a legend is displayed.
Example
A management dashboard shows a bar chart with "Orders per month" for the current year. The SQL query groups the orders by month and counts them.
Tips
- Pie for distributions: Pie charts work best with 3–7 categories. With too many slices, the chart becomes hard to read.
- Line for trends: Line charts are ideal when monitoring values over time.
- Combine with table: A chart paired with a table widget provides both visual overview and access to details.