Grafana Panel Editor
The panel editor is where you craft every detail of a panel — the query, the chart type, the colours, the axes, and the title. Mastering the panel editor gives you precise control over how data looks and what information it communicates.
Opening the Panel Editor
Hover over any existing panel on a dashboard. Three dots appear in the top-right corner of the panel. Click them and select Edit. You can also click the panel title directly (in older Grafana versions). The panel editor fills the screen, replacing the dashboard view.
Panel Editor Layout
┌───────────────────────────────────────────────────────────────┐
│ Panel Preview (live chart updates as you change settings) │
├───────────────────────────────────────────────────────────────┤
│ Query Section (bottom half) │
│ [Query A] [+ Add query] [Transform] [Alert] │
│ │
│ query input field: up │
└───────────────────────────────────────────────────────────────┘
┌──────────────────────┐
│ Right Panel Options │
│ ─────────────────── │
│ Visualization type │
│ Panel options │
│ (Title, Desc, Link) │
│ Tooltip │
│ Legend │
│ Axes │
│ Graph styles │
│ Thresholds │
│ Value mappings │
└──────────────────────┘
The Query Section
The bottom half of the panel editor shows the query builder. This is where you define what data to fetch. Each query is labelled with a letter — A, B, C — and you can add multiple queries to a single panel to overlay several lines on one chart.
Adding a Second Query
Click + Add query to add Query B. Both queries run and their results appear as separate lines in the preview chart. This is useful for comparing two metrics side by side on the same graph, such as CPU usage for two different servers.
Panel Preview:
100 | Server-01 (Query A) ─────
80 | Server-02 (Query B) ─────
60 |
0 |________________________________ time
Query Legend
Each query has a Legend field. Type a meaningful name here — it appears in the chart legend and tooltip. You can also use template variables in the legend, such as {{instance}}, which automatically fills in the server name from the metric labels.
Min Interval
The Min interval setting tells Grafana the minimum time bucket to use when grouping data. Setting it to 1m prevents Grafana from requesting per-second data when you are viewing a 7-day window — which would return millions of data points and slow down the dashboard.
Right-Hand Options Panel
All visual settings live in the right-hand panel. The options are organised into collapsible sections.
Panel Options
This section contains the panel Title and Description. The description appears when users hover over the information icon (ℹ) on the panel. Write a brief explanation of what the panel shows and why the threshold values matter.
Tooltip
The tooltip appears when you hover over a data point on the chart. Choose between:
- Single – shows only the hovered series value
- All – shows all series values at the hovered time point, ideal when comparing multiple lines
Legend
The legend lists all series on the panel. You can place it at the bottom or on the right. Enable Values in the legend to show the current, minimum, maximum, or average value next to each series name — very useful for quick comparisons.
Legend at bottom with values: ─────────────────────────────────── ● Server-01 Last: 42% Max: 91% ● Server-02 Last: 67% Max: 85%
Axes
The Axes section controls the Y-axis (vertical) and X-axis (horizontal). Key settings include:
- Unit – tells Grafana what unit to display. Choosing "percent (0-100)" formats numbers as percentages. Choosing "bytes" automatically converts large numbers to KB, MB, or GB.
- Min / Max – locks the axis scale. Set Min to 0 and Max to 100 for a percentage metric so the chart never shows a misleading scale.
- Label – adds a text label alongside the axis, such as "Response Time (ms)".
Graph Styles
For time series panels, graph styles control the visual appearance of the lines.
- Lines – standard line chart (default)
- Bars – each data point becomes a vertical bar
- Points – only dots at each data point, no connecting line
- Fill opacity – adds a shaded area under the line; set between 0 (no fill) and 100 (solid fill)
- Line width – makes lines thicker or thinner
- Gradient mode – applies a colour gradient to the fill area for a polished look
Thresholds
Thresholds add horizontal coloured lines across the chart at critical values. They make danger zones immediately visible.
CPU Usage Chart with Thresholds:
100 |
90 | ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ← Red threshold (critical)
80 |
70 | ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ← Yellow threshold (warning)
60 |
| ─────────────────── actual CPU line
Add a threshold by clicking + Add threshold in the Thresholds section. Set the value and choose a colour. Grafana automatically shades the area above the threshold in that colour.
Value Mappings
Value mappings replace raw numbers with human-readable text or icons. For example, map the value 1 to the text Online with a green colour, and map 0 to Offline with a red colour. This works perfectly with the Stat panel to create status boards.
Without mapping: value = 1 With mapping: ● Online (green) Without mapping: value = 0 With mapping: ● Offline (red)
Saving Panel Changes
Click Apply in the top right to close the editor and return to the dashboard with your changes. Then press Ctrl+S to save the entire dashboard. Changes made in the panel editor are not saved to disk until you save the dashboard.
Duplicating a Panel
Hover over a panel, click the three-dot menu, and select Duplicate. Grafana creates a copy of the panel with all its settings. Modify the duplicate's query to show a different metric. This saves time when you want several similar panels that share the same styling.
