Reference
barchart
Fields and display options of a barchart panel.
Example
{
"id": "p_bars",
"type": "barchart",
"title": "Requests by route",
"gridPos": {
"x": 0,
"y": 0,
"w": 12,
"h": 8
},
"datasource": "prom",
"queries": [
{
"query": "sum by (route) (increase(http_requests_total{service=\"frontend\"}[1h]))",
"instant": true,
"format": "table"
}
],
"display": {
"orientation": "horizontal",
"xField": "route",
"showValues": "always"
}
}From spec/examples/panel-types.json.
Fields
| Field | Type | Description |
|---|---|---|
id (required) |
string |
Stable across versions; comments anchor to it. |
title (required) |
string |
|
description |
string |
|
gridPos (required) |
gridPos |
Position on the 24-column grid; x + w must not exceed 24. |
type (required) |
"timeseries", "stat", "gauge", "bargauge", "table", "piechart", "heatmap", "histogram", "state-timeline", "logs", "barchart", "status-history", "trend", "xychart", "candlestick", "nodeGraph", "traces", "flamegraph", "geomap", "canvas", "alertlist" |
|
datasource |
datasourceRef |
A configured datasource uid, or ${name} naming a datasource variable declared in variables (before this variable, when used by one); queries then run on the datasource selected in that variable, and macros follow its datasourceType. |
queries (required) |
array of panelQuery or expressionQuery or dashboardQuery |
At most 26 items. |
overrides |
array of override |
At most 50 items. |
transform |
array of transform |
At most 20 items. |
repeat |
variableName |
Referenced in queries as $name, ${name} or ${name:format}. |
repeatDirection |
"h", "v" |
|
maxPerRow |
integer |
Between 1 and 24. |
timeFrom |
string |
|
timeShift |
string |
|
timezone |
string |
browser, utc or an IANA zone such as Asia/Kolkata. The times this panel draws are shown in this zone instead of the dashboard’s. |
hideTimeOverride |
boolean |
Do not show the time override note (from timeFrom and timeShift) in the panel header. The override still applies to the queries. Absent means shown. |
interval |
intervalRef |
A minimum step such as 30s, or ${name} naming an interval variable; queries then use the step selected in that variable. |
maxDataPoints |
integer |
Between 10 and 11000. |
transparent |
boolean |
|
titleHidden |
boolean |
Keep the title as the panel’s name for menus and screen readers but do not show it. Absent means shown. |
Every data panel also takes the field options.
Display options
| Field | Values | Description |
|---|---|---|
orientation |
"auto", "horizontal", "vertical" |
|
xField |
fieldName |
A field name or series name in the panel’s frames. |
showValues |
"auto", "always", "never" |
|
barWidth |
number |
|
groupWidth |
number |
|
legend |
"bottom", "right", "hidden" |
|
tooltip |
"single", "all", "hidden" |
|
legendMode |
"list", "table" |
|
legendValues |
array of anyReducer |
At most 8 items. |
legendSortBy |
"name" or reducer |
|
legendSortDesc |
true, false |
|
legendWidth |
integer |
Between 40 and 2000. |
tooltipSort |
"none", "asc", "desc" |
|
tooltipHideZeros |
true, false |
|
tooltipMaxWidth |
integer |
Between 100 and 2000. |
tooltipMaxHeight |
integer |
Between 100 and 2000. |
xTickRotation |
integer |
Between -90 and 90. |
xTickSpacing |
integer |
Between 0 and 500. |
xTickMaxLength |
integer |
Between 1 and 200. |
barRadius |
number |
Between 0 and 0.5. |
fullHighlight |
true, false |
|
colorByField |
fieldName |
A field name or series name in the panel’s frames. |
valueSize |
integer |
Between 6 and 100. |
Generated from spec/schema/observespec.v0.json at bac0fe39. Report a problem.