Exploring Visualization Types
Introduction: Different Questions Need Different Visualizations
In the previous lesson, you created your first Grafana dashboard with two panels: a time series chart showing CPU usage trends over time and a stat visualization displaying the average memory usage as a single number. These two visualization types work great for certain monitoring questions — time series helps you see how metrics change over time, while stat gives you a quick summary value at a glance.
However, monitoring systems involves asking many different types of questions about your data. Sometimes, you need to compare average values across multiple hosts to identify which one is consuming the most resources. Other times, you need to see if a current value has crossed into a dangerous threshold zone. You might want to understand how disk space is distributed across different mount points, or you might need to see raw, detailed records for troubleshooting.
Each of these questions requires a different visualization type, and each visualization type expects your query to return data in a specific structure. In this lesson, you'll learn four additional visualization types that complement the time series and stat panels you already know: bar charts for comparing aggregated values, gauges for showing current values with color-coded thresholds, pie charts for displaying proportional distributions, and tables for presenting detailed multi-column data. By the end of this lesson, you'll be able to choose the right visualization for each monitoring question you need to answer.
Bar Charts: Comparing Averages Across Multiple Items
Let's start with a common monitoring scenario: you want to know which of your hosts is consuming the most CPU on average. A time series chart would show you trends over time, but what you really want is a simple side-by-side comparison. This is where bar charts excel.
To create a bar chart, add a new visualization to your dashboard and enter this query:
Notice how this query differs from the time series query you wrote in the previous lesson. You're still using $__timeFilter(ts) to respect the dashboard's time range, but you're not using $__time(ts) at all. That's because you're not plotting values over time — you're calculating a single aggregated value for each host.
The GROUP BY host clause creates one result row per host, and AVG(usage) calculates the average CPU usage for that host across the selected time period. The metric and value column aliases follow Grafana's convention, just like in time series queries, but here they mean something different. The metric column determines which bars appear on your chart (one bar per host), and the value column determines the height of each bar.
By ordering the results with ORDER BY value DESC, you ensure the hosts with the highest CPU usage appear first, making it easy to spot problem hosts immediately.

After running the query, change the visualization type from the default Time series to Bar chart in the visualization picker. You'll see vertical bars, each representing one host, with the height of each bar showing that host's average CPU usage. This gives you an instant visual comparison — you can immediately see which hosts are working harder than others.
Bar charts are particularly useful when you want to compare aggregated metrics across categories. Instead of tracking how values change over time, you're answering the question "Who has the most?" or "Which one is biggest?" This makes bar charts perfect for comparing resource usage across hosts, services, or applications.





