I have such a problem - at the beginning of the month and at the end of the bars are separated, although they were originally intended to be combined with two queries. It turns out that at the beginning of the month I get 1 bar from one request, and at the end of the month - 1 bar from another request. How can they be aligned so that they are output as a pair, as inside the range?
{
"id": 611,
"gridPos": {
"h": 6,
"w": 12,
"x": 1,
"y": 32
},
"type": "barchart",
"title": "Total revenue",
"datasource": {
"type": "prometheus",
"uid": "2qDdy95nk"
},
"pluginVersion": "9.3.6",
"timeFrom": "30d",
"maxDataPoints": 100,
"interval": "1d",
"links": [],
"description": "",
"fieldConfig": {
"defaults": {
"custom": {
"lineWidth": 1,
"fillOpacity": 74,
"gradientMode": "none",
"axisPlacement": "auto",
"axisLabel": "",
"axisColorMode": "text",
"scaleDistribution": {
"type": "linear"
},
"axisCenteredZero": false,
"hideFrom": {
"tooltip": false,
"viz": false,
"legend": false
},
"thresholdsStyle": {
"mode": "off"
}
},
"color": {
"mode": "continuous-BlYlRd",
"fixedColor": "dark-yellow"
},
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "N/A"
}
},
"type": "special"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "dark-blue",
"value": null
}
]
},
"decimals": 2,
"min": 0,
"unit": "currencyUSD"
},
"overrides": []
},
"options": {
"orientation": "vertical",
"xTickLabelRotation": 0,
"xTickLabelSpacing": 100,
"showValue": "auto",
"stacking": "none",
"groupWidth": 1,
"barWidth": 0.71,
"barRadius": 0.1,
"tooltip": {
"mode": "single",
"sort": "none"
},
"legend": {
"showLegend": false,
"displayMode": "list",
"placement": "bottom",
"calcs": []
},
"xField": "Time"
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "2qDdy95nk"
},
"editorMode": "builder",
"expr": "sum(delta(storj_payout_currentMonth{type=~\"payout\"}[24h]) / 100)",
"interval": "",
"legendFormat": "Aquired",
"range": true,
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "2qDdy95nk"
},
"editorMode": "builder",
"expr": "sum(delta(storj_payout_currentMonth{type=~\"held\"}[24h])) / 100",
"hide": false,
"interval": "",
"legendFormat": "Held",
"range": true,
"refId": "B"
}
]
}