Hi, I am struggling to specify individual colors for a stacked bar chart.
I am using Grafana v13.1.0
What: I am using the “Bar Chart” element with two series that I want to display in to colors of my own chosing. I can select the “Classic Palette” for individual colors but have no choice over the colors. I have a dashboard that aggregates various KPIs. For each KPI, I compute two numbers “Rest” and “Period”
The logic I am using looks something like this:
WITH data AS (
SELECT
'Category A' AS category,
1200 AS rest_value,
300 AS period_value
UNION ALL
SELECT
'Category B',
900,
150
UNION ALL
SELECT
'Category C',
450,
80
)
SELECT *
FROM data;
The only options I found in Grafana 13.1.0 with the Bar Chart panel:
-
Color by field
-
Color by value
-
Color by thresholds
-
Color by special values
There is no “Color by series” option.
What I have tried so far:
- value mappings and assigning keys in the query → only every worked for one
- Field overrides with regex → Tooltip correct, bar remains in a single color
- Disabling “Color by field” → not possible, Grafana automatically selects a field
- “Color by value” → Colors based on numeric values, not series
- “Time series panel” → time field required
Any assistance is much appreciated, thank you so much.

